mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 17:16:18 +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)) {
|
if ($recursive === false && is_dir($path)) {
|
||||||
//@codingStandardsIgnoreStart
|
//@codingStandardsIgnoreStart
|
||||||
if (@chmod($path, intval($mode, 8))) {
|
if (@chmod($path, intval((string)$mode, 8))) {
|
||||||
//@codingStandardsIgnoreEnd
|
//@codingStandardsIgnoreEnd
|
||||||
$this->_messages[] = __d('cake_dev', '%s changed to %s', $path, $mode);
|
$this->_messages[] = __d('cake_dev', '%s changed to %s', $path, $mode);
|
||||||
return true;
|
return true;
|
||||||
|
@ -405,7 +405,7 @@ class Folder {
|
||||||
}
|
}
|
||||||
|
|
||||||
//@codingStandardsIgnoreStart
|
//@codingStandardsIgnoreStart
|
||||||
if (@chmod($fullpath, intval($mode, 8))) {
|
if (@chmod($fullpath, intval((string)$mode, 8))) {
|
||||||
//@codingStandardsIgnoreEnd
|
//@codingStandardsIgnoreEnd
|
||||||
$this->_messages[] = __d('cake_dev', '%s changed to %s', $fullpath, $mode);
|
$this->_messages[] = __d('cake_dev', '%s changed to %s', $fullpath, $mode);
|
||||||
} else {
|
} else {
|
||||||
|
@ -681,7 +681,7 @@ class Folder {
|
||||||
$from = Folder::addPathElement($fromDir, $item);
|
$from = Folder::addPathElement($fromDir, $item);
|
||||||
if (is_file($from) && (!is_file($to) || $options['scheme'] != Folder::SKIP)) {
|
if (is_file($from) && (!is_file($to) || $options['scheme'] != Folder::SKIP)) {
|
||||||
if (copy($from, $to)) {
|
if (copy($from, $to)) {
|
||||||
chmod($to, intval($mode, 8));
|
chmod($to, intval((string)$mode, 8));
|
||||||
touch($to, filemtime($from));
|
touch($to, filemtime($from));
|
||||||
$this->_messages[] = __d('cake_dev', '%s copied to %s', $from, $to);
|
$this->_messages[] = __d('cake_dev', '%s copied to %s', $from, $to);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Reference in a new issue