mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-16 01:24:38 +00:00
skip reading when firmware-product doesn't exist, avoids issues when running stand-alone for https://github.com/opnsense/ui_devtools/issues/3
This commit is contained in:
parent
b6b3a5ad1d
commit
18dcbcbd72
@ -187,9 +187,11 @@ class ControllerBase extends ControllerRoot
|
||||
$this->view->ui_theme = $cnf->object()->theme;
|
||||
}
|
||||
|
||||
$product_vars = json_decode(file_get_contents(__DIR__.'/../../../../../firmware-product'), true);
|
||||
foreach ($product_vars as $product_key => $product_var) {
|
||||
$this->view->$product_key = $product_var;
|
||||
if (is_file(__DIR__.'/../../../../../firmware-product')) {
|
||||
$product_vars = json_decode(file_get_contents(__DIR__.'/../../../../../firmware-product'), true);
|
||||
foreach ($product_vars as $product_key => $product_var) {
|
||||
$this->view->$product_key = $product_var;
|
||||
}
|
||||
}
|
||||
|
||||
// info about the current user and box
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user