]> git.mxchange.org Git - friendica.git/commitdiff
remove requirement for DI::app() in addon_install()
authorArt4 <art4@wlabs.de>
Sat, 23 Nov 2024 08:38:37 +0000 (08:38 +0000)
committerArt4 <art4@wlabs.de>
Sat, 23 Nov 2024 08:38:37 +0000 (08:38 +0000)
see https://github.com/friendica/friendica-addons/pull/1364

src/Core/Addon.php

index e202d130ecce5909c284f84af13e59f80e1966d4..8ed5cc8512476e65c5297de5e6cdc8b759d6fd41 100644 (file)
@@ -155,7 +155,12 @@ class Addon
                @include_once($addon_file_path);
                if (function_exists($addon . '_install')) {
                        $func = $addon . '_install';
-                       $func(DI::app());
+
+                       // Addon webdav_storage has an unused but required parameter.
+                       // @TODO: Remove $param after the required parameter is removed.
+                       // See https://github.com/friendica/friendica-addons/pull/1364
+                       $param = null;
+                       $func($param);
                }
 
                DI::config()->set('addons', $addon, [