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
882a6116
Commit
882a6116
authored
May 09, 2013
by
Suralc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed static variable from autoload per qiangxue's suggestion
parent
bac5c0e7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
6 deletions
+1
-6
YiiBase.php
framework/YiiBase.php
+1
-6
No files found.
framework/YiiBase.php
View file @
882a6116
...
@@ -332,11 +332,6 @@ class YiiBase
...
@@ -332,11 +332,6 @@ class YiiBase
*/
*/
public
static
function
autoload
(
$className
)
public
static
function
autoload
(
$className
)
{
{
static
$hasTraitFunctionality
;
if
(
$hasTraitFunctionality
===
null
)
{
$hasTraitFunctionality
=
function_exists
(
'trait_exists'
);
}
$className
=
ltrim
(
$className
,
'\\'
);
$className
=
ltrim
(
$className
,
'\\'
);
if
(
isset
(
self
::
$classMap
[
$className
]))
{
if
(
isset
(
self
::
$classMap
[
$className
]))
{
...
@@ -376,7 +371,7 @@ class YiiBase
...
@@ -376,7 +371,7 @@ class YiiBase
include
(
$classFile
);
include
(
$classFile
);
if
(
class_exists
(
$className
,
false
)
||
interface_exists
(
$className
,
false
)
||
if
(
class_exists
(
$className
,
false
)
||
interface_exists
(
$className
,
false
)
||
(
$hasTraitFunctionality
===
true
&&
trait_exists
(
$className
,
false
)
))
{
function_exists
(
'trait_exists'
)
&&
trait_exists
(
$className
,
false
))
{
return
true
;
return
true
;
}
else
{
}
else
{
throw
new
UnknownClassException
(
"Unable to find '
$className
' in file:
$classFile
"
);
throw
new
UnknownClassException
(
"Unable to find '
$className
' in file:
$classFile
"
);
...
...
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