From bd640ef6461de4a7d2c1819136eae555a983425b Mon Sep 17 00:00:00 2001 From: Josh Date: Wed, 24 Dec 2025 22:15:22 -0500 Subject: [PATCH] fix: make file_get_content error check more robust Signed-off-by: Josh --- lib/private/IntegrityCheck/Checker.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/private/IntegrityCheck/Checker.php b/lib/private/IntegrityCheck/Checker.php index bbe1bade1c7..545ce5cf2b2 100644 --- a/lib/private/IntegrityCheck/Checker.php +++ b/lib/private/IntegrityCheck/Checker.php @@ -143,7 +143,7 @@ class Checker { // to the root .htaccess) and only hash the stable content above the marker. if ($absoluteFilePath === $this->environmentHelper->getServerRoot() . '/.htaccess') { $fileContent = $this->fileAccessHelper->file_get_contents($absoluteFilePath); - if ($fileContent === false) { + if (!is_string($fileContent)) { throw new \RuntimeException('Failed to read .htaccess at ' . $absoluteFilePath); } @@ -175,7 +175,7 @@ class Checker { $this->mimeTypeDetector->getAllNamings() ); $onDiskContent = $this->fileAccessHelper->file_get_contents($absoluteFilePath); - if ($onDiskContent === false) { + if (!is_string($onDiskContent)) { throw new \RuntimeException('Failed to read mimetypelist.js at ' . $absoluteFilePath); }