Jump to content

Memory exhausted


musicmaster

Recommended Posts

In my php_error_log file I have the following error:

PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 69 bytes) in C:\xampp\htdocs\_natura\classes\Tools.php on line 979

This is Prestashop 1.6.1.0 and that line is part of following function:

public static function displayError($string = 'Fatal error', $htmlentities = true, Context $context = null)
{
	global $_ERRORS;

	if (is_null($context))
		$context = Context::getContext();

	@include_once(_PS_TRANSLATIONS_DIR_.$context->language->iso_code.'/errors.php');

	if (defined('_PS_MODE_DEV_') && _PS_MODE_DEV_ && $string == 'Fatal error')
		return ('<pre>'.print_r(debug_backtrace(), true).'</pre>');
	if (!is_array($_ERRORS))
		return $htmlentities ? Tools::htmlentitiesUTF8($string) : $string;
	$key = md5(str_replace('\'', '\\\'', $string));
	$str = (isset($_ERRORS) && is_array($_ERRORS) && array_key_exists($key, $_ERRORS)) ? $_ERRORS[$key] : $string;
	return $htmlentities ? Tools::htmlentitiesUTF8(stripslashes($str)) : $str;
}

Line 978 is "if (!is_array($_ERRORS))".

 

I am puzzled what to make of this error. I am working on a 8GB computer and this is just the login screen so I wouldn't expect memory problems. Neither do I understand how an is_array command can cause a memory problem.

 

Can anyone enlighten me?

Edited by musicmaster (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...