summaryrefslogtreecommitdiffstats
path: root/0001-fix-Undefined-property-GLPIPDF-imagekeys.patch
blob: 07a91f63a048b70c69b8b4c8984046779a425bbf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
From aeb25939d50249a7de4a8ff5d9d8121b41084678 Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@remirepo.net>
Date: Thu, 19 Sep 2019 13:14:28 +0200
Subject: [PATCH] fix Undefined property: GLPIPDF::$imagekeys

---
 tcpdf.php | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tcpdf.php b/tcpdf.php
index 8238784..d1cf110 100644
--- a/tcpdf.php
+++ b/tcpdf.php
@@ -7796,8 +7796,10 @@ class TCPDF {
 				}
 				closedir($handle);
 			}
-			foreach($this->imagekeys as $file) {
-				unlink($file);
+			if (isset($this->imagekeys)) {
+				foreach($this->imagekeys as $file) {
+					unlink($file);
+				}
 			}
 		}
 		$preserve = array(
-- 
2.20.1