Long time tt-rss user. I’d like to contribute to tt-rss in general. Specifically, I’m interested in bug fixing and expanding plugins like af_redditimgur. Especially keeping them up-to-date with changes to external sources.
My Gogs account is koffieanon too. I already have a fix lined up for for redditimgur, so it be great if I can fork and PR too.
That refers to this line:
git[dot]tt-rss[dot]org/fox/tt-rss/src/master/plugins/af_redditimgur/init.php#L441
It isn’t related to the latest pull request that I made. Looking at the code it seems that this would occur if the article content contains a link but without an href element. Very curious. If have the feed / article this happened on it is possible to confirm.
Is modified to require the href attribute in the query, like such:
$content_link = $xpath->query("(//a[@href and contains(., '[link]')])")->item(0);
That will probably fix it. It looks like getAttribute is also called on line 406 (conditionally). I don’t use this plugin so I cannot test against my fix (therefore, I’m not doing a PR).