Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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
  • Loading branch information...
commit faeb7b4536eecf59b057e3848994596b41140e78 1 parent 2a9a103
@markstory markstory authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/Cake/Model/CakeSchema.php
View
4 lib/Cake/Model/CakeSchema.php
@@ -384,9 +384,9 @@ public function write($object, $options = array()) {
}
$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;
Please sign in to comment.
Something went wrong with that request. Please try again.