diff options
author | patdenice <patdenice@piwigo.org> | 2011-06-03 16:42:02 +0000 |
---|---|---|
committer | patdenice <patdenice@piwigo.org> | 2011-06-03 16:42:02 +0000 |
commit | 054592ce9f3598f12dc712ef570de6d3661741eb (patch) | |
tree | ae89782967c91cd8578ae999e45bdf52b003fd14 /admin | |
parent | 9cf4a7039773ca79651877dcbf321667de55e9d8 (diff) |
merge r11220 from trunk to branch 2.2
bug:2326
Mysql error on picture_modify if tag input is empty.
git-svn-id: http://piwigo.org/svn/branches/2.2@11221 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin')
-rw-r--r-- | admin/batch_manager_unit.php | 7 | ||||
-rw-r--r-- | admin/picture_modify.php | 2 |
2 files changed, 3 insertions, 6 deletions
diff --git a/admin/batch_manager_unit.php b/admin/batch_manager_unit.php index 84eed53b1..a009a6843 100644 --- a/admin/batch_manager_unit.php +++ b/admin/batch_manager_unit.php @@ -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']); } diff --git a/admin/picture_modify.php b/admin/picture_modify.php index 97bff6e5e..779197f0c 100644 --- a/admin/picture_modify.php +++ b/admin/picture_modify.php @@ -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']); } |