From 373595ef519db85e1a07979ddcd18f3a53d77958 Mon Sep 17 00:00:00 2001
From: Demian Katz <demian.katz@villanova.edu>
Date: Mon, 5 Oct 2015 12:02:06 -0400
Subject: [PATCH] Minor bug/typo fixes.

---
 module/VuFind/src/VuFind/Config/Upgrade.php | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/module/VuFind/src/VuFind/Config/Upgrade.php b/module/VuFind/src/VuFind/Config/Upgrade.php
index 5788b549e29..558e1b37c1e 100644
--- a/module/VuFind/src/VuFind/Config/Upgrade.php
+++ b/module/VuFind/src/VuFind/Config/Upgrade.php
@@ -407,12 +407,14 @@ class Upgrade
 
         // Compare the source file against the raw file; if they happen to be the
         // same, we don't need to copy anything!
-        if (md5(file_get_contents($src)) == md5(file_get_contents($raw))) {
+        if (file_exists($src) && file_exists($raw)
+            && md5(file_get_contents($src)) == md5(file_get_contents($raw))
+        ) {
             return;
         }
 
         // If we got this far, we need to copy the user's file into place:
-        if (!copy($src, $dest)) {
+        if (file_exists($src) && !copy($src, $dest)) {
             throw new FileAccessException(
                 "Error: Could not copy {$src} to {$dest}."
             );
@@ -967,7 +969,7 @@ class Upgrade
                 unset($permissions['access.SummonExtendedResults']);
             }
 
-            // Remove any old settings remaining in config.ini:
+            // Remove any old settings remaining in Summon.ini:
             unset($config['Auth']);
         }
     }
-- 
GitLab