PHP call error in 3.1.1.4 lockss code

At line 26 in pages/gateway/GatewayHandler.inc.php there is a call
function lockss($args, $request) {
$this->validate();
$this->setupTemplate();

This causes a fatal PHP error because the function requires an argument (lib/pkp/classes/handler/PKPHandler.inc.php line 434). There are some comments at the called function:
function setupTemplate($request) {
// FIXME: for backwards compatibility only - remove
if (!isset($request)) {
$request =& Registry::get(‘request’);
if (Config::getVar(‘debug’, ‘deprecation_warnings’)) trigger_error(‘Deprecated call without request object.’);
}
assert(is_a($request, ‘PKPRequest’));

I guess that our PHP (version 7.2.4) is less lenient than it used to be. Should I just add $request as an argument to the call, or is it more complicated than that?

Thanks, Brendan.