Unexpected T_OBJECT_OPERATOR in gravatar.module
domesticat - June 17, 2008 - 13:49
| Project: | Gravatar integration |
| Version: | 6.x-1.2 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Narno |
| Status: | closed |
Jump to:
Description
Drupal 6.2
PHP 4.4.2 (which I think is the root of the problem)
When I try to enable gravatar 6.x-1.2, I get the following error:
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in [redacted...]/sites/all/modules/gravatar/gravatar.module on line 86
This is line 86:
<?php
$gravatar = gravatar_get_gravatar(($data->gravatar_email ? $data->gravatar_email : user_load(array('uid' => $account->uid))->mail));
?>This is a new error to me. A bit of digging makes me think it's an incompatibility between this version of gravatar and PHP 4.

#1
Yes, Gravatar require PHP 5.x
Sorry ! :-P
#2
Please consider adding a README or some documentation indicating this dependency.
#3
#4
I think with a little modification in the code Gravatar module will be supported by PHP 4.
I will commit that with the next release.
#5
#6