1
0
mirror of https://github.com/tecnickcom/TCPDF.git synced 2025-03-22 15:09:40 +01:00

Merge pull request from przemekperon/php74-fix

Fix for PHP 7.4
This commit is contained in:
Nicola Asuni 2020-12-09 07:13:46 +00:00 committed by GitHub
commit 2a75e5ac4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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