Ошибка после чистой установки версии 2.16.1 и включения отладки.
Warning: Invalid argument supplied for foreach() in W:\OpenServer_5.4.3\domains\instantcms.loc\system\controllers\content\model.php on line 2187
Как решить?
public function getDraftCounts($user_id){ $ctypes = $this->getContentTypes(); foreach($ctypes as $ctype){ $this->useCache("content.list.{$ctype['name']}"); $this->filterEqual('user_id', $user_id); $this->filterEqual('is_approved', 0); $this->disableApprovedFilter(); $this->disablePubFilter(); $this->disablePrivacyFilter(); $this->joinExcludingLeft('moderators_tasks', 't', 't.item_id', 'i.id', "t.ctype_name = '{$ctype['name']}'"); $count = $this->getContentItemsCount($ctype['name']); $this->resetFilters(); if ($count) { $counts[ $ctype['name'] ] = $count; } } return $counts; }