How to resolve this?
Error string:
$req = $this->makeApiCall('users/search/?query='.$username)['users'][0]; PHP 5.3, Ubuntu 12.04
How to resolve this?
Error string:
$req = $this->makeApiCall('users/search/?query='.$username)['users'][0]; PHP 5.3, Ubuntu 12.04
You have a PHP version lower than 5.5, and when declaring an array you cannot immediately use its elements.
Add the following to the top of .htaccess :
#PHP 5.5 AddHandler application/x-httpd-php55 .php Or change PHP to:
$req = $this->makeApiCall('users/search/?query='.$username); $req = $req['users'][0]; Source: https://ru.stackoverflow.com/questions/538375/
All Articles