]> git.mxchange.org Git - friendica.git/commitdiff
Making redirect message more informative
authorPhilipp Holzer <admin@philipp.info>
Tue, 23 Oct 2018 10:17:41 +0000 (12:17 +0200)
committerPhilipp Holzer <admin@philipp.info>
Tue, 23 Oct 2018 10:17:41 +0000 (12:17 +0200)
src/App.php
src/Core/System.php
tests/src/Core/SystemTest.php

index 8cd3b74f99483a11f5a009cbfb402280016257b2..0ba82077985774e9728d03afc27d17758a7a0e67 100644 (file)
@@ -2000,7 +2000,7 @@ class App
        public function internalRedirect($toUrl = '', $ssl = false)
        {
                if (filter_var($toUrl, FILTER_VALIDATE_URL)) {
-                       throw new InternalServerErrorException('URL is not a relative path, please use System::externalRedirectTo');
+                       throw new InternalServerErrorException("'$toUrl is not a relative path, please use System::externalRedirectTo");
                }
 
                $redirectTo = $this->getBaseURL($ssl) . '/' . ltrim($toUrl, '/');
index e071866ee9bb54845ca0c1d2a2107cd11634777a..6079d9e22855d922a3072f9b06804725b5012872 100644 (file)
@@ -247,7 +247,7 @@ class System extends BaseObject
        public static function externalRedirect($url)
        {
                if (!filter_var($url, FILTER_VALIDATE_URL)) {
-                       throw new InternalServerErrorException('URL is not a fully qualified URL, please use App->internalRedirect() instead');
+                       throw new InternalServerErrorException("'$url' is not a fully qualified URL, please use App->internalRedirect() instead");
                }
 
                header("Location: $url");
index b85bce44cb87df88d750c7ad386461230a47ab98..6b0781198a52ee828121771141c9f3cf4f4ac014 100644 (file)
@@ -34,4 +34,4 @@ class SystemTest extends TestCase
                $guid = System::createGUID(23, 'test');
                $this->assertGuid($guid, 23, 'test');
        }
-}
\ No newline at end of file
+}