From: Hypolite Petovan Date: Fri, 10 May 2024 15:24:37 +0000 (-0400) Subject: Add support for absolute file paths when removing addon X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=42c3faa450714f39ba3dbf3f187b834993f8c5f5;p=friendica.git Add support for absolute file paths when removing addon - This handles a rare case where absolute addon file paths were saved to the hook table --- diff --git a/src/Core/Addon.php b/src/Core/Addon.php index 1fa14d0919..960f5a88e7 100644 --- a/src/Core/Addon.php +++ b/src/Core/Addon.php @@ -140,7 +140,8 @@ class Addon $func(); } - Hook::delete(['file' => 'addon/' . $addon . '/' . $addon . '.php']); + // Handles both relative and absolute file paths + Hook::delete(['`file` LIKE ?', "%addon/$addon/$addon.php"]); unset(self::$addons[array_search($addon, self::$addons)]); }