Check whether the filter key is a valid class name before assuming that value is class settings

This commit is contained in:
wisoot 2014-09-15 15:29:30 +10:00
parent 1e29070d55
commit eb14a64d0b
2 changed files with 11 additions and 1 deletions

View file

@ -97,7 +97,7 @@ class Dispatcher implements CakeEventListener {
foreach ($filters as $index => $filter) {
$settings = array();
if (is_array($filter) && !is_int($index)) {
if (is_array($filter) && !is_int($index) && class_exists($index)) {
$settings = $filter;
$filter = $index;
}