Skip to content
Snippets Groups Projects
Commit c863d0a7 authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- Patch #641408 by cha0s: test if json_encode() is available during installation.

parent ce2bdcf9
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -108,6 +108,19 @@ function system_requirements($phase) {
$requirements['pdo']['description'] = $t('Your server does not have the PHP PDO extension enabled. See the <a href="@system_requirements">system requirements page</a> for more information.', array('@system_requirements' => 'http://drupal.org/requirements'));
}
// Test JSON library availability.
$requirements['json'] = array(
'title' => $t('JSON library'),
);
if (extension_loaded('json')) {
$requirements['json']['value'] = $t('Enabled');
}
else {
$requirements['json']['value'] = $t('Disabled');
$requirements['json']['severity'] = REQUIREMENT_ERROR;
$requirements['json']['description'] = $t('Your server does not have the PHP JSON extension enabled. See the <a href="@system_requirements">system requirements page</a> for more information.', array('@system_requirements' => 'http://drupal.org/requirements'));
}
// Test PHP memory_limit
$memory_limit = ini_get('memory_limit');
$requirements['php_memory_limit'] = array(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment