mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-08-26 17:56:29 +00:00
provide defaults for unused function parameters (fixes #155)
PHP 7.1 throws an exception when a user-defined function is called with too few arguments: http://php.net/manual/en/migration71.incompatible.php As explained in the comments, collection_privilege_format_function and principal_privilege_format_function take three arguments because of their use as a rendering callback, however the latter two of them are never used and thus can be ommitted in other uses.
This commit is contained in:
parent
0023b066fd
commit
19eb79ebf9
@ -190,7 +190,7 @@ $privilege_xlate = array(
|
||||
* @param dbrow $row The row object we read from the database.
|
||||
* @return string The formatted privileges.
|
||||
*/
|
||||
function collection_privilege_format_function( $value, $column, $row ) {
|
||||
function collection_privilege_format_function( $value, $column = NULL, $row = NULL ) {
|
||||
global $privilege_xlate;
|
||||
|
||||
$privs = bits_to_privilege($value, 'calendar');
|
||||
|
||||
@ -454,7 +454,7 @@ EOTEMPLATE;
|
||||
* @param dbrow $row The row object we read from the database.
|
||||
* @return string The formatted privileges.
|
||||
*/
|
||||
function principal_privilege_format_function( $value, $column, $row ) {
|
||||
function principal_privilege_format_function( $value, $column = NULL, $row = NULL ) {
|
||||
global $privilege_xlate;
|
||||
|
||||
$privs = bits_to_privilege($value,'*');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user