Tiny Tiny RSS: Community

PHP7.4 deprecations

I know you’ll probably shout at me for being a hipster and running a bleeding edge .0 release of PHP. But I thought I would just report a couple of things so that you are aware and before other people come asking about it.

TTRSS works perfectly fine with 7.4.0 with two exceptions.

The favicon color script appears to be broken and none of the feeds have colors any longer. There is an error logged in the console on every feed update which is E_DEPRECATED. It looks like hexdec on line 208 of colors.php is getting some input that it doesn’t like. I’m assuming it’s the # character.

Invalid characters passed for attempted conversion, these have been ignored

  1. include/colors.php(208): hexdec(#cc66cc)
  2. classes/feeds.php(371): _color_unpack(#cc66cc)
  3. classes/feeds.php(557): format_headlines_list(-3, ForceUpdate, adaptive, 30, , 0, , 1, , , default)
  4. backend.php(123): view()

The other issue is this line is being logged in my PHP error log.

PHP Deprecated: Function get_magic_quotes_gpc() is deprecated in /www/ttrss/backend.php on line 7

hexdec() likely expects a hex triplet without #, which makes sense. i’ll make a note to take a look at this unless someone files a PR first.

we only call it to ensure it is disabled, i think. i’m not sure if this is really needed anymore tbh.

I was gonna take a look at this and re-registered on your Gogs; tried to fork but it said I had hit the limit (0); When you get a chance, can you do the needful? Gogs account is tsimmons?

Thanks &

the needful should be done now :slight_smile:

Awesome, thanks! And of course today I’m slammed and cannot get to it. :rofl:

My event log has been spammed with this E_DEPRECATED warning since I upgraded to php 7.4:

Array and string offset access syntax with curly braces is deprecated
1. include/autoload.php(24): ttrss_error_handler(8192, Array and string offset access syntax with curly braces is deprecated, classes/feeds.php, 1927, Array)
2. include/autoload.php(24): include()
3. classes/rssutils.php(1580): spl_autoload_call(Feeds)
4. classes/rssutils.php(543): load_filters(17, 2)
5. classes/rssutils.php(148): update_rss_feed(17, 1, )
6. update.php(250): update_daemon_common(50)

e: I noticed the mention of filters in the backtrace, some of my filters use “match any rule”, if that helps.

i’m not even sure why is this using { } :man_shrugging: this is ancient code though.

this should deal with both, i think:

tell me if i broke anything.

e: i’ve also removed that magic quote thing entirely. apparently it didn’t do anything since php 5.4 anyway so it was only there because nobody bothered to ask for its removal.

Updated. Warnings have gone away. Nothing seems broken. Thanks :slight_smile: