barryvdh / laravel-dompdf

A DOMPDF Wrapper for Laravel
MIT License
6.66k stars 966 forks source link

ParseError: syntax error, unexpected identifier "am" #924

Closed anatolistoev closed 1 year ago

anatolistoev commented 1 year ago

After upgrading dompdf from 1.0 to 2.0 in connection with php 8.0.22 and php 8.0.24 we see the following permanent error in application logs:

ParseError: syntax error, unexpected identifier "am" in /home/www/dbdn-l9/vendor/dompdf/dompdf/src/PhpEvaluator.php(52) : eval()'d code:1 syntax error, unexpected identifier "am" {"userId":6, "exception":"[object] (ParseError(code: 0): syntax error, unexpected identifier \"am\" at /home/www/app-name/vendor/dompdf/dompdf/src/PhpEvaluator.php(52) : eval()'d code:1)

No PDF files are generated and the function fails every time.

Is this anomaly known and has it already been reported by others? How should we proceed here? Your recommendation would be greatly appreciated in this matter.

atontchev commented 1 year ago

We are experiencing the same thing and are wondering what the problem could be ... We have been using laravel-dompdf for over seven years and boldly recommend it with only positive feedback.

PaolaRuby commented 1 year ago

How should we proceed here?

This is only a laravel wrapper, the issues about pdfs must be on the original dompdf package

https://github.com/dompdf/dompdf/blob/06f75510a1ccc937137523f0cd6239f62586d1ef/src/PhpEvaluator.php#L35-L53

anatolistoev commented 1 year ago

Thank you for your comment. I‘ll address our issue to dompdf directly and post it there for further assistance. :)

parallels999 commented 1 year ago

https://github.com/dompdf/dompdf/issues/3027#issuecomment-1277738596 Answered, must close this