Skip to content

[Filesystem] fileperms(): stat failed #23312

@axzx

Description

@axzx
Q A
Bug report? yes
Feature request? no
BC Break report? no
RFC? no
Symfony version 3.3.2

My code:

$fs = new \Symfony\Component\Filesystem\Filesystem();
$fs->copy('http://lorempixel.com/900/900/', 'var/cache/image.jpg');

I got a warning message:

09:40:03 DEBUG [php] Warning: fileperms(): stat failed for http://lorempixel.com/900/900/
[
"exception" => Symfony\Component\Debug\Exception\SilencedErrorContext {
-severity: E_WARNING,
trace: {
/home/project/vendor/symfony/symfony/src/Symfony/Component/Filesystem/Filesystem.php:72: {
: // Like cp, preserve executable permission bits,
: @chmod($targetFile, fileperms($targetFile) | (fileperms($originFile) & 0111));,
:
}
}
}
]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions