Skip to content

Commit

Permalink
Dev: Add needed empty constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed Feb 25, 2021
1 parent 4eaffaa commit b96649a
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions application/libraries/PluginManager/Storage/DbStorage.php
Expand Up @@ -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.
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -104,7 +111,7 @@ protected function setGeneric(iPlugin $plugin, $key, $data, $model, $id, $langua
}
$record->value = json_encode($data);
$result = $record->save();

return $result;
}
}

0 comments on commit b96649a

Please sign in to comment.