From 4463766a78e80bc26828a56081d78b1f33a65417 Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Tue, 17 Jan 2023 00:01:58 +0100 Subject: [PATCH] fix namespace on disabled plugin --- _uninstall.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/_uninstall.php b/_uninstall.php index 3ba4e4e..c0cde26 100644 --- a/_uninstall.php +++ b/_uninstall.php @@ -13,6 +13,12 @@ declare(strict_types=1); $uninstall = implode('\\', ['Dotclear', 'Plugin', basename(__DIR__), 'Uninstall']); + +// cope with disabled plugin +if (!class_exists($uninstall)) { + require implode(DIRECTORY_SEPARATOR, [__DIR__, 'inc', 'Uninstall.php']); +} + if ($uninstall::init()) { $uninstall::process($this); }