mirror of
https://github.com/phpbb/phpbb.git
synced 2025-01-18 14:48:28 +01:00
Merge pull request #6048 from JoshyPHP/ticket/16602
[ticket/16602] Check for mbstring extension support on install
This commit is contained in:
commit
43eeb008fa
@ -27,6 +27,7 @@
|
|||||||
"require": {
|
"require": {
|
||||||
"php": "^7.1.3",
|
"php": "^7.1.3",
|
||||||
"ext-json": "*",
|
"ext-json": "*",
|
||||||
|
"ext-mbstring": "*",
|
||||||
"bantu/ini-get-wrapper": "~1.0",
|
"bantu/ini-get-wrapper": "~1.0",
|
||||||
"google/recaptcha": "~1.1",
|
"google/recaptcha": "~1.1",
|
||||||
"guzzlehttp/guzzle": "~6.3",
|
"guzzlehttp/guzzle": "~6.3",
|
||||||
|
@ -112,6 +112,8 @@ $lang = array_merge($lang, array(
|
|||||||
'PCRE_UTF_SUPPORT_EXPLAIN' => 'phpBB will not run if your PHP installation is not compiled with UTF-8 support in the PCRE extension.',
|
'PCRE_UTF_SUPPORT_EXPLAIN' => 'phpBB will not run if your PHP installation is not compiled with UTF-8 support in the PCRE extension.',
|
||||||
'PHP_JSON_SUPPORT' => 'PHP JSON support',
|
'PHP_JSON_SUPPORT' => 'PHP JSON support',
|
||||||
'PHP_JSON_SUPPORT_EXPLAIN' => 'In order for phpBB to function correctly, the PHP JSON extension needs to be available.',
|
'PHP_JSON_SUPPORT_EXPLAIN' => 'In order for phpBB to function correctly, the PHP JSON extension needs to be available.',
|
||||||
|
'PHP_MBSTRING_SUPPORT' => 'PHP mbstring support',
|
||||||
|
'PHP_MBSTRING_SUPPORT_EXPLAIN' => 'In order for phpBB to function correctly, the PHP mbstring extension needs to be available.',
|
||||||
'PHP_XML_SUPPORT' => 'PHP XML/DOM support',
|
'PHP_XML_SUPPORT' => 'PHP XML/DOM support',
|
||||||
'PHP_XML_SUPPORT_EXPLAIN' => 'In order for phpBB to function correctly, the PHP XML/DOM extension needs to be available.',
|
'PHP_XML_SUPPORT_EXPLAIN' => 'In order for phpBB to function correctly, the PHP XML/DOM extension needs to be available.',
|
||||||
'PHP_SUPPORTED_DB' => 'Supported databases',
|
'PHP_SUPPORTED_DB' => 'Supported databases',
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
namespace phpbb\install\module\requirements\task;
|
namespace phpbb\install\module\requirements\task;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Installer task that checks if the server meats phpBB requirements
|
* Installer task that checks if the server meets phpBB requirements
|
||||||
*/
|
*/
|
||||||
class check_server_environment extends \phpbb\install\task_base
|
class check_server_environment extends \phpbb\install\task_base
|
||||||
{
|
{
|
||||||
@ -71,6 +71,9 @@ class check_server_environment extends \phpbb\install\task_base
|
|||||||
// Check for JSON support
|
// Check for JSON support
|
||||||
$this->check_json();
|
$this->check_json();
|
||||||
|
|
||||||
|
// Check for mbstring support
|
||||||
|
$this->check_mbstring();
|
||||||
|
|
||||||
// XML extension support check
|
// XML extension support check
|
||||||
$this->check_xml();
|
$this->check_xml();
|
||||||
|
|
||||||
@ -155,6 +158,22 @@ class check_server_environment extends \phpbb\install\task_base
|
|||||||
$this->set_test_passed(false);
|
$this->set_test_passed(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks whether PHP's mbstring extension is available or not
|
||||||
|
*/
|
||||||
|
protected function check_mbstring()
|
||||||
|
{
|
||||||
|
if (@extension_loaded('mbstring'))
|
||||||
|
{
|
||||||
|
$this->set_test_passed(true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->response_helper->add_error_message('PHP_MBSTRING_SUPPORT', 'PHP_MBSTRING_SUPPORT_EXPLAIN');
|
||||||
|
|
||||||
|
$this->set_test_passed(false);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks whether or not the XML PHP extension is available (Required by the text formatter)
|
* Checks whether or not the XML PHP extension is available (Required by the text formatter)
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user