From 7de911e48f5383021daa5d26743a071ee194c8be Mon Sep 17 00:00:00 2001
From: Demian Katz <demian.katz@villanova.edu>
Date: Tue, 1 Mar 2016 15:16:49 -0500
Subject: [PATCH] Do not fail when reading an empty file. - More specific check
 on return value for file_get_contents().

---
 module/VuFind/src/VuFind/Config/Writer.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/module/VuFind/src/VuFind/Config/Writer.php b/module/VuFind/src/VuFind/Config/Writer.php
index 0434099cb7a..c47dd1b9302 100644
--- a/module/VuFind/src/VuFind/Config/Writer.php
+++ b/module/VuFind/src/VuFind/Config/Writer.php
@@ -69,7 +69,7 @@ class Writer
         $this->filename = $filename;
         if (null === $content) {
             $this->content = file_get_contents($filename);
-            if (!$this->content) {
+            if (false === $this->content) {
                 throw new \Exception('Could not read ' . $filename);
             }
         } else if (is_array($content)) {
-- 
GitLab