mirror of
https://github.com/Piwigo/Piwigo.git
synced 2025-04-26 11:19:55 +03:00
bug:2326
Mysql error on picture_modify if tag input is empty. git-svn-id: http://piwigo.org/svn/trunk@11220 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
9866699c77
commit
0af1d99ebf
2 changed files with 3 additions and 6 deletions
|
@ -106,14 +106,11 @@ SELECT id, date_creation
|
|||
array_push($datas, $data);
|
||||
|
||||
// tags management
|
||||
if (isset($_POST[ 'tags-'.$row['id'] ]) AND $_POST[ 'tags-'.$row['id'] ] != null)
|
||||
$tag_ids = array();
|
||||
if (!empty($_POST[ 'tags-'.$row['id'] ]))
|
||||
{
|
||||
$tag_ids = get_tag_ids($_POST[ 'tags-'.$row['id'] ]);
|
||||
}
|
||||
else
|
||||
{
|
||||
$tag_ids = array();
|
||||
}
|
||||
set_tags($tag_ids, $row['id']);
|
||||
}
|
||||
|
||||
|
|
|
@ -164,7 +164,7 @@ if (isset($_POST['submit']) and count($page['errors']) == 0)
|
|||
|
||||
// time to deal with tags
|
||||
$tag_ids = array();
|
||||
if (isset($_POST['tags']))
|
||||
if (!empty($_POST['tags']))
|
||||
{
|
||||
$tag_ids = get_tag_ids($_POST['tags']);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue