mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-20 03:16:12 +00:00
Lobby: Dashboard - add a safety fence in productInfoFeedAction() in case the firewall has no intrenet access.
Fixes: Error: Call to a member function children() on null in /usr/local/opnsense/mvc/app/controllers/OPNsense/Core/Api/DashboardController.php:201 Stack trace:
This commit is contained in:
parent
68ec1d79b7
commit
822df6cc69
@ -201,6 +201,9 @@ class DashboardController extends ApiControllerBase
|
||||
$output = curl_exec($ch);
|
||||
curl_close($ch);
|
||||
$payload = simplexml_load_string($output);
|
||||
if (empty($payload)) {
|
||||
return $result;
|
||||
}
|
||||
foreach ($payload->channel->children() as $key => $node) {
|
||||
if ($key == 'item') {
|
||||
$result['items'][] = [
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user