check for class_exists in State
This commit is contained in:
parent
69390d4c59
commit
c83b5a03f9
@ -8,9 +8,9 @@ class State {
|
||||
$res = \SYSTEM\DBD\SYS_PAGE_GROUP::QQ(array($group));
|
||||
while($row = $res->next()){
|
||||
$row['css'] = $row['js'] = array();
|
||||
if(\method_exists($row['php_class'], 'css') && \is_callable($row['php_class'].'::css')){
|
||||
if(\class_exists($row['php_class']) && \method_exists($row['php_class'], 'css') && \is_callable($row['php_class'].'::css')){
|
||||
$row['css'] = array_merge($row['css'], call_user_func($row['php_class'].'::css'));}
|
||||
if(\method_exists($row['php_class'], 'js') && \is_callable($row['php_class'].'::js')){
|
||||
if(\class_exists($row['php_class']) && \method_exists($row['php_class'], 'js') && \is_callable($row['php_class'].'::js')){
|
||||
$row['js'] = array_merge($row['js'], call_user_func($row['php_class'].'::js'));}
|
||||
$result[] = $row;}
|
||||
return \SYSTEM\LOG\JsonResult::toString($result);}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user