OJS 3.1.1.2 Call to a member function getRemoteURL() on null

After our upgrade to OJS 3.1.1.2 I am getting a lot of errors like this:

PHP Fatal error: Call to a member function getRemoteURL() on null in /var/www/www.journal.fi/public_html/pages/article/ArticleHandler.inc.php on line 260

Has someone seen these before?

@asmecher, I found the reason for the error.

It happens in situations where an article has no galley files, just the abstract page published.

For example Changes in the life patterns of families in the Nordic countries | Finnish Yearbook of Population Research.

What triggers the download on articles like that I am not sure, because the error happens here: ojs/ArticleHandler.inc.php at ojs-stable-3_1_1 · pkp/ojs · GitHub. Maybe some bots are trying to fetch those article/download/xxxxx url’s automatically?

Hi @ajnyga,

I suppose it could be a scrape attempt? You might take a look in the access log at prior requests for that IP address to see if they’re coming from somewhere in particular (or check the referral URL, if there is one).

Meanwhile, I’ve changed the code to result in a 404 rather than a fatal error:

Regards,
Alec Smecher
Public Knowledge Project Team

Hi,

Yes, they seem to be coming from a single IP located to China. I will use the patch to solve this, thanks!