Skip to content

Commit 4eb37e0

Browse files
author
Martin Brecht-Precht
committed
Fixed an issue with non writable temp dir.
1 parent e00d5bf commit 4eb37e0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

QrEncode/QrEncoder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ public function encodeQrCode($contents)
120120
} else {
121121
throw new QrEncoderException('QR encoder internal error');
122122
}
123-
$image = imagecreatefrompng($pngPath);
124-
if (!isset($image)) {
123+
$image = @imagecreatefrompng($pngPath);
124+
if ($image === false) {
125125
throw new QrEncoderException('GD lib internal error');
126126
}
127127
// Delete file created by qrencode

0 commit comments

Comments
 (0)