liuch / dmarc-srg

A php parser, viewer and summary report generator for incoming DMARC reports.
GNU General Public License v3.0
218 stars 32 forks source link

Two errors with PHP8.2 (fix included) #52

Closed ReVoLt112 closed 1 year ago

ReVoLt112 commented 1 year ago

dmarc-srg [error]: ErrorException: Creation of dynamic property Liuch\DmarcSrg\Report\Report::$db is deprecated in /var/www/html/classes/Report/Report.php:36

Solution declare "private db;" in class

dmarc-srg [error]: ErrorException: Using ${var} in strings is deprecated, use {$var} instead in /var/www/html/classes/Database/Mariadb/ReportMapper.php:598

Solution place dollar sign $ inside the curly braces

liuch commented 1 year ago

My oversight. Apparently you need to upgrade to version 8.2. to catch such errors. Thank you so much.

liuch commented 1 year ago

There are several other such errors:

$ grep '\${' 2>/dev/null * -r | wc -l
5

Thanks again.

ReVoLt112 commented 1 year ago

you're welcome

liuch commented 1 year ago

Fixed with 9ebc3291f6322511177341300a4a91a08b28c6ef