mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-14 08:34:39 +00:00
firmware: check the right thing before accessing
This commit is contained in:
parent
693413d80a
commit
b7f03ff5ae
@ -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. ".
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user