Skip to content

Commit

Permalink
merge r22301 from branch 2.5 to trunk
Browse files Browse the repository at this point in the history
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/trunk@22302 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information
plegall committed Apr 19, 2013
1 parent 0a6928b commit c6606fd
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion include/ws_functions.inc.php
Expand Up @@ -2620,7 +2620,17 @@ function ws_images_setInfo($params, &$service)
// 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'])
{
Expand Down

0 comments on commit c6606fd

Please sign in to comment.