Describe the problem you’re having:
I recently updated my php install from 7.1 to 7.2 and everything seemed to be working fine, initially, but my feeds seemed to stopped updating. Switching back to 7.1 lead to load of new articles being downloaded, so the feed updating seemed indeed to have stopped.
The updater output looks as always to me, without throwing any errors, so does the webserver log.
There are loads of warnings in the built-in error system, though. Like for example:
E_WARNING (2): classes/feedparser.php:34
DOMDocument::loadXML(): Empty string supplied as input
E_WARNING (2): classes/pref/prefs.php:836
count(): Parameter must be an array or an object that implements Countable
classes/pref/prefs.php(836): ttrss_error_handler(2, count(): Parameter must be an array or an object that implements Countable, classes/pref/prefs.php, 836, Array)
backend.php(123): index()
E_WARNING (2): classes/api.php:248
Use of undefined constant is_numeric - assumed ‘is_numeric’ (this will throw an Error in a future version of PHP)
classes/api.php(248): ttrss_error_handler(2, Use of undefined constant is_numeric - assumed ‘is_numeric’ (this will throw an Error in a future version of PHP), classes/api.php, 248, Array)
api/index.php(80): updateArticle()
E_WARNING (2): classes/api.php:248
Use of undefined constant is_numeric - assumed ‘is_numeric’ (this will throw an Error in a future version of PHP)
classes/api.php(248): ttrss_error_handler(2, Use of undefined constant is_numeric - assumed ‘is_numeric’ (this will throw an Error in a future version of PHP), classes/api.php, 248, Array)
api/index.php(80): updateArticle()
The first two warning are repeater quite often.
If possible include steps to reproduce the problem:
Might be as simple as running tt-rss with php 7.2, maybe there’s more to it.
tt-rss version (including git commit id):
17.4-219-gf53b23c1a
Platform (i.e. Linux distro, PHP, PostgreSQL, etc) versions:
Arch Linux, php 7.1 and 7.2, MySQL (MariaDB 10.1.29)
I’ve been thinking about migrating to NixOS, actually.
Anyways, has any other testing been done with 7.2 so far? I found a thread on here, which is where I got the tip to use “–decrypt-feeds” from, since mcrypt was dropped, but besides that?
Edit: If you want to I have a debian host, I can dump my db, import it there and install php7.2 on it and try it. I doubt it’ll help, though.
i don’t think debian ships php 7.2 in anything approaching stable so no, it probably won’t help
imo as an arch linux user you should be able to use your valuable power user skills to figure out why is_numeric() is missing in your php install without any deprecation mentions on the internet and do accordingly
so far i’m not convinced that your problem is caused by php 7.2 per se
I’ve been using ttrss (latest git version) with PHP 7.2 on FreeBSD for around a fortnight now and have seen no problems at all. It just works fine. And I have deprecated and strict warnings enabled as well.
The only issue is with a 3rd party plugin (fever API) which is now logging the below error. But this isn’t core ttrss. And this plugin will probably break much worse when the PDO database stuff goes live.
PHP Warning: Use of undefined constant ADD_ATTACHED_FILES - assumed ‘ADD_ATTACHED_FILES’ (this will throw an Error in a future version of PHP) in /var/www/ttrss/plugins.local/repos/fever/fever/fever_api.php on line 560
If you rely on the Fever API I would hold off updating to the PDO changes as it’s almost certain to break. I’m not sure that plugin is actively developed anymore. Maybe I’ll take a quick look if I have time; no promises though.
E_WARNING (2): classes/api.php:248
Use of undefined constant is_numeric - assumed ‘is_numeric’ (this will throw an Error in a future version of PHP)the underlying
The mistake in classes/api.php:248
$article_ids = array_filter(explode(“,”, $this->dbh->escape_string($_REQUEST[“article_ids”])), is_numeric);
Yeah, I get that. My comment was because, to my memory, the Fever API interacted with the database directly for everything and I’m not sure to what extent the PDO changes would impact that.
Unfortunately the fever api plugin doesn’t use the API. It uses SQL commands directly to the database. I did say when the author first wrote it that it would be better if it spoke to the official API.
Hm… so I upgraded my php again and updated to newest master (d0cce0c7a431d886403632ef94add650363d4ef6) and it seems to be working, so it might have been an issue with my installation, after all. Not sure exactly what I did. Possibly upgraded php extensions and stuff, but not php itself (oops). I should take a look at the logs. My php install was kind of a mess, because it’s also running nextcloud which does not support 7.2 yet, in a stable release…
The only warning that remains now is the “count(): Parameter must be an array or an object that implements Countable” one. That seems harmless, though.
I’ll report back if the updater breaks again…
I hope you’ll excuse my (most likely) wrong conclusion that this was related to 7.2. I’m not a php guy, so debugging these things is always hard for me.