diff options
author | Dries Buytaert <dries@buytaert.net> | 2010-02-10 10:38:53 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2010-02-10 10:38:53 +0000 |
commit | c863d0a7ab9326f2c6ce3a49b55e00e2d672aabc (patch) | |
tree | 433a0795d5e3dbeb6bb3d8ff3430d68eb557236e /modules | |
parent | ce2bdcf9f17c218f524212d0a5fdc5b5107a2f13 (diff) | |
download | brdo-c863d0a7ab9326f2c6ce3a49b55e00e2d672aabc.tar.gz brdo-c863d0a7ab9326f2c6ce3a49b55e00e2d672aabc.tar.bz2 |
- Patch #641408 by cha0s: test if json_encode() is available during installation.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/system/system.install | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/modules/system/system.install b/modules/system/system.install index 162c6b90d..bf0d6b2f5 100644 --- a/modules/system/system.install +++ b/modules/system/system.install @@ -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( |