mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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:
parent
34686ca1dc
commit
755663a00a
@ -61,12 +61,6 @@ if(isset($_SERVER['argv'][1])) {
|
|||||||
*/
|
*/
|
||||||
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
|
||||||
|
@ -195,6 +195,15 @@ define('PR_LOW',10);
|
|||||||
*/
|
*/
|
||||||
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
|
||||||
|
|
||||||
|
6
main.php
6
main.php
@ -60,12 +60,6 @@ if(version_compare(phpversion(), 5, '<')) {
|
|||||||
*/
|
*/
|
||||||
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.
|
||||||
|
Loading…
Reference in New Issue
Block a user