Mark i have the feeling the same thing happens here as with upload banner, where calling filesize() was cached by the server. When used several times on same image, this value gets cached and continues calls use old values if not cleared with clearstatcache()
In the screenshots we might have the same issue
Code:
//Get size in bytes
$weight = filesize("screens/{$cleanurl}.png");
////////////////////////
//Check for good image
if($weight < 13000) {
This gets called several times
If it uses the old black screenshot for filesize check a new image would not generate. And since things work once he deleted the old ones, this sounds quite likely.
So id say we need to use our core function for these, start a new base
First filesize is without second parameter,
Code:
$base->get_file_size($file_path)
following calls to same image have to use the second one to clear the cache
Code:
$base->get_file_size($file_path, true)