diff options
| author | Moritz Strohm <strohm@data-quest.de> | 2022-09-28 14:24:20 +0000 |
|---|---|---|
| committer | Moritz Strohm <strohm@data-quest.de> | 2022-09-28 14:24:20 +0000 |
| commit | e75c08bedd60a6674d22ce3e2ec57b5a5f1d85eb (patch) | |
| tree | 2d9cf000153360bdc9e1841693406f3a3b1d58ae /lib/plugins | |
| parent | 1e6f3d59c1989dc0da68d3200090cb4768ab3094 (diff) | |
fix for BIESt #1118
Merge request studip/studip!676
Diffstat (limited to 'lib/plugins')
| -rw-r--r-- | lib/plugins/engine/PluginManager.class.php | 6 | ||||
| -rw-r--r-- | lib/plugins/engine/PluginRepository.class.php | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/plugins/engine/PluginManager.class.php b/lib/plugins/engine/PluginManager.class.php index 7193f31..7ced174 100644 --- a/lib/plugins/engine/PluginManager.class.php +++ b/lib/plugins/engine/PluginManager.class.php @@ -657,9 +657,9 @@ class PluginManager } foreach ($manifest as $line) { - list($key, $value) = explode('=', $line); - $key = trim($key); - $value = trim($value); + $key_and_value = explode('=', $line); + $key = trim($key_and_value[0]); + $value = trim($key_and_value[1] ?? ''); // skip empty lines and comments if ($key === '' || $key[0] === '#') { diff --git a/lib/plugins/engine/PluginRepository.class.php b/lib/plugins/engine/PluginRepository.class.php index ef09a6c..14415f4 100644 --- a/lib/plugins/engine/PluginRepository.class.php +++ b/lib/plugins/engine/PluginRepository.class.php @@ -116,7 +116,7 @@ class PluginRepository */ protected function registerPlugin($name, $meta_data) { - $old_data = $this->plugins[$name]; + $old_data = $this->plugins[$name] ?? null; if (!isset($old_data) || version_compare($meta_data['version'], $old_data['version']) > 0) { @@ -132,7 +132,7 @@ class PluginRepository */ public function getPlugin($name) { - return $this->plugins[$name]; + return $this->plugins[$name] ?? null; } /** |
