Skip to content

[Bug] PHP Fatal error #6898

@vslonska

Description

@vslonska

Describe the bug

Hello,

I have a systematic PHP fatal error, both in error logs and in Cron logs :

PHP Fatal error:  Uncaught TypeError: preg_replace(): Argument #3 ($subject) must be of type array|string, bool given in /lib/favicons.php:117

Stack trace:
#0 /lib/favicons.php(117): preg_replace()
#1 /app/Models/Feed.php(247): download_favicon()
#2 /app/Controllers/feedController.php(711): FreshRSS_Feed->faviconPrepare()
#3 /app/Controllers/feedController.php(855): FreshRSS_feed_Controller::actuali>
#4 /lib/Minz/Dispatcher.php(120): FreshRSS_feed_Controller->actualizeAction()
#5 /lib/Minz/Dispatcher.php(51): Minz_Dispatcher->launchAction()
#6 /lib/Minz/FrontController.php(61): Minz_Dispatcher->run()
#7 /app/actualize_script.php(106): Minz_FrontController->run()
#8 {main}
  thrown in /lib/favicons.php on line 117

I use PHP 8.1.

One of the feed used and concerned is I think : https://www.radiofrance.fr/rss/environnement

Thank you,

To Reproduce

  1. Update feeds
  2. There is a php fatal error in logs and some pictures of some feeds are not present.

Expected behavior

No response

FreshRSS version

1.24.3

Environment information

  • Mysql 8.0.39
  • PHP 8.1
    -Web server type: Apache
  • OS: 24.04
  • Browser: all

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bug (unconfirmed)issues that could not be reproduced yet

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions