From 90394abd2d0fc66a994a3f81c76e265d0707b351 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Wed, 17 Dec 2014 13:14:02 +0100 Subject: fix global environment during test requests --- _test/core/TestRequest.php | 2 -- 1 file changed, 2 deletions(-) (limited to '_test/core') diff --git a/_test/core/TestRequest.php b/_test/core/TestRequest.php index 060e37d28..dad2060e5 100644 --- a/_test/core/TestRequest.php +++ b/_test/core/TestRequest.php @@ -45,8 +45,6 @@ class TestRequest { */ public function execute($uri='/doku.php') { global $INPUT; - global $ID; - global $INFO; // save old environment $server = $_SERVER; -- cgit v1.2.3 From 79e79377626799a77c11aa7849cb9c64305590c8 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Wed, 7 Jan 2015 10:47:45 +0100 Subject: Remove error supression for file_exists() In an older version of PHP a file_exists() call would issue a warning when the file did not exist. This was fixed in later PHP releases. Since we require PHP 5.3 now, there's no need to supress any error here anymore. This might even give a minor performance boost. --- _test/core/DokuWikiTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '_test/core') diff --git a/_test/core/DokuWikiTest.php b/_test/core/DokuWikiTest.php index f4521256a..4e40d510a 100644 --- a/_test/core/DokuWikiTest.php +++ b/_test/core/DokuWikiTest.php @@ -54,7 +54,7 @@ abstract class DokuWikiTest extends PHPUnit_Framework_TestCase { foreach (array('default','local','protected') as $config_group) { if (empty($config_cascade['main'][$config_group])) continue; foreach ($config_cascade['main'][$config_group] as $config_file) { - if (@file_exists($config_file)) { + if (file_exists($config_file)) { include($config_file); } } @@ -68,7 +68,7 @@ abstract class DokuWikiTest extends PHPUnit_Framework_TestCase { foreach (array('default','local') as $config_group) { if (empty($config_cascade['license'][$config_group])) continue; foreach ($config_cascade['license'][$config_group] as $config_file) { - if(@file_exists($config_file)){ + if(file_exists($config_file)){ include($config_file); } } -- cgit v1.2.3