mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fix error creating schema files.
If you removed app/Config/Schema and tried to create schema files, you'd get an error instead of a file. Fixes #2618
This commit is contained in:
parent
2a9a103d62
commit
faeb7b4536
1 changed files with 2 additions and 2 deletions
|
@ -384,9 +384,9 @@ class CakeSchema extends Object {
|
|||
}
|
||||
$out .= "}\n";
|
||||
|
||||
$file = new SplFileObject($path . DS . $file, 'w+');
|
||||
$file = new File($path . DS . $file, true);
|
||||
$content = "<?php \n/* generated on: " . date('Y-m-d H:i:s') . " : ". time() . " */\n{$out}";
|
||||
if ($file->fwrite($content)) {
|
||||
if ($file->write($content)) {
|
||||
return $content;
|
||||
}
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue