﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
8594	Running out of memory when delete an article ...	ixiter	anonymous	".. and throws an error in line wp-includes/class.snoopy.php on line 894.[[BR]]
There are several problems. It tries to allocate $this->maxlength bytes for a file to read. maxlength is set to 500.000 - as good as any other ""guessed"" value. What if the filesize is higher? Usually the filesize is lower. So I patched line 894 and replaced it with:

{{{
// $_data = fread($fp, $this->maxlength);
$_data = '';
while(!feof($fp)){
	$_data .= fread($fp, 10240);
}
}}}

This might be slower. But we can ignore this, since it prevents us from running out of memory in low max_memory PHP environments. Less than or equal to 24MB.
I have no idea what the other 23,5 MB were used for by WP, when I recognized this error?!"	defect (bug)	closed	normal		Administration		normal	invalid		
