Details
-
Type:
Patch
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.9.6
-
Fix Version/s: 1.10.0
-
Component/s: Zend_Config
-
Labels:None
Description
Use cases:
- subclass calls parse_ini_file($filename, $process_sections, INI_SCANNER_RAW) – introduced in php 5.3.0
- subclass implements a parse_ini_file() replacement, e.g., supporting a richer syntax and/or where parse_ini_file is disabled
--- Ini.php.bak 2009-12-29 02:54:22.000000000 -0500
+++ Ini.php 2009-12-29 03:03:02.000000000 -0500
@@ -159,6 +159,17 @@
}
/**
+ * Parse the settings in the ini file, processing [sections].
+ *
+ * @param string $filename
+ * @return array
+ */
+ protected function _parseIniFile($filename)
+ {
+ return parse_ini_file($filename, true);
+ }
+
+ /**
* Load the ini file and preprocess the section separator (':' in the
* section name (that is used for section extension) so that the resultant
* array has the correct section names and the extension information is
@@ -173,7 +184,7 @@
protected function _loadIniFile($filename)
{
set_error_handler(array($this, '_loadFileErrorHandler'));
- $loaded = parse_ini_file($filename, true); // Warnings and errors are suppressed
+ $loaded = $this->_parseIniFile($filename); // Warnings and errors are suppressed
restore_error_handler();
// Check if there was a error while loading file
if ($this->_loadFileErrorStr !== null) {
Why not just override _loadIniFile()?