QuilhaSoft / JasperPHP

Pure PHP library to read JRXML files made in "JasperSoft Studio" and generate reports in PDF/XLS
https://jasperphp.net
MIT License
65 stars 25 forks source link

Fatal error with php 8.0 #88

Open ustunsoz opened 3 years ago

ustunsoz commented 3 years ago

I am using PHP 8.0 and getting following errors, is there a known issue to run under php 8.0?

Fatal error: Uncaught Error: Non-static method JasperPHP\StaticText::formatPen() cannot be called statically in /var/www/html/reports/MyCode/jasperPHP_20211007/quilhasoft/jasperphp/src/StaticText.php:204 Stack trace: #0 /var/www/html/reports/MyCode/jasperPHP_20211007/quilhasoft/jasperphp/src/StaticText.php(62): JasperPHP\StaticText::formatBox() #1 /var/www/html/reports/MyCode/jasperPHP_20211007/quilhasoft/jasperphp/src/Band.php(26): JasperPHP\StaticText->generate() #2 /var/www/html/reports/MyCode/jasperPHP_20211007/quilhasoft/jasperphp/src/Element.php(174): JasperPHP\Band->generate() #3 /var/www/html/reports/MyCode/jasperPHP_20211007/quilhasoft/jasperphp/src/ColumnHeader.php(37): JasperPHP\Element->generate() #4 /var/www/html/reports/MyCode/jasperPHP_20211007/quilhasoft/jasperphp/src/Element.php(174): JasperPHP\ColumnHeader->generate() #5 /var/www/html/reports/MyCode/jasperPHP_20211007/quilhasoft/jasperphp/src/Report.php(668): JasperPHP\Element->generate() #6 /var/www/html/reports/MyCode/Report001/report.php(26): JasperPHP\Report->generate() #7 /var/www/html/reports/MyCode/Report001/report.php(59): TJasper->outpage() #8 {main} thrown in /var/www/html/reports/MyCode/jasperPHP_20211007/quilhasoft/jasperphp/src/StaticText.php on line 204

Rctnet commented 2 years ago

Hi @ustunsoz , I solved many problems at last weekend, and this is one, please, update and test again.