From 5c8c22cf194e5240d50ca9ec5f4ef831858d4bcb Mon Sep 17 00:00:00 2001 From: Mischa ter Smitten Date: Fri, 5 Feb 2016 11:11:28 +0100 Subject: [PATCH] Expand path before is_file check To allow symlinks to config files --- lib/Cake/Configure/IniReader.php | 2 +- lib/Cake/Configure/PhpReader.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Cake/Configure/IniReader.php b/lib/Cake/Configure/IniReader.php index 8380ffe70..ad3b88145 100644 --- a/lib/Cake/Configure/IniReader.php +++ b/lib/Cake/Configure/IniReader.php @@ -102,7 +102,7 @@ class IniReader implements ConfigReaderInterface { } $file = $this->_getFilePath($key); - if (!is_file($file)) { + if (!is_file(realpath($file))) { throw new ConfigureException(__d('cake_dev', 'Could not load configuration file: %s', $file)); } diff --git a/lib/Cake/Configure/PhpReader.php b/lib/Cake/Configure/PhpReader.php index f159562d8..d15a41b83 100644 --- a/lib/Cake/Configure/PhpReader.php +++ b/lib/Cake/Configure/PhpReader.php @@ -65,7 +65,7 @@ class PhpReader implements ConfigReaderInterface { } $file = $this->_getFilePath($key); - if (!is_file($file)) { + if (!is_file(realpath($file))) { throw new ConfigureException(__d('cake_dev', 'Could not load configuration file: %s', $file)); }