fix: [bug] Fixed an invalid count() call on the taxonomies index

pull/3501/head
iglocska 2018-07-18 14:31:54 +02:00
parent 65816f271e
commit d91c85998b
1 changed files with 1 additions and 1 deletions

View File

@ -52,7 +52,7 @@ class TaxonomiesController extends AppController {
$taxonomy = $this->Taxonomy->getTaxonomy($id, array('full' => true, 'filter' => $filter));
if (empty($taxonomy)) throw new NotFoundException('Taxonomy not found.');
foreach ($taxonomy['entries'] as $key => $value) {
$taxonomy['entries'][$key]['events'] = count($value['existing_tag']['EventTag']);
$taxonomy['entries'][$key]['events'] = empty($value['existing_tag']) ? 0 : count($value['existing_tag']['EventTag']);
}
$this->set('filter', $filter);
$customPagination = new CustomPaginationTool();