BUGFIX Set default mbstring encoding in Core.php instead of main.php and cli-script.php so phpunit binary test runs behave consistently (same as running through TestRunner+cli-script.php). Fixes URLSegmentFilterTest

This commit is contained in:
Ingo Schommer 2011-12-04 13:21:15 +01:00
parent 34686ca1dc
commit 755663a00a
3 changed files with 9 additions and 12 deletions

View File

@ -61,12 +61,6 @@ if(isset($_SERVER['argv'][1])) {
*/
require_once("core/Core.php");
if(function_exists('mb_http_output')) {
mb_http_output('UTF-8');
mb_internal_encoding('UTF-8');
mb_regex_encoding('UTF-8');
}
global $databaseConfig;
// We don't have a session in cli-script, but this prevents errors

View File

@ -195,6 +195,15 @@ define('PR_LOW',10);
*/
increase_memory_limit_to('64M');
/**
* Set default encoding
*/
if(function_exists('mb_http_output')) {
mb_http_output('UTF-8');
mb_internal_encoding('UTF-8');
mb_regex_encoding('UTF-8');
}
///////////////////////////////////////////////////////////////////////////////
// INCLUDES

View File

@ -60,12 +60,6 @@ if(version_compare(phpversion(), 5, '<')) {
*/
require_once("core/Core.php");
if (function_exists('mb_http_output')) {
mb_http_output('UTF-8');
mb_internal_encoding('UTF-8');
mb_regex_encoding('UTF-8');
}
Session::start();
// IIS will sometimes generate this.