Menu

#1138 getimagesize Exception when using same png multiple times (+ fix)

v1.0_(example)
open
None
1
2017-10-18
2017-10-18
Nico
No

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) {

Discussion


Log in to post a comment.