Skip to content

Commit dcd069f

Browse files
committed
Fix alerting bug handling null
1 parent b836ff2 commit dcd069f

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

LibreNMS/Alerting/QueryBuilderParser.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,12 +134,11 @@ protected function findTablesRecursive($rules)
134134

135135
/**
136136
* Initialize this from json generated by jQuery QueryBuilder
137-
*
138-
* @param string|array $json
139-
* @return static
140137
*/
141-
public static function fromJson($json)
138+
public static function fromJson(array|string|null $json): static
142139
{
140+
$json ??= [];
141+
143142
if (! is_array($json)) {
144143
$json = json_decode($json, true) ?: [];
145144
}

0 commit comments

Comments
 (0)