From 4c609d74275e22dbb310c690f0238722146b0e07 Mon Sep 17 00:00:00 2001 From: Chuck Hagenbuch Date: Fri, 25 Sep 2009 13:31:03 -0400 Subject: [PATCH] Use include_once in these autoload stub functions for safety. --- framework/Injector/test/Horde/Injector/AllTests.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/framework/Injector/test/Horde/Injector/AllTests.php b/framework/Injector/test/Horde/Injector/AllTests.php index 969ba93b1..dc49faa5d 100644 --- a/framework/Injector/test/Horde/Injector/AllTests.php +++ b/framework/Injector/test/Horde/Injector/AllTests.php @@ -9,11 +9,11 @@ if (!defined('PHPUnit_MAIN_METHOD')) { } if (!spl_autoload_functions()) { - spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'::\', \'_\'), \'/\', $class); @include "$filename.php";')); + spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'::\', \'_\'), \'/\', $class); @include_once "$filename.php";')); } -class Horde_Injector_AllTests { - +class Horde_Injector_AllTests +{ public static function main() { PHPUnit_TextUI_TestRunner::run(self::suite()); @@ -40,7 +40,6 @@ class Horde_Injector_AllTests { return $suite; } - } if (PHPUnit_MAIN_METHOD == 'Horde_Injector_AllTests::main') { -- 2.11.0