Closed (duplicate)
Project:
Drupal core
Version:
7.15
Component:
color.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
4 Oct 2012 at 14:38 UTC
Updated:
4 Oct 2012 at 15:21 UTC
If memory_limit is disabled (set to -1) the color module throws an error.
fix
color.module line 349
$limit = ini_get('memory_limit');
if ($limit != -1)
{
$limit = parse_size($limit);
}
if (($usage + $required > $limit) && ($limit != -1)) {
drupal_set_message(t('There is not enough memory available to PHP to change this theme\'s color scheme. You need at least %size more. memory_limit is set to %limit. Check the <a href="@url">PHP documentation</a> for more information.', array('%size' => format_size($usage + $required - $limit),'%limit' => $limit ,'@url' => 'http://www.php.net/manual/ini.core.php#ini.sect.resource-limits')), 'error');
return;
}
}
The error is parse_size() transforms -1 to 1 and $limit isn't checked if it's -1
Comments
Comment #1
marcingy commentedDuplicate of #1453984: Color module doesn't test for unlimited memory.
Comment #1.0
marcingy commentedfixed truncated text from nano