mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-01-28 00:43:37 +00:00
Ensure we give bindec a value
Resolves this warning in PHP 7.4.0: Deprecated: bindec(): Passing null to parameter #1 ($binary_string) of type string is deprecated in /usr/share/davical/inc/ui/principal-edit.php on line 412
This commit is contained in:
parent
62441f7705
commit
27ff697d55
@ -409,7 +409,8 @@ function build_privileges_html( $ed, $fname ) {
|
||||
$btn_sd = htmlspecialchars(translate('Schedule Deliver')); $btn_sd_title = htmlspecialchars(translate('Privileges to allow delivery of scheduling messages'));
|
||||
$btn_ss = htmlspecialchars(translate('Schedule Send')); $btn_ss_title = htmlspecialchars(translate('Privileges to delegate scheduling decisions'));
|
||||
|
||||
$privs_dec = bindec($ed->Value($fname));
|
||||
$privs = $ed->Value($fname);
|
||||
$privs_dec = isset($privs) ? bindec($privs) : 0;
|
||||
$privileges_set = sprintf('<div id="privileges"><input type="hidden" name="%s[fake_privilege_for_input]" value="0">%s', $fname, "\n");
|
||||
for( $i=0; $i < count($privilege_names); $i++ ) {
|
||||
$privilege_set = ( (1 << $i) & $privs_dec ? ' CHECKED' : '');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user