Commit 09362f17 authored by Ad Schellevis's avatar Ad Schellevis

(crashreport) PHP Warning: Invalid argument supplied for foreach() in...

(crashreport) PHP Warning:  Invalid argument supplied for foreach() in /usr/local/opnsense/mvc/app/models/OPNsense/Base/FieldTypes/ConfigdActionsField.php on line 92
parent 9078d7a9
...@@ -80,6 +80,8 @@ class ConfigdActionsField extends BaseField ...@@ -80,6 +80,8 @@ class ConfigdActionsField extends BaseField
$actions = json_decode($response, true); $actions = json_decode($response, true);
if (is_array($actions)) { if (is_array($actions)) {
file_put_contents($service_tempfile, $response); file_put_contents($service_tempfile, $response);
} else {
$actions = array();
} }
} else { } else {
$actions = json_decode(file_get_contents($service_tempfile), true); $actions = json_decode(file_get_contents($service_tempfile), true);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment