diff --git a/module/VuFind/src/VuFind/Config/Upgrade.php b/module/VuFind/src/VuFind/Config/Upgrade.php index 5788b549e29584c0bcc592256a26a468f8c9d76c..558e1b37c1e326eb603fb6744b3dacfd585458e2 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']); } }