diff options
author | Michael Larabel <michael@phx-laptop.(none)> | 2008-11-28 07:39:42 -0500 |
---|---|---|
committer | Michael Larabel <michael@phx-laptop.(none)> | 2008-11-28 07:39:42 -0500 |
commit | 1823b6aaa791d66b26e99b7c761ec4732b083717 (patch) | |
tree | 4b3b0fc05af9e14afc3884b250b7458f1fd4a1ab | |
parent | 6c24813a1b925ecd518f73854c5588bebdcc4d4c (diff) | |
download | phoronix-test-suite-upstream-1823b6aaa791d66b26e99b7c761ec4732b083717.tar.gz phoronix-test-suite-upstream-1823b6aaa791d66b26e99b7c761ec4732b083717.tar.xz phoronix-test-suite-upstream-1823b6aaa791d66b26e99b7c761ec4732b083717.zip |
pts-core: Unset an object from the __autoload() array after use since it
should never need to be called again.
-rw-r--r-- | pts-core/functions/pts-init.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pts-core/functions/pts-init.php b/pts-core/functions/pts-init.php index 4455f7d..348d8c1 100644 --- a/pts-core/functions/pts-init.php +++ b/pts-core/functions/pts-init.php @@ -228,7 +228,7 @@ function __autoload($to_load) // Autoload needed objects static $sub_objects = null; - if($sub_objects == null) + if($sub_objects == null && !is_array($sub_objects)) { $sub_objects = array(); $sub_object_files = glob(PTS_DIR . "pts-core/objects/*/*.php"); @@ -247,6 +247,7 @@ function __autoload($to_load) else if(isset($sub_objects[$to_load])) { include_once($sub_objects[$to_load]); + unset($sub_objects[$to_load]); } } |