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
a56490e0
Commit
a56490e0
authored
Aug 19, 2014
by
Qiang Xue
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4750 from klimov-paul/3459-file-cache
Enh #3459 : Added logging of errors, which may occur at `yii\caching\FileCache::gc()`
parents
76b03a3f
b48e46a2
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
2 deletions
+11
-2
CHANGELOG.md
framework/CHANGELOG.md
+1
-0
ErrorHandler.php
framework/base/ErrorHandler.php
+2
-0
FileCache.php
framework/caching/FileCache.php
+8
-2
No files found.
framework/CHANGELOG.md
View file @
a56490e0
...
@@ -123,6 +123,7 @@ Yii Framework 2 Change Log
...
@@ -123,6 +123,7 @@ Yii Framework 2 Change Log
-
Enh #3380: Allow
`value`
in
`defaultValueValidator`
to be a closure (Alex-Code)
-
Enh #3380: Allow
`value`
in
`defaultValueValidator`
to be a closure (Alex-Code)
-
Enh #3384: Added callback-style transactions (leandrogehlen, Ragazzo, samdark)
-
Enh #3384: Added callback-style transactions (leandrogehlen, Ragazzo, samdark)
-
Enh #3399, #3241: Added support for MS SQL Server older than 2012 (fourteenmeister, samdark)
-
Enh #3399, #3241: Added support for MS SQL Server older than 2012 (fourteenmeister, samdark)
-
Enh #3459: Added logging of errors, which may occur at
`yii\caching\FileCache::gc()`
(klimov-paul)
-
Enh #3472: Added configurable option to encode spaces in dropDownLists and listBoxes (kartik-v)
-
Enh #3472: Added configurable option to encode spaces in dropDownLists and listBoxes (kartik-v)
-
Enh #3518:
`yii\helpers\Html::encode()`
now replaces invalid code sequences with "�" (DaSourcerer)
-
Enh #3518:
`yii\helpers\Html::encode()`
now replaces invalid code sequences with "�" (DaSourcerer)
-
Enh #3520: Added
`unlinkAll()`
-method to active record to remove all records of a model relation (NmDimas, samdark, cebe)
-
Enh #3520: Added
`unlinkAll()`
-method to active record to remove all records of a model relation (NmDimas, samdark, cebe)
...
...
framework/base/ErrorHandler.php
View file @
a56490e0
...
@@ -125,6 +125,7 @@ abstract class ErrorHandler extends Component
...
@@ -125,6 +125,7 @@ abstract class ErrorHandler extends Component
* @param string $message the error message.
* @param string $message the error message.
* @param string $file the filename that the error was raised in.
* @param string $file the filename that the error was raised in.
* @param integer $line the line number the error was raised at.
* @param integer $line the line number the error was raised at.
* @return boolean whether the normal error handler continues.
*
*
* @throws ErrorException
* @throws ErrorException
*/
*/
...
@@ -150,6 +151,7 @@ abstract class ErrorHandler extends Component
...
@@ -150,6 +151,7 @@ abstract class ErrorHandler extends Component
throw
$exception
;
throw
$exception
;
}
}
return
false
;
}
}
/**
/**
...
...
framework/caching/FileCache.php
View file @
a56490e0
...
@@ -240,10 +240,16 @@ class FileCache extends Cache
...
@@ -240,10 +240,16 @@ class FileCache extends Cache
if
(
is_dir
(
$fullPath
))
{
if
(
is_dir
(
$fullPath
))
{
$this
->
gcRecursive
(
$fullPath
,
$expiredOnly
);
$this
->
gcRecursive
(
$fullPath
,
$expiredOnly
);
if
(
!
$expiredOnly
)
{
if
(
!
$expiredOnly
)
{
@
rmdir
(
$fullPath
);
if
(
!@
rmdir
(
$fullPath
))
{
$error
=
error_get_last
();
Yii
::
warning
(
"Unable to remove directory '
{
$fullPath
}
':
{
$error
[
'message'
]
}
"
,
__METHOD__
);
}
}
}
}
elseif
(
!
$expiredOnly
||
$expiredOnly
&&
@
filemtime
(
$fullPath
)
<
time
())
{
}
elseif
(
!
$expiredOnly
||
$expiredOnly
&&
@
filemtime
(
$fullPath
)
<
time
())
{
@
unlink
(
$fullPath
);
if
(
!@
unlink
(
$fullPath
))
{
$error
=
error_get_last
();
Yii
::
warning
(
"Unable to remove file '
{
$fullPath
}
':
{
$error
[
'message'
]
}
"
,
__METHOD__
);
}
}
}
}
}
closedir
(
$handle
);
closedir
(
$handle
);
...
...
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