Merge pull request #20187 from SylvainLegrand/Debug_TCPDF_file_name

Debug TCPDF file name with spaces
This commit is contained in:
Laurent Destailleur 2022-02-25 13:21:41 +01:00 committed by GitHub
commit 28d91bfcf4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6881,6 +6881,11 @@ class TCPDF {
// DOL CHANGE If we keep this, the image is not visible on pages after the first one.
//var_dump($file.' '.(!@TCPDF_STATIC::file_exists($file)));
//return false;
// try to encode spaces on filename
$tfile = str_replace(' ', '%20', $file);
if (@TCPDF_STATIC::file_exists($tfile)) {
$file = $tfile;
}
}
if (($imsize = @getimagesize($file)) === FALSE) {
if (in_array($file, $this->imagekeys)) {