From d42d4ac14d42a09052444e9c4170e2304f0e7601 Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Sun, 12 Sep 2021 10:52:45 +0200 Subject: [PATCH] opps stage all files is better --- dcstore.xml | 4 ++-- inc/class.improve.action.php | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) 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