summaryrefslogtreecommitdiffstats
path: root/modules-available/rebootcontrol
diff options
context:
space:
mode:
authorSimon Rettberg2022-05-13 11:49:53 +0200
committerSimon Rettberg2022-05-13 11:49:53 +0200
commita79c96cf641b053a8a245e4fab7f8d25df2f9052 (patch)
tree7f1d232651d678d87301e95e8b086b9e099f725c /modules-available/rebootcontrol
parent[news] Fix news display: Load locations module before using it (diff)
downloadslx-admin-a79c96cf641b053a8a245e4fab7f8d25df2f9052.tar.gz
slx-admin-a79c96cf641b053a8a245e4fab7f8d25df2f9052.tar.xz
slx-admin-a79c96cf641b053a8a245e4fab7f8d25df2f9052.zip
[rebootcontrol] Optional parameter should default to null
Otherwise, passing an undefined variable results in an error
Diffstat (limited to 'modules-available/rebootcontrol')
-rw-r--r--modules-available/rebootcontrol/inc/rebootcontrol.inc.php4
1 files changed, 2 insertions, 2 deletions
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 = [];