core/includes/bootstrap.inc | 2 +- core/modules/simpletest/simpletest.install | 4 ++-- core/modules/system/system.install | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc index e2a381e..a560d53 100644 --- a/core/includes/bootstrap.inc +++ b/core/includes/bootstrap.inc @@ -46,7 +46,7 @@ /** * Minimum recommended value of PHP memory_limit. */ -const DRUPAL_MINIMUM_PHP_MEMORY_LIMIT = '32 MiB'; +const DRUPAL_MINIMUM_PHP_MEMORY_LIMIT = '32M'; /** * Error reporting level: display no errors. diff --git a/core/modules/simpletest/simpletest.install b/core/modules/simpletest/simpletest.install index 17a64e1..5aabde1 100644 --- a/core/modules/simpletest/simpletest.install +++ b/core/modules/simpletest/simpletest.install @@ -8,7 +8,7 @@ /** * Minimum value of PHP memory_limit for SimpleTest. */ -const SIMPLETEST_MINIMUM_PHP_MEMORY_LIMIT = '64 MiB'; +const SIMPLETEST_MINIMUM_PHP_MEMORY_LIMIT = '64M'; /** * Implements hook_requirements(). @@ -61,7 +61,7 @@ function simpletest_requirements($phase) { // Check the current memory limit. If it is set too low, SimpleTest will fail // to load all tests and throw a fatal error. - if (!drupal_check_memory_limit(SIMPLETEST_MINIMUM_PHP_MEMORY_LIMIT)) { + if (!drupal_check_memory_limit(parse_byte_count(SIMPLETEST_MINIMUM_PHP_MEMORY_LIMIT, TRUE))) { $requirements['php_memory_limit']['severity'] = REQUIREMENT_ERROR; $requirements['php_memory_limit']['description'] = t('The testing framework requires the PHP memory limit to be at least %memory_minimum_limit. The current value is %memory_limit. Follow these steps to continue.', array('%memory_limit' => $memory_limit, '%memory_minimum_limit' => SIMPLETEST_MINIMUM_PHP_MEMORY_LIMIT, '@url' => 'http://drupal.org/node/207036')); } diff --git a/core/modules/system/system.install b/core/modules/system/system.install index 04bf86d..6a5ac17 100644 --- a/core/modules/system/system.install +++ b/core/modules/system/system.install @@ -203,7 +203,7 @@ function system_requirements($phase) { 'value' => $memory_limit ? format_byte_count($memory_limit, TRUE) : t("Unlimited"), ); - if (!drupal_check_memory_limit(DRUPAL_MINIMUM_PHP_MEMORY_LIMIT)) { + if (!drupal_check_memory_limit(parse_byte_count(DRUPAL_MINIMUM_PHP_MEMORY_LIMIT, TRUE))) { $description = ''; 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));