From b96649aa62e36bd04fa40d111209468a8f1c4ed7 Mon Sep 17 00:00:00 2001 From: Olle Harstedt Date: Thu, 25 Feb 2021 12:46:58 +0100 Subject: [PATCH] Dev: Add needed empty constructor --- .../libraries/PluginManager/Storage/DbStorage.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/application/libraries/PluginManager/Storage/DbStorage.php b/application/libraries/PluginManager/Storage/DbStorage.php index 411aff30730..33bb2d9ef18 100644 --- a/application/libraries/PluginManager/Storage/DbStorage.php +++ b/application/libraries/PluginManager/Storage/DbStorage.php @@ -6,6 +6,13 @@ class DbStorage implements iPluginStorage { + /** + * NB: Needed even if empty. + */ + public function __construct() + { + } + /** * @param iPlugin $plugin * @param string $key Key for the setting; passing null will return all keys. @@ -43,7 +50,7 @@ protected function getGeneric(iPlugin $plugin, $key, $model, $id, $default) if ($key != null) { $attributes['key'] = $key; } - + $records = \PluginSetting::model()->findAllByAttributes($attributes); if (count($records) > 1) { foreach ($records as $record) { @@ -104,7 +111,7 @@ protected function setGeneric(iPlugin $plugin, $key, $data, $model, $id, $langua } $record->value = json_encode($data); $result = $record->save(); - + return $result; } }