fix: [internal] Handle tags passed via parameters not encapsulated in an array

pull/3608/head
iglocska 2018-08-21 16:05:36 +02:00
parent 4b67140c62
commit ce8ee288ab
1 changed files with 3 additions and 0 deletions

View File

@ -196,6 +196,9 @@ class Tag extends AppModel
{
$ids = array();
$tag_ids = array();
if (!is_array($array)) {
$array = array($array);
}
foreach ($array as $k => $tag) {
if (is_numeric($tag)) {
$tag_ids[] = $tag;