feediron / ttrss_plugin-feediron

Evolution of ttrss_plugin-af_feedmod
https://discourse.tt-rss.org/t/plugin-update-feediron-v1-2-0/2018
MIT License
206 stars 34 forks source link

PHP fatal error on line 663 #128

Closed rom-1 closed 5 years ago

rom-1 commented 5 years ago

Using newest feediron and TinyTinyRSS build, I am getting a uncaught error message in the TTRSS Log when testing a new configuration rule.

For testing purposes, my configuration rule is quite simple: "eurogamer": { "type": "xpath", "xpath": "article" },

My testing URL: https://www.eurogamer.net/articles/2019-03-06-devil-may-cry-5-review-an-unashamedly-old-school-retooling-of-an-action-classic

Error Log: plugins.local/feediron/init.php:663

Uncaught Error: Call to a member function cleanRepair() on boolean in /plugins.local/feediron/init.php:663 Stack trace: #0 /plugins.local/feediron/init.php(223): Feediron->processArticle('<header class="...', Array, 'https://www.eur...') #1 /plugins.local/feediron/init.php(1083): Feediron->getNewContent('https://www.eur...', Array) #2 /classes/pluginhandler.php(12): Feediron->test() #3 /backend.php(126): PluginHandler->catchall('test') #4 {main} thrown | admin | 18:34
------------
tidy_parse_string(): Could not set encoding 'ISO88591'
dugite-code commented 5 years ago

That's a bug, It shouldn't be calling tidy unless explicitly told to

My mistake this is an default true function if tidy is present

dugite-code commented 5 years ago

Ok I've added some charset maps to validate and fix the output. I've also thrown a exception catch on that tidy.

rom-1 commented 5 years ago

Works like a charm, thanks for the quick fix!