]> git.mxchange.org Git - friendica.git/commitdiff
Refactor dependency for $_GET
authorArt4 <art4@wlabs.de>
Mon, 23 Dec 2024 14:18:22 +0000 (14:18 +0000)
committerArt4 <art4@wlabs.de>
Mon, 23 Dec 2024 14:18:22 +0000 (14:18 +0000)
static/dependencies.config.php

index a7c2862005bfefc97bc3fc69a8e014bf3904b003..54cd504e3c3b49ab57bb5dc4a75cabe1df26e774 100644 (file)
@@ -37,7 +37,7 @@ use Friendica\Model\Log\ParsedLogIterator;
 use Friendica\Network;
 use Friendica\Util;
 
-return (function(array $serverVars): array {
+return (function(array $getVars, array $serverVars): array {
        /**
         * @var string $basepath The base path of the Friendica installation without trailing slash
         */
@@ -150,7 +150,7 @@ return (function(array $serverVars): array {
         * Creates the \Friendica\App\BaseURL
         *
         * Same as:
-        *   $baseURL = new \Friendica\App\BaseURL($configuration, $_SERVER);
+        *   $baseURL = new \Friendica\App\BaseURL($configuration, $);
         */
        \Friendica\App\BaseURL::class             => [
                'constructParams' => [
@@ -227,7 +227,7 @@ return (function(array $serverVars): array {
        \Friendica\App\Arguments::class => [
                'instanceOf' => \Friendica\App\Arguments::class,
                'call' => [
-                       ['determine', [$serverVars, $_GET], Dice::CHAIN_CALL],
+                       ['determine', [$serverVars, $getVars], Dice::CHAIN_CALL],
                ],
        ],
        \Friendica\Core\System::class => [
@@ -245,7 +245,7 @@ return (function(array $serverVars): array {
        ],
        L10n::class => [
                'constructParams' => [
-                       $serverVars, $_GET
+                       $serverVars, $getVars
                ],
        ],
        IHandleSessions::class => [
@@ -307,8 +307,8 @@ return (function(array $serverVars): array {
        \Friendica\Module\Api\ApiResponse::class => [
                'constructParams' => [
                        $serverVars,
-                       $_GET['callback'] ?? '',
+                       $getVars['callback'] ?? '',
                ],
        ],
        ];
-})($_SERVER);
+})($_GET, $_SERVER);