File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
app/Http/Controllers/Assets Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change 3030use Illuminate \Contracts \View \View ;
3131use Illuminate \Http \RedirectResponse ;
3232use Symfony \Component \HttpFoundation \BinaryFileResponse ;
33+ use TypeError ;
3334
3435/**
3536 * This class controls all actions related to assets for
@@ -590,7 +591,7 @@ public function getBarCode($assetId = null)
590591 file_put_contents ($ barcode_file , $ barcode_obj ->getPngData ());
591592
592593 return response ($ barcode_obj ->getPngData ())->header ('Content-type ' , 'image/png ' );
593- } catch (\Exception $ e ) {
594+ } catch (\Exception | TypeError $ e ) {
594595 Log::debug ('The barcode format is invalid. ' );
595596
596597 return response (file_get_contents (public_path ('uploads/barcodes/invalid_barcode.gif ' )))->header ('Content-type ' , 'image/gif ' );
You can’t perform that action at this time.
0 commit comments