$res = Cache::rememberForever('qrcode_' . hash('sha256', $toscan), function () use ($toscan) {
try {
+ if (null === $toscan) {
+ return '';
+ }
$result = (new QRCode)->readFromFile($toscan);
$stringRes = (string)$result;
return $stringRes;
if (!isset($attributes['pdf']) || !$attributes['pdf']) {
$pdfpath = $compiler->getPagePDFSource($attributes['page']);
+ if(!$pdfpath){
+ $compiler->addIssue(16, ['error' => 'The zoom area can\'t be generated', 'uid' => $attributes['id'], 'page' => $attributes['page']]);
+ return null;
+ }
$extractPage = 1;
} else {
$pdfpath = $attributes['pdf'];