diff --git a/classes/local/store/object_file_system.php b/classes/local/store/object_file_system.php index fb3da10d..de30f1d2 100644 --- a/classes/local/store/object_file_system.php +++ b/classes/local/store/object_file_system.php @@ -512,7 +512,7 @@ public function readfile(\stored_file $file) { $this->logger->log_object_read('readfile', $path, $file->get_filesize()); - if (!$success) { + if ($success === false) { manager::update_object_by_hash($file->get_contenthash(), OBJECT_LOCATION_ERROR); } } diff --git a/classes/local/store/s3/file_system.php b/classes/local/store/s3/file_system.php index dd911092..93637dd4 100644 --- a/classes/local/store/s3/file_system.php +++ b/classes/local/store/s3/file_system.php @@ -71,7 +71,7 @@ public function readfile(\stored_file $file) { $this->get_logger()->end_timing(); $this->get_logger()->log_object_read('readfile', $path, $file->get_filesize()); - if (!$success) { + if ($success === false) { manager::update_object_by_hash($file->get_contenthash(), OBJECT_LOCATION_ERROR); throw new \file_exception('storedfilecannotreadfile', $file->get_filename()); }