Permalink
Browse files

Replaced array_push function reference with a faster ordinary element…

… insertion method
  • Loading branch information...
1 parent 594bfd7 commit b3ec94252c0c96e0093fff4736fb10e80c615b24 @and-ers and-ers committed Jan 3, 2013
Showing with 2 additions and 2 deletions.
  1. +1 −1 system/core/Loader.php
  2. +1 −1 tests/codeigniter/core/Config_test.php
View
@@ -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;
}
// --------------------------------------------------------------------
@@ -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);

0 comments on commit b3ec942

Please sign in to comment.