diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php index 7558fde944..ad84155585 100644 --- a/phpBB/install/install_install.php +++ b/phpBB/install/install_install.php @@ -128,7 +128,7 @@ class install_install extends module 'BODY' => $lang['REQUIREMENTS_EXPLAIN'], )); - $passed = array('php' => false, 'db' => false, 'files' => false, 'pcre' => false, 'imagesize' => false,); + $passed = array('php' => false, 'db' => false, 'files' => false, 'pcre' => false, 'imagesize' => false, 'json' => false,); // Test for basic PHP settings $template->assign_block_vars('checks', array( @@ -244,6 +244,26 @@ class install_install extends module 'S_EXPLAIN' => true, 'S_LEGEND' => false, )); + + // Check for php json support + if (@extension_loaded('json')) + { + $passed['json'] = true; + $result = '' . $lang['YES'] . ''; + } + else + { + $result = '' . $lang['NO'] . ''; + } + + $template->assign_block_vars('checks', array( + 'TITLE' => $lang['PHP_JSON_SUPPORT'], + 'TITLE_EXPLAIN' => $lang['PHP_JSON_SUPPORT_EXPLAIN'], + 'RESULT' => $result, + + 'S_EXPLAIN' => true, + 'S_LEGEND' => false, + )); /** * Better not enabling and adding to the loaded extensions due to the specific requirements needed diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php index ca6045a921..29664ae5f0 100644 --- a/phpBB/language/en/install.php +++ b/phpBB/language/en/install.php @@ -292,6 +292,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.', 'PHP_GETIMAGESIZE_SUPPORT' => 'PHP function getimagesize() is available', 'PHP_GETIMAGESIZE_SUPPORT_EXPLAIN' => 'Required - In order for phpBB to function correctly, the getimagesize function needs to be available.', + 'PHP_JSON_SUPPORT' => 'PHP JSON support', + 'PHP_JSON_SUPPORT_EXPLAIN' => 'Required - In order for phpBB to function correctly, the PHP JSON extension needs to be available.', 'PHP_OPTIONAL_MODULE' => 'Optional modules', 'PHP_OPTIONAL_MODULE_EXPLAIN' => 'Optional - These modules or applications are optional. However, if they are available they will enable extra features.', 'PHP_SUPPORTED_DB' => 'Supported databases',