mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 23:00:56 +01:00
fix PHP 8.0 errors around ACL dialog and policy:
- bitwise AND operator gives TypeError if both values are neither a number nor a numeric string, eg: null, "run" - Etemplate::setElementAttribute() must NOT be called before instantiating an Etemplate object, you will get fatal error otherwise, because no request object
This commit is contained in:
parent
d43c27a31b
commit
fac81f660d
@ -1044,6 +1044,10 @@ class Widget
|
|||||||
*/
|
*/
|
||||||
public static function &setElementAttribute($name,$attr,$val)
|
public static function &setElementAttribute($name,$attr,$val)
|
||||||
{
|
{
|
||||||
|
if (!isset(self::$request))
|
||||||
|
{
|
||||||
|
throw new \Exception(__METHOD__."('$name', '$attr', ".json_encode($val)." called before instanciating Api\Etemplate!");
|
||||||
|
}
|
||||||
//error_log(__METHOD__."('$name', '$attr', ...) request=".get_class(self::$request).", response=".get_class(self::$response).function_backtrace());
|
//error_log(__METHOD__."('$name', '$attr', ...) request=".get_class(self::$request).", response=".get_class(self::$response).function_backtrace());
|
||||||
$ref =& self::$request->modifications[$name][$attr];
|
$ref =& self::$request->modifications[$name][$attr];
|
||||||
if(self::$request && self::$response)
|
if(self::$request && self::$response)
|
||||||
|
@ -839,7 +839,7 @@ class Select extends Etemplate\Widget
|
|||||||
}
|
}
|
||||||
foreach((array)$options as $right => $name)
|
foreach((array)$options as $right => $name)
|
||||||
{
|
{
|
||||||
if(!!($value & $right))
|
if (!!((int)$value & (int)$right))
|
||||||
{
|
{
|
||||||
$new_value[] = $right;
|
$new_value[] = $right;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user