diff --git a/cake/basics.php b/cake/basics.php index af61de015..29fcfa2ba 100644 --- a/cake/basics.php +++ b/cake/basics.php @@ -866,8 +866,14 @@ } $res = @fopen($fileName, 'w+b'); if ($res) { - @fwrite($res, $data); + $write = @fwrite($res, $data); + if($write === false) { + return false; + } else { + return $write; + } } + return false; } } /**