PHP Fatal error: Argument 1 passed to Sokil \ IsoCodes \ Database \ Countries


The following php fatal error is appearing in the the error log for the last three days.

[24-Jun-2021 17:55:09 Asia/Riyadh] PHP Fatal error:  Uncaught TypeError: Argument 1 passed to Sokil\IsoCodes\Database\Countries::getByAlpha2() must be of the type string, null given, called in /home/seisense/ on line 272 and defined in /home/seisense/
Stack trace:
#0 /home/seisense/ Sokil\IsoCodes\Database\Countries->getByAlpha2(NULL)
#1 /home/seisense/ SearchHandler->authors(Array, Object(Request))
#2 /home/seisense/ PKPRouter->_authorizeInitializeAndCallRequest(Array, Object(Request), Array, false)
#3 /home/seisense/ PKPPageRouter->route(Object(Request))
#4 /home/seisense/ Dispatcher->dispatch( in /home/seisense/ on line 42

Any idea why it started appearing suddenly.

Hi @seisense,

This looks like it’s likely the same issue described here:

Thanks @ewhanson for pointing me to this post. I found a reviewer without the conuntry and issue is resolved now.
But question is why this happen at first place. Because country is a mandatory field for any user.

When a reviewer is added and invited by the ection editor for a review, there I think section editor is not required to fill up the contry information.
May be PKP team can look into it and make it mandatory at this stage as well to avoid this fatal error.