mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-09 21:12:41 +00:00
Actually checking that files exist before saying they do.
This commit is contained in:
parent
b722693102
commit
c1e674f9c1
1 changed files with 2 additions and 1 deletions
|
@ -613,7 +613,8 @@ class Shell extends Object {
|
|||
$this->out(__d('cake_console', 'Creating file %s', $path));
|
||||
}
|
||||
|
||||
if ($File = new File($path, true)) {
|
||||
$File = new File($path, true);
|
||||
if ($File->exists()) {
|
||||
$data = $File->prepare($contents);
|
||||
$File->write($data);
|
||||
$this->out(__d('cake_console', '<success>Wrote</success> `%s`', $path));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue