We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b836ff2 commit dcd069fCopy full SHA for dcd069f
1 file changed
LibreNMS/Alerting/QueryBuilderParser.php
@@ -134,12 +134,11 @@ protected function findTablesRecursive($rules)
134
135
/**
136
* Initialize this from json generated by jQuery QueryBuilder
137
- *
138
- * @param string|array $json
139
- * @return static
140
*/
141
- public static function fromJson($json)
+ public static function fromJson(array|string|null $json): static
142
{
+ $json ??= [];
+
143
if (! is_array($json)) {
144
$json = json_decode($json, true) ?: [];
145
}
0 commit comments