gadgetto / GoodNews

An integrated group and newsletter mailing system for MODX Revolution CMF
GNU General Public License v2.0
10 stars 4 forks source link

php8 Error in getresourcelist.class.php #99

Open Serifenlos opened 1 year ago

Serifenlos commented 1 year ago

Hi – sorry I don’t know how to create a pull request:

GoodNews 1.6.1 Modx 2.8.4

After i updated the server form php7.2 to php8.1, I did’t get the collections of resources to attach to the Mailing any more. In the error_log of the Server i found is error: AH01071: Got error 'PHP message: PHP Fatal error: Uncaught TypeError: mb_strrpos(): Argument #3 ($offset) must be of type int, string given in /var/www/vhosts/***/httpdocs/core/components/goodnews/processors/mgr/collection/getresourcelist.class.php:131

in the file (line 131) is $offset missing as the third argument of mb_strrpos() /core/components/goodnews/processors/mgr/collection/getresourcelist.class.php:131

instead of $length = mb_strrpos($output, $break, $encoding);

must be this $length = mb_strrpos($output, $break, 0, $encoding);

Thanks for GoodNews!