From a79c96cf641b053a8a245e4fab7f8d25df2f9052 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Fri, 13 May 2022 11:49:53 +0200 Subject: [rebootcontrol] Optional parameter should default to null Otherwise, passing an undefined variable results in an error --- modules-available/rebootcontrol/inc/rebootcontrol.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules-available') diff --git a/modules-available/rebootcontrol/inc/rebootcontrol.inc.php b/modules-available/rebootcontrol/inc/rebootcontrol.inc.php index 19590670..8269b8df 100644 --- a/modules-available/rebootcontrol/inc/rebootcontrol.inc.php +++ b/modules-available/rebootcontrol/inc/rebootcontrol.inc.php @@ -305,10 +305,10 @@ class RebootControl /** * @param array $clientList list of clients containing each keys 'macaddr' and 'clientip' - * @param array $failed list of failed clients from $clientList + * @param ?array $failed list of failed clients from $clientList * @return ?string taskid of this job */ - public static function wakeMachines(array $clientList, array &$failed = []) + public static function wakeMachines(array $clientList, array &$failed = null) { $errors = ''; $sent = $unknown = $unreachable = []; -- cgit v1.2.3-55-g7522