Código PHP:
function error($img) {
$info = getimagesize($img);
$this->rw = $info[0];
$this->rh = $info[0];
$this->source = @imagecreatefromjpeg ($img); // suponiendo ke es JPEG/JPG
$this->error = true;
return true;
}
intenta reemplazando la funcion error() con esto.... dime, sino... me mato :(