mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-07-05 17:32:25 +02:00
bug 2892 fixed: no more error when tag_ids input parameter is empty (but
provided) on pwg.images.setInfo. git-svn-id: http://piwigo.org/svn/branches/2.5@22301 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -2620,7 +2620,17 @@ SELECT *
|
||||
// and now, let's create tag associations
|
||||
if (isset($params['tag_ids']))
|
||||
{
|
||||
$tag_ids = explode(',', $params['tag_ids']);
|
||||
$tag_ids = array();
|
||||
|
||||
foreach (explode(',', $params['tag_ids']) as $candidate)
|
||||
{
|
||||
$candidate = trim($candidate);
|
||||
|
||||
if (preg_match(PATTERN_ID, $candidate))
|
||||
{
|
||||
$tag_ids[] = $candidate;
|
||||
}
|
||||
}
|
||||
|
||||
if ('replace' == $params['multiple_value_mode'])
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user