Skip to content

Commit

Permalink
bug:2326
Browse files Browse the repository at this point in the history
Mysql error on picture_modify if tag input is empty.

git-svn-id: http://piwigo.org/svn/trunk@11220 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information
patdenice committed Jun 3, 2011
1 parent 9866699 commit 0af1d99
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 2 additions & 5 deletions admin/batch_manager_unit.php
Expand Up @@ -106,14 +106,11 @@
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']);
}

Expand Down
2 changes: 1 addition & 1 deletion admin/picture_modify.php
Expand Up @@ -164,7 +164,7 @@

// time to deal with tags
$tag_ids = array();
if (isset($_POST['tags']))
if (!empty($_POST['tags']))
{
$tag_ids = get_tag_ids($_POST['tags']);
}
Expand Down

0 comments on commit 0af1d99

Please sign in to comment.