Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
752b7cf9
Commit
752b7cf9
authored
Feb 20, 2014
by
Alexander Makarov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes #2502: Unclear error message when `$_SERVER['DOCUMENT_ROOT']` is empty
parent
1c9cfc01
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
1 deletion
+2
-1
CHANGELOG.md
framework/CHANGELOG.md
+1
-0
Request.php
framework/web/Request.php
+1
-1
No files found.
framework/CHANGELOG.md
View file @
752b7cf9
...
...
@@ -46,6 +46,7 @@ Yii Framework 2 Change Log
-
Bug #2303: Fixed the bug that
`yii\base\Theme::pathMap`
did not support dynamic update with path aliases (qiangxue)
-
Bug #2324: Fixed QueryBuilder bug when building a query with "query" option (mintao)
-
Bug #2399: Fixed the bug that AssetBundle did not handle relative URLs correctly (qiangxue)
-
Bug #2502: Unclear error message when
`$_SERVER['DOCUMENT_ROOT']`
is empty (samdark)
-
Bug: Fixed
`Call to a member function registerAssetFiles() on a non-object`
in case of wrong
`sourcePath`
for an asset bundle (samdark)
-
Bug: Fixed incorrect event name for
`yii\jui\Spinner`
(samdark)
-
Bug: Json::encode() did not handle objects that implement JsonSerializable interface correctly (cebe)
...
...
framework/web/Request.php
View file @
752b7cf9
...
...
@@ -547,7 +547,7 @@ class Request extends \yii\base\Request
$this
->
_scriptUrl
=
$_SERVER
[
'ORIG_SCRIPT_NAME'
];
}
elseif
((
$pos
=
strpos
(
$_SERVER
[
'PHP_SELF'
],
'/'
.
$scriptName
))
!==
false
)
{
$this
->
_scriptUrl
=
substr
(
$_SERVER
[
'SCRIPT_NAME'
],
0
,
$pos
)
.
'/'
.
$scriptName
;
}
elseif
(
isset
(
$_SERVER
[
'DOCUMENT_ROOT'
])
&&
strpos
(
$scriptFile
,
$_SERVER
[
'DOCUMENT_ROOT'
])
===
0
)
{
}
elseif
(
!
empty
(
$_SERVER
[
'DOCUMENT_ROOT'
])
&&
strpos
(
$scriptFile
,
$_SERVER
[
'DOCUMENT_ROOT'
])
===
0
)
{
$this
->
_scriptUrl
=
str_replace
(
'\\'
,
'/'
,
str_replace
(
$_SERVER
[
'DOCUMENT_ROOT'
],
''
,
$scriptFile
));
}
else
{
throw
new
InvalidConfigException
(
'Unable to determine the entry script URL.'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment