Skip to content
This repository has been archived by the owner on Aug 6, 2023. It is now read-only.

Commit

Permalink
Fixes two test failures (re: #105):
Browse files Browse the repository at this point in the history
 * stream_copy_stream() never returns false but 0 (when nothing was copied)
 * all credit to @saltybeagle (Brett Bieber)
  • Loading branch information
till committed Nov 8, 2012
1 parent 333cece commit b8136dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Pyrus/AtomicFileTransaction/Transaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public function createOrOpenPath($relativePath, $contents = null, $mode = null)
throw new IOException('Unable to open ' . $relativePath . ' for writing in ' . $this->journalPath);
}

if (false === stream_copy_to_stream($contents, $fp)) {
if (0 == stream_copy_to_stream($contents, $fp)) {
fclose($fp);
throw new IOException('Unable to copy to ' . $relativePath . ' in ' . $this->journalPath);
}
Expand Down

0 comments on commit b8136dc

Please sign in to comment.