Skip to content

Commit

Permalink
BUGFIX Set default mbstring encoding in Core.php instead of main.php …
Browse files Browse the repository at this point in the history
…and cli-script.php so phpunit binary test runs behave consistently (same as running through TestRunner+cli-script.php). Fixes URLSegmentFilterTest
  • Loading branch information
chillu committed Dec 4, 2011
1 parent 34686ca commit 755663a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 12 deletions.
6 changes: 0 additions & 6 deletions cli-script.php
Expand Up @@ -61,12 +61,6 @@
*/ */
require_once("core/Core.php"); 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; global $databaseConfig;


// We don't have a session in cli-script, but this prevents errors // We don't have a session in cli-script, but this prevents errors
Expand Down
9 changes: 9 additions & 0 deletions core/Core.php
Expand Up @@ -195,6 +195,15 @@ function array_fill_keys($keys,$value) {
*/ */
increase_memory_limit_to('64M'); 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 // INCLUDES


Expand Down
6 changes: 0 additions & 6 deletions main.php
Expand Up @@ -60,12 +60,6 @@
*/ */
require_once("core/Core.php"); 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(); Session::start();


// IIS will sometimes generate this. // IIS will sometimes generate this.
Expand Down

0 comments on commit 755663a

Please sign in to comment.