- Patch #383318 by mr.baileys: incorrect memory shortage warning when memory limit is unlimited.

merge-requests/26/head
Dries Buytaert 2009-02-25 13:33:53 +00:00
parent 743c8adcf7
commit 094e999013
1 changed files with 2 additions and 2 deletions

View File

@ -65,10 +65,10 @@ function system_requirements($phase) {
$memory_limit = ini_get('memory_limit'); $memory_limit = ini_get('memory_limit');
$requirements['php_memory_limit'] = array( $requirements['php_memory_limit'] = array(
'title' => $t('PHP memory limit'), 'title' => $t('PHP memory limit'),
'value' => $memory_limit, 'value' => $memory_limit == -1 ? t('-1 (Unlimited)') : $memory_limit,
); );
if ($memory_limit && parse_size($memory_limit) < parse_size(DRUPAL_MINIMUM_PHP_MEMORY_LIMIT)) { if ($memory_limit && $memory_limit != -1 && parse_size($memory_limit) < parse_size(DRUPAL_MINIMUM_PHP_MEMORY_LIMIT)) {
$description = ''; $description = '';
if ($phase == 'install') { if ($phase == 'install') {
$description = $t('Consider increasing your PHP memory limit to %memory_minimum_limit to help prevent errors in the installation process.', array('%memory_minimum_limit' => DRUPAL_MINIMUM_PHP_MEMORY_LIMIT)); $description = $t('Consider increasing your PHP memory limit to %memory_minimum_limit to help prevent errors in the installation process.', array('%memory_minimum_limit' => DRUPAL_MINIMUM_PHP_MEMORY_LIMIT));