Commit b7f03ff5 authored by Franco Fichtner's avatar Franco Fichtner

firmware: check the right thing before accessing

parent 693413d8
......@@ -57,7 +57,7 @@ class FirmwareController extends ApiControllerBase
} elseif (array_key_exists("updates", $response) && $response['updates'] == 0) {
$response["status"] = "none";
$response["status_msg"] = "no updates found";
} elseif (array_key_exists("updates", $response) && $response["upgrade_packages"][0]["name"] == "pkg") {
} elseif (array_key_exists(0, $response["upgrade_packages"]) && $response["upgrade_packages"][0]["name"] == "pkg") {
$response["status"] = "ok";
$response["status_upgrade_action"] = "pkg";
$response["status_msg"] = "There is a mandatory update for the package manager. ".
......
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