From 9f4df6fcf60af12ae9b6aff42f32e2fd2749dd87 Mon Sep 17 00:00:00 2001 From: kieronsutton00 Date: Tue, 18 Apr 2017 12:27:05 +0100 Subject: [PATCH] Update AutoUpdate.php --- src/AutoUpdate.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/AutoUpdate.php b/src/AutoUpdate.php index 54abe76..3013775 100755 --- a/src/AutoUpdate.php +++ b/src/AutoUpdate.php @@ -756,7 +756,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);