PHP Classes

Support PHP 7

Recommend this page to a friend!

      Very Simple API  >  All threads  >  Support PHP 7  >  (Un) Subscribe thread alerts  
Subject:Support PHP 7
Summary:changes to be PHP7 compliance
Messages:1
Author:Claudio De Siervi
Date:2018-10-13 23:16:51
 

  1. Support PHP 7   Reply   Report abuse  
Picture of Claudio De Siervi Claudio De Siervi - 2018-10-13 23:16:51
In order to be compliance with php7 rules, you have to update this code to run on this environment.

Change #1: at AbstractService.php file change this line
$this->$callOnMethods[$this->requestedMethod]();
by this new one:
$this->{$callOnMethods[$this->requestedMethod]}();
// see brackets...

Change#2: at AbstractService.php file change this line
if (count(xmlrpc_decode($requestContents)) > 0) {
by those new ones:
if(is_array(xmlrpc_decode($requestContents))) {
$qt = count(xmlrpc_decode($requestContents));
} else {
$qt = 0;
}
if ($qt > 0) {
// count string is not supported on php7

I hope it will be useful for you.