From 24ea7f1f55739d2d89563fbfa543b91118c834e9 Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Thu, 3 Dec 2015 19:05:36 -0700 Subject: [PATCH 1/2] Support APCu extension loaded for PHP7.0 --- system/src/Grav/Common/Cache.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/src/Grav/Common/Cache.php b/system/src/Grav/Common/Cache.php index 6ba75f4a3..214171e27 100644 --- a/system/src/Grav/Common/Cache.php +++ b/system/src/Grav/Common/Cache.php @@ -125,7 +125,7 @@ class Cache extends Getters $driver_name = 'file'; if (!$setting || $setting == 'auto') { - if (extension_loaded('apc')) { + if (extension_loaded('apc') || extension_loaded('apcu')) { $driver_name = 'apc'; } elseif (extension_loaded('wincache')) { $driver_name = 'wincache'; From 9179fbd1a27a724403732a5106b1ac3462070af4 Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Thu, 3 Dec 2015 22:12:01 -0700 Subject: [PATCH 2/2] minor performance optimization --- system/src/Grav/Common/Filesystem/Folder.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/system/src/Grav/Common/Filesystem/Folder.php b/system/src/Grav/Common/Filesystem/Folder.php index 62d610b65..81d610898 100644 --- a/system/src/Grav/Common/Filesystem/Folder.php +++ b/system/src/Grav/Common/Filesystem/Folder.php @@ -274,6 +274,11 @@ abstract class Folder throw new \RuntimeException('Cannot move non-existing folder.'); } + // Don't do anything if the source is the same as the new target + if ($source == $target) { + return; + } + // Make sure that path to the target exists before moving. self::create(dirname($target));