Etemplate - avoid error if child is not a widget

though it never should be...
This commit is contained in:
nathangray 2019-08-02 10:33:38 -06:00
parent 11e145967e
commit 1f63996a2c

View File

@ -92,8 +92,11 @@ class Box extends Etemplate\Widget
{
break;
}
//error_log('Running ' . $method_name . ' on child ' . $n . '(' . $child . ') ['.$expand['row'] . ','.$expand['c'] . ']');
$disabled = $child->run($method_name, $params, $respect_disabled, $columns_disabled) === false;
if($child && $child instanceof Widget)
{
//error_log('Running ' . $method_name . ' on child ' . $n . '(' . $child . ') ['.$expand['row'] . ','.$expand['c'] . ']');
$disabled = $child->run($method_name, $params, $respect_disabled, $columns_disabled) === false;
}
}
$params[0] = $old_cname;