diff --git a/lib/Cake/Model/CakeSchema.php b/lib/Cake/Model/CakeSchema.php index 56ab8f6c1..d37208233 100644 --- a/lib/Cake/Model/CakeSchema.php +++ b/lib/Cake/Model/CakeSchema.php @@ -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 = "fwrite($content)) { + if ($file->write($content)) { return $content; } return false;