erebusnz / gapi-google-analytics-php-interface

GA:PI() - Google Analytics PHP Interface
167 stars 86 forks source link

Syntax error in reportObjectMapper array_filter callback function (anonymous PHP function) #115

Closed forumco closed 9 years ago

forumco commented 9 years ago

I have this error message when i load example.report.php :

Parse error: syntax error, unexpected T_FUNCTION in /.../gapi.class.php on line 277

Any idea what is causing this bug ?

ghost commented 9 years ago

I have some error.

Parse error: syntax error, unexpected T_FUNCTION in /.../gapi.class.php on line 277

Any solution?

erebusnz commented 9 years ago

Since v2.0.0 version, minimum PHP requirement is PHP 5.3.0 due to use of anonymous functions.

Currently cannot replicate this error in PHP 5.5.9, 5.5.24 or 5.6.8. Please supply PHP version number if you wish further investigation.

It would be possible to re-write GAPI to work with old versions but not recommended, PHP does not support versions earlier 5.3 any longer and does not provide security updates.