mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Fix PHP flaw around intval with custom base.
This commit is contained in:
parent
282bc0ca92
commit
3e25282d4c
1 changed files with 3 additions and 3 deletions
|
@ -382,7 +382,7 @@ class Folder {
|
|||
|
||||
if ($recursive === false && is_dir($path)) {
|
||||
//@codingStandardsIgnoreStart
|
||||
if (@chmod($path, intval($mode, 8))) {
|
||||
if (@chmod($path, intval((string)$mode, 8))) {
|
||||
//@codingStandardsIgnoreEnd
|
||||
$this->_messages[] = __d('cake_dev', '%s changed to %s', $path, $mode);
|
||||
return true;
|
||||
|
@ -405,7 +405,7 @@ class Folder {
|
|||
}
|
||||
|
||||
//@codingStandardsIgnoreStart
|
||||
if (@chmod($fullpath, intval($mode, 8))) {
|
||||
if (@chmod($fullpath, intval((string)$mode, 8))) {
|
||||
//@codingStandardsIgnoreEnd
|
||||
$this->_messages[] = __d('cake_dev', '%s changed to %s', $fullpath, $mode);
|
||||
} else {
|
||||
|
@ -681,7 +681,7 @@ class Folder {
|
|||
$from = Folder::addPathElement($fromDir, $item);
|
||||
if (is_file($from) && (!is_file($to) || $options['scheme'] != Folder::SKIP)) {
|
||||
if (copy($from, $to)) {
|
||||
chmod($to, intval($mode, 8));
|
||||
chmod($to, intval((string)$mode, 8));
|
||||
touch($to, filemtime($from));
|
||||
$this->_messages[] = __d('cake_dev', '%s copied to %s', $from, $to);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Reference in a new issue