Fix for PHP 7.4

This commit is contained in:
Przemek Peron 2020-10-01 20:27:02 +02:00
parent 485956db63
commit 9e8861b4dc

View File

@ -6866,6 +6866,12 @@ class TCPDF {
list($x, $y) = $this->checkPageRegions($h, $x, $y);
$exurl = ''; // external streams
$imsize = FALSE;
// Make sure the file variable is not empty or null because accessing $file[0] later
// results in error when running PHP 7.4
if (empty($file)) {
return false;
}
// check if we are passing an image as file or string
if ($file[0] === '@') {
// image from string