diff --git a/ext/config/adapter/ini.c b/ext/config/adapter/ini.c index 501740b863c..feef3958292 100644 --- a/ext/config/adapter/ini.c +++ b/ext/config/adapter/ini.c @@ -142,6 +142,7 @@ PHP_METHOD(Phalcon_Config_Adapter_Ini, __construct){ phalcon_is_iterable(directives, &ah1, &hp1, 0, 0); if (zend_hash_num_elements(ah1) == 0) { + Z_ADDREF_P(directives); phalcon_array_update_zval(&config, section, &directives, 0); zend_hash_move_forward_ex(ah0, &hp0); continue; diff --git a/unit-tests/ConfigTest.php b/unit-tests/ConfigTest.php index 9c137341c32..87049759cc7 100644 --- a/unit-tests/ConfigTest.php +++ b/unit-tests/ConfigTest.php @@ -78,7 +78,7 @@ public function testIniConfig() $this->assertTrue($this->_compareConfig($this->_config, $config)); } - public function testStandarConfig() + public function testStandardConfig() { $config = new Phalcon\Config($this->_config); $this->_compareConfig($this->_config, $config);