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
ec3aadff
Commit
ec3aadff
authored
Mar 26, 2014
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes #2862: Using `DbCache` while enabling schema caching may cause infinite loops
parent
f3c26d3c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
CHANGELOG.md
framework/CHANGELOG.md
+1
-0
Schema.php
framework/db/Schema.php
+5
-3
No files found.
framework/CHANGELOG.md
View file @
ec3aadff
...
@@ -62,6 +62,7 @@ Yii Framework 2 Change Log
...
@@ -62,6 +62,7 @@ Yii Framework 2 Change Log
-
Bug #2760: Fixed GridView
`filterUrl`
parameters (qiangxue, AlexGx)
-
Bug #2760: Fixed GridView
`filterUrl`
parameters (qiangxue, AlexGx)
-
Bug #2834: When overriding i18n translation sources from config using
`app*`
or
`yii*`
default
`app`
and
`yii`
sources were not removed (samdark)
-
Bug #2834: When overriding i18n translation sources from config using
`app*`
or
`yii*`
default
`app`
and
`yii`
sources were not removed (samdark)
-
Bug #2848: Individual queries should be enclosed within parenthesis in a UNION query (qiangxue)
-
Bug #2848: Individual queries should be enclosed within parenthesis in a UNION query (qiangxue)
-
Bug #2862: Using
`DbCache`
while enabling schema caching may cause infinite loops (qiangxue)
-
Bug: Fixed
`Call to a member function registerAssetFiles() on a non-object`
in case of wrong
`sourcePath`
for an asset bundle (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: Fixed incorrect event name for
`yii\jui\Spinner`
(samdark)
-
Bug: Json::encode() did not handle objects that implement JsonSerializable interface correctly (cebe)
-
Bug: Json::encode() did not handle objects that implement JsonSerializable interface correctly (cebe)
...
...
framework/db/Schema.php
View file @
ec3aadff
...
@@ -87,7 +87,7 @@ abstract class Schema extends Object
...
@@ -87,7 +87,7 @@ abstract class Schema extends Object
*/
*/
public
function
getTableSchema
(
$name
,
$refresh
=
false
)
public
function
getTableSchema
(
$name
,
$refresh
=
false
)
{
{
if
(
isset
(
$this
->
_tables
[
$name
]
)
&&
!
$refresh
)
{
if
(
array_key_exists
(
$name
,
$this
->
_tables
)
&&
!
$refresh
)
{
return
$this
->
_tables
[
$name
];
return
$this
->
_tables
[
$name
];
}
}
...
@@ -100,15 +100,17 @@ abstract class Schema extends Object
...
@@ -100,15 +100,17 @@ abstract class Schema extends Object
if
(
$cache
instanceof
Cache
)
{
if
(
$cache
instanceof
Cache
)
{
$key
=
$this
->
getCacheKey
(
$name
);
$key
=
$this
->
getCacheKey
(
$name
);
if
(
$refresh
||
(
$table
=
$cache
->
get
(
$key
))
===
false
)
{
if
(
$refresh
||
(
$table
=
$cache
->
get
(
$key
))
===
false
)
{
$table
=
$this
->
loadTableSchema
(
$realName
);
$t
his
->
_tables
[
$name
]
=
$t
able
=
$this
->
loadTableSchema
(
$realName
);
if
(
$table
!==
null
)
{
if
(
$table
!==
null
)
{
$cache
->
set
(
$key
,
$table
,
$db
->
schemaCacheDuration
,
new
GroupDependency
([
$cache
->
set
(
$key
,
$table
,
$db
->
schemaCacheDuration
,
new
GroupDependency
([
'group'
=>
$this
->
getCacheGroup
(),
'group'
=>
$this
->
getCacheGroup
(),
]));
]));
}
}
}
else
{
$this
->
_tables
[
$name
]
=
$table
;
}
}
return
$this
->
_tables
[
$name
]
=
$table
;
return
$this
->
_tables
[
$name
];
}
}
}
}
...
...
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