Closed elerocks closed 2 years ago
Problem Trying to read attached file will cause
Undefined array key 39 at /project/vendor/enjoping/dxfighter/DXFighter.php
Undefined array key 39
/project/vendor/enjoping/dxfighter/DXFighter.php
(github does not allow uploading dxf files, so the uploaded file is regular dxf with manually changed extension to svg)
Solution change $thickness = $data[39] ? $data[39] : 0; to $thickness = isset($data[39]) ? $data[39] : 0;
$thickness = $data[39] ? $data[39] : 0;
$thickness = isset($data[39]) ? $data[39] : 0;
Additional details Tested on PHP 8.1
I've just noticed it is duplicate of https://github.com/enjoping/DXFighter/issues/18 , so closing this one
Problem Trying to read attached file will cause
Undefined array key 39
at/project/vendor/enjoping/dxfighter/DXFighter.php
(github does not allow uploading dxf files, so the uploaded file is regular dxf with manually changed extension to svg)
Solution change
$thickness = $data[39] ? $data[39] : 0;
to$thickness = isset($data[39]) ? $data[39] : 0;
Additional details Tested on PHP 8.1