From: Chuck Hagenbuch Date: Fri, 25 Sep 2009 17:31:03 +0000 (-0400) Subject: Use include_once in these autoload stub functions for safety. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=4c609d74275e22dbb310c690f0238722146b0e07;p=horde.git Use include_once in these autoload stub functions for safety. --- 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') {