--- /home/klavs/drupal5/drupal-5.14/modules/color/color.module 2008-02-11 07:53:01.000000000 +0100 +++ modules/color/color.module 2009-01-12 09:28:06.000000000 +0100 @@ -211,7 +211,12 @@ // We need at least a copy of the source and a target buffer of the same // size (both at 32bpp). $required = $width * $height * 8; + if (version_compare(phpversion(), 5.20) < 0) { $usage = memory_get_usage(); + } + else { + $usage = memory_get_usage(1); + } $limit = parse_size(ini_get('memory_limit')); if ($usage + $required > $limit) { 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. Check the PHP documentation for more information.', array('%size' => format_size($usage + $required - $limit), '@url' => 'http://www.php.net/manual/en/ini.core.php#ini.sect.resource-limits')), 'error');