mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Adding error supression to chmod() making folder::chmod() functionally similar to delete(). Closes #5393
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7573 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
19d4f3d596
commit
7e55088b77
1 changed files with 2 additions and 2 deletions
|
@ -368,7 +368,7 @@ class Folder extends Object {
|
|||
}
|
||||
|
||||
if ($recursive === false && is_dir($path)) {
|
||||
if (chmod($path, intval($mode, 8))) {
|
||||
if (@chmod($path, intval($mode, 8))) {
|
||||
$this->__messages[] = sprintf(__('%s changed to %s', true), $path, $mode);
|
||||
return true;
|
||||
} else {
|
||||
|
@ -388,7 +388,7 @@ class Folder extends Object {
|
|||
continue;
|
||||
}
|
||||
|
||||
if (chmod($fullpath, intval($mode, 8))) {
|
||||
if (@chmod($fullpath, intval($mode, 8))) {
|
||||
$this->__messages[] = sprintf(__('%s changed to %s', true), $fullpath, $mode);
|
||||
} else {
|
||||
$this->__errors[] = sprintf(__('%s NOT changed to %s', true), $fullpath, $mode);
|
||||
|
|
Loading…
Reference in a new issue