REST Api v4_1 Issue with getting entry list

I have a latest SuiteCRM Version 7.11.18 Setup on AWS EC2 Ubuntu 20.04 with PHP Version 7.4.3

So i followed “Example 16.4: Accessing the REST API” at https://docs.suitecrm.com/developer/api/api-4_1/#_rest which was returning NULL.

so i enabled errors in the curl, and it throws out following message.

PHP Fatal error: Uncaught Error: Unsupported operand types in /var/www/html/data/SugarBean.php:4217
Stack trace:
#0 /var/www/html/service/v4/SugarWebServiceUtilv4.php(120): SugarBean->process_list_query()
#1 /var/www/html/service/v4/SugarWebServiceImplv4.php(311): SugarWebServiceUtilv4->get_data_list()
#2 /var/www/html/service/core/REST/SugarRestJSON.php(94): SugarWebServiceImplv4->get_entry_list()
#3 /var/www/html/service/core/SugarRestService.php(136): SugarRestJSON->serve()
#4 /var/www/html/service/core/webservice.php(70): SugarRestService->serve()
#5 /var/www/html/service/v4_1/rest.php(56): require_once(’/var/www/html/s…’)
#6 {main} thrown in /var/www/html/data/SugarBean.php on line 4217

all i can see at that line is a code related to Offset?

$previous_offset = $row_offset - $max_per_page;

can someone point to why the Rest API is not working in this case?

Hey,

Are you still having issues with this?

I’ve given it a try on 7.11.18, with PHP 7.2, and was able to run the example without issues

I’m not sure if PHP 7.4 is fully supported at the moment, as its not in the Support Matrix:

It may be worth giving this a try on a previous PHP version, if you haven’t already?

What I’ve been seeing with everybody that tries PHP 7.4 is that they quickly run into trouble, many different forms of trouble. I would say it’s definitely not supported and not advisable at the moment.

1 Like