Simple fix for Advanced OpenPortal with PHP 7.1

For anyone else that hits the problem, or so it can be fixed in the main source. Advanced OpenPortal worked fine out of the box with PHP 5.6 for me, but my install of PHP 7.1 would stop on a “Too few parameters” error on line 277 of /com_advancedopenportal/models/SugarCasesConnection.php

I just had to change this:

$cases[] = new SugarCase($sugarcase);

To this:

$cases[] = new SugarCase($sugarcase, null);

^ This fixed my error, but a better solution would probably be to modify line 5 of /com_advancedopenportal/models/SugarCase.php so SugarCase’s parameters better reflect the extended SugarObject, and also is more accepting of usage with a single parameter.

From this:

public function __construct($object,$relations){

To this:

public function __construct($object,$relations = array()){



1 Like