mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 00:54:50 +01:00
Etemplate - avoid warning from method_exists if method is a callable
This commit is contained in:
parent
5a1ce9c706
commit
6f7c939d8b
@ -534,7 +534,7 @@ class Widget
|
|||||||
//error_log(__METHOD__."('$method_name', ".array2string($params).', '.array2string($respect_disabled).") $this disabled='{$this->attrs['disabled']}'=".array2string($disabled).": NOT running");
|
//error_log(__METHOD__."('$method_name', ".array2string($params).', '.array2string($respect_disabled).") $this disabled='{$this->attrs['disabled']}'=".array2string($disabled).": NOT running");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (method_exists($this, $method_name))
|
if (is_string($method_name) && method_exists($this, $method_name))
|
||||||
{
|
{
|
||||||
// Some parameter checking to avoid fatal errors
|
// Some parameter checking to avoid fatal errors
|
||||||
$call = true;
|
$call = true;
|
||||||
|
@ -60,7 +60,7 @@ class Box extends Etemplate\Widget
|
|||||||
//error_log(__METHOD__."('$method_name', ".array2string($params).', '.array2string($respect_disabled).") $this disabled='{$this->attrs['disabled']}'=".array2string($disabled).": NOT running");
|
//error_log(__METHOD__."('$method_name', ".array2string($params).', '.array2string($respect_disabled).") $this disabled='{$this->attrs['disabled']}'=".array2string($disabled).": NOT running");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (method_exists($this, $method_name))
|
if (is_string($method_name) && method_exists($this, $method_name))
|
||||||
{
|
{
|
||||||
call_user_func_array(array($this, $method_name), $params);
|
call_user_func_array(array($this, $method_name), $params);
|
||||||
}
|
}
|
||||||
|
@ -95,7 +95,7 @@ class Grid extends Box
|
|||||||
$expand['cname'] = $cname;
|
$expand['cname'] = $cname;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (method_exists($this, $method_name))
|
if (is_string($method_name) && method_exists($this, $method_name))
|
||||||
{
|
{
|
||||||
call_user_func_array(array($this, $method_name), $params);
|
call_user_func_array(array($this, $method_name), $params);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user