getimagesize Exception when using same png multiple times (+ fix)
PHP class for PDF
Brought to you by:
nicolaasuni
Under certain circonstances, when inserting the same png image multiple times, we got the following error :
tcpdf.php#6850 - getimagesize(d:\wamp\xxxxxxx_imgmask_alpha_xxxxx) : No such file or directory
The corresponding instruction is the folowing :
if (($imsize = @getimagesize($file)) === FALSE) {
Despit the use of "@" sign, the erreur occurs, so I changed code to catch exception :
$imsize = false;
try {
$imsize = @getimagesize($file);
}
catch (\Exception $e) {}
if ($imsize === FALSE) {