Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 916378e

Browse filesBrowse files
fabpottidal
authored andcommitted
[RequestHandler] fixed warning when baseUrl is empty
1 parent 2e6692a commit 916378e
Copy full SHA for 916378e

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed

‎src/Symfony/Components/RequestHandler/Request.php

Copy file name to clipboardExpand all lines: src/Symfony/Components/RequestHandler/Request.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -642,13 +642,13 @@ protected function prepareBaseUrl()
642642
// Does the baseUrl have anything in common with the request_uri?
643643
$requestUri = $this->getRequestUri();
644644

645-
if (0 === strpos($requestUri, $baseUrl))
645+
if ($baseUrl && 0 === strpos($requestUri, $baseUrl))
646646
{
647647
// full $baseUrl matches
648648
return $baseUrl;
649649
}
650650

651-
if (0 === strpos($requestUri, dirname($baseUrl)))
651+
if ($baseUrl && 0 === strpos($requestUri, dirname($baseUrl)))
652652
{
653653
// directory portion of $baseUrl matches
654654
return rtrim(dirname($baseUrl), '/');

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.