Skip to content

Commit

Permalink
Merge pull request #31 from kieronsutton00/patch-1
Browse files Browse the repository at this point in the history
Change touch() to file_put_contents()
  • Loading branch information
thelfensdrfer authored Apr 18, 2017
2 parents 7d726c4 + 9f4df6f commit 4cb49e2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/AutoUpdate.php
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,8 @@ protected function _install($updateFile, $simulateInstall, $version)
return false;
}
} else {
if (!touch($absoluteFilename)) {
// touch will fail if PHP is not the owner of the file, and file_put_contents is faster than touch.
if (!file_put_contents($absoluteFilename)) {
$this->_log->addError(sprintf('[SIMULATE] The file "%s" could not be created!', $absoluteFilename));
zip_close($zip);

Expand Down

0 comments on commit 4cb49e2

Please sign in to comment.