Issue #2463817 by alexpott: Drupal\Core\FileTransfer\Local should use a leading \ when using PHP built-in classes
parent
24738eb523
commit
491a2b865f
|
@ -97,7 +97,7 @@ class Local extends FileTransfer implements ChmodInterface {
|
||||||
*/
|
*/
|
||||||
public function chmodJailed($path, $mode, $recursive) {
|
public function chmodJailed($path, $mode, $recursive) {
|
||||||
if ($recursive && is_dir($path)) {
|
if ($recursive && is_dir($path)) {
|
||||||
foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path, RecursiveDirectoryIterator::SKIP_DOTS), RecursiveIteratorIterator::SELF_FIRST) as $filename => $file) {
|
foreach (new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($path, \RecursiveDirectoryIterator::SKIP_DOTS), \RecursiveIteratorIterator::SELF_FIRST) as $filename => $file) {
|
||||||
if (@!chmod($filename, $mode)) {
|
if (@!chmod($filename, $mode)) {
|
||||||
throw new FileTransferException('Cannot chmod %path.', NULL, array('%path' => $filename));
|
throw new FileTransferException('Cannot chmod %path.', NULL, array('%path' => $filename));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue