I am using PHP 4.3.8 and GD 2.0.23-compatible, and this function does not return an empty string on failure as stated. This line:
<?php
var_dump(imagecreatefromjpeg('bogus filename'));
?>
outputs:
bool(false)
Of course this doesn't matter unless you're using a strict comparison operator to evaluate the result, but I thought I'd point it out.