diff --git a/dcstore.xml b/dcstore.xml index 137ac1e..dc65fc4 100644 --- a/dcstore.xml +++ b/dcstore.xml @@ -1,10 +1,10 @@ improve -0.1 +0.1.1 Jean-Christian Denis and contributors Tiny tools to fix things for module devs -https://github.com/JcDenis/improve/releases/download/v0.1/plugin-improve.zip +https://github.com/JcDenis/improve/releases/download/v0.1.1/plugin-improve.zip 2.19 https://github.com/JcDenis/improve https://github.com/JcDenis/improve diff --git a/inc/class.improve.action.php b/inc/class.improve.action.php index 4856ddb..9edfa0c 100644 --- a/inc/class.improve.action.php +++ b/inc/class.improve.action.php @@ -101,7 +101,7 @@ abstract class ImproveAction return $this->preferences[$preference] ?? null; } - final protected function setPreferences $preference, $value = null) + final protected function setPreferences($preference, $value = null) { $preferences = is_array($preference) ? $preference : [$preference => $value]; foreach($preferences as $k => $v) { @@ -131,7 +131,8 @@ abstract class ImproveAction public static function create(arrayObject $o, dcCore $core) { - $o->append(new ${get_called_class()}($core)); + $c = get_called_class(); + $o->append(new $c($core)); } public function configure(string $redirect_url): ?string