Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/bareos/bareos.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/webui
diff options
context:
space:
mode:
authorFrank Bergkemper <frank.bergkemper@bareos.com>2022-03-03 17:07:43 +0300
committerFrank Bergkemper <frank.bergkemper@bareos.com>2022-03-03 17:07:43 +0300
commit998e4277b130076d43ecf6d61128c1275f5382c4 (patch)
tree5f7c50e74d9e3a14acfe92cf5a7e484c4ee4b0b5 /webui
parentf07e6e9180535dc2d5f27c7ee2bc69704cb38f62 (diff)
webui: fix undefined array key warning
This PR fixes the issue that a PHP warning is thrown because of a missing check if the array key exists.
Diffstat (limited to 'webui')
-rw-r--r--webui/module/Pool/src/Pool/Model/PoolModel.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/webui/module/Pool/src/Pool/Model/PoolModel.php b/webui/module/Pool/src/Pool/Model/PoolModel.php
index d1e2d8ea9..2186e5d32 100644
--- a/webui/module/Pool/src/Pool/Model/PoolModel.php
+++ b/webui/module/Pool/src/Pool/Model/PoolModel.php
@@ -149,7 +149,11 @@ class PoolModel
$matches = [];
preg_match('/\s*Next\s*Pool\s*=\s*("|\')?(?<value>.*)(?(1)\1|)/i', $result, $matches);
- return $matches["value"];
+ if(array_key_exists('value', $matches)) {
+ return $matches["value"];
+ } else {
+ return null;
+ }
}
else {
throw new \Exception('Missing argument.');