]> git.mxchange.org Git - friendica.git/commitdiff
Add support for absolute file paths when removing addon
authorHypolite Petovan <hypolite@mrpetovan.com>
Fri, 10 May 2024 15:24:37 +0000 (11:24 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Sat, 11 May 2024 00:34:47 +0000 (20:34 -0400)
- This handles a rare case where absolute addon file paths were saved to the hook table

src/Core/Addon.php

index 1fa14d09190a956fe9c237ac78efff4b2a813c21..960f5a88e7d82020a5e3d10098ef19b154658e28 100644 (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)]);
        }