From a4c382b23a518d01d1866d2d3584d602487c952d Mon Sep 17 00:00:00 2001 From: schrolli Date: Sun, 2 Sep 2012 06:02:30 +0300 Subject: [PATCH 1/2] Update lib/Cake/Configure/IniReader.php Copied standard path from PhpReader --- lib/Cake/Configure/IniReader.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/Cake/Configure/IniReader.php b/lib/Cake/Configure/IniReader.php index 900d65489..1e5180ff5 100644 --- a/lib/Cake/Configure/IniReader.php +++ b/lib/Cake/Configure/IniReader.php @@ -77,6 +77,9 @@ class IniReader implements ConfigReaderInterface { * all sections in the ini file. */ public function __construct($path, $section = null) { + if (!$path) { + $path = APP . 'Config' . DS; + } $this->_path = $path; $this->_section = $section; } From 83c05c24b325808ddaaa1dd1d8e46354139d1b1c Mon Sep 17 00:00:00 2001 From: schrolli Date: Sun, 2 Sep 2012 14:23:26 +0300 Subject: [PATCH 2/2] Update lib/Cake/Configure/IniReader.php Updated docblock and set NULL as the default value of $path --- lib/Cake/Configure/IniReader.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Cake/Configure/IniReader.php b/lib/Cake/Configure/IniReader.php index 1e5180ff5..49b81b80f 100644 --- a/lib/Cake/Configure/IniReader.php +++ b/lib/Cake/Configure/IniReader.php @@ -72,11 +72,11 @@ class IniReader implements ConfigReaderInterface { * Build and construct a new ini file parser. The parser can be used to read * ini files that are on the filesystem. * - * @param string $path Path to load ini config files from. + * @param string $path Path to load ini config files from. Defaults to APP . 'Config' . DS * @param string $section Only get one section, leave null to parse and fetch * all sections in the ini file. */ - public function __construct($path, $section = null) { + public function __construct($path = null, $section = null) { if (!$path) { $path = APP . 'Config' . DS; }