Skip to content

Commit

Permalink
Replaced array_push function reference with a faster ordinary element…
Browse files Browse the repository at this point in the history
… insertion method
  • Loading branch information
and-ers committed Jan 3, 2013
1 parent 594bfd7 commit b3ec942
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion system/core/Loader.php
Expand Up @@ -714,7 +714,7 @@ public function add_package_path($path, $view_cascade = TRUE)

// Add config file path
$config =& $this->_ci_get_component('config');
array_push($config->_config_paths, $path);
$config->_config_paths[] = $path;
}

// --------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion tests/codeigniter/core/Config_test.php
Expand Up @@ -195,7 +195,7 @@ public function test_load()
$pkg_dir = 'package';
$this->ci_vfs_create($file.'.php', '<?php $config = '.var_export($cfg2, TRUE).';', $this->ci_app_root,
array($pkg_dir, 'config'));
array_push($this->config->_config_paths, $this->ci_vfs_path($pkg_dir.'/', APPPATH));
$this->config->_config_paths[] = $this->ci_vfs_path($pkg_dir.'/', APPPATH);
$this->assertTrue($this->config->load($file, TRUE));
$this->assertEquals(array_merge($cfg, $cfg2), $this->config->item($file));
array_pop($this->config->_config_paths);
Expand Down

0 comments on commit b3ec942

Please sign in to comment.