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);