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

Commit b8136dc

Browse files
committed
Fixes two test failures (re: #105):
* stream_copy_stream() never returns false but 0 (when nothing was copied) * all credit to @saltybeagle (Brett Bieber)
1 parent 333cece commit b8136dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Pyrus/AtomicFileTransaction/Transaction.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ public function createOrOpenPath($relativePath, $contents = null, $mode = null)
143143
throw new IOException('Unable to open ' . $relativePath . ' for writing in ' . $this->journalPath);
144144
}
145145

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

0 commit comments

Comments
 (0)