Skip to content

Commit

Permalink
Check mbstring at an early stage in core.php
Browse files Browse the repository at this point in the history
Issue #23214
  • Loading branch information
atrol committed Mar 4, 2018
1 parent 82ae251 commit 0176269
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions core.php
Expand Up @@ -217,6 +217,15 @@ function autoload_mantis( $p_class ) {
die();
}

# Enforce PHP mbstring extension
if( !extension_loaded( 'mbstring' ) ) {
@ob_end_clean();
echo '<strong>FATAL ERROR: PHP mbstring extension is not enabled.</strong><br />'
. 'MantisBT requires this extension for Unicode (UTF-8) support<br />'
. 'http://www.php.net/manual/en/mbstring.installation.php';
die();
}

# Ensure that output is blank so far (output at this stage generally denotes
# that an error has occurred)
if( ( $t_output = ob_get_contents() ) != '' ) {
Expand Down

0 comments on commit 0176269

Please sign in to comment.