Skip to content

Commit

Permalink
Merge pull request #863 from sjinks/issue-861
Browse files Browse the repository at this point in the history
Fix memory corruption is Phalcon\Config\Adapter\Ini
  • Loading branch information
Phalcon committed Jul 17, 2013
2 parents 76e5a80 + 7dd3e96 commit 7c441ea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions ext/config/adapter/ini.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion unit-tests/ConfigTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 7c441ea

Please sign in to comment.