Author Topic: Error 4images 1.10 on php 8.1 (rss item)  (Read 1634 times)

0 Members and 1 Guest are viewing this topic.

Offline Murat

  • Jr. Member
  • **
  • Posts: 97
    • View Profile
    • Lavinya
Error 4images 1.10 on php 8.1 (rss item)
« on: April 23, 2024, 02:21:55 PM »
Hello. I am using 4images 1.10. PHP 8.1 is installed on my website (ubuntu 22.04.4) All php plugins are active.

The rss on the photos at ./rss.php?action=comments&image_id=1 is working. However, if there is a comment on the photo, the page RSS does not work. It gives the following error.

Code: [Select]
AH01071: Got error 'PHP message: PHP Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /../public/4imag/rss.php:309 \nStack trace:\n#0 {main}\n thrown in /../public/4imag/rss.php on line 309'
I did a clean install. The result did not change. The RSS feed of a commented page works in PHP 7.4, but it does not work in PHP 8.1, but it works if the photo is not commented on.

The 309th line of rss.php where the error occurs is as follows:

Code: [Select]
if (@count($item['enclosure']) > 0) {
We would appreciate it if you make it compatible with PHP 8.1. I wish you good work.

By the way, off topic; I became a 20th anniversary user after 1 month :) (2004-2024, I met you when you were 23 years old. I turned 43 years old.);u=7752

« Last Edit: April 23, 2024, 02:47:18 PM by Murat »
<?php echo 'Hello, World!'; ?>