Merge pull request #14141 from MrPetovan/bug/14045-addon-unregistration

Add support for absolute file paths when removing addon
pull/14142/head
Michael Vogel 2024-05-11 10:46:57 +02:00 committed by GitHub
commit 5b55ba2176
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -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)]);
}