Syntax error in imageapi_gd.module
jax_rox - April 12, 2009 - 07:39
| Project: | ImageAPI |
| Version: | 5.x-1.x-dev |
| Component: | ImageAPI GD |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed |
Description
My site blankscreens with this error message evry time i try installing the ImageAPI module:
Parse error: syntax error, unexpected T_STRING, expecting ')' in /modules/imageapi/imageapi_gd.module on line 242
How do i fix this?

#1
#2
#3
the Problem is
function imageapi_gd_create_tmp(stdClass $image, $width, $height) {the stdClass before $image,
This is quite a new php feature. if "stdClass" is not used here, nothing breakes, there are just problem with wrong parameters.
Are there any reason to use it here?
#4
It should just suggest to PHP the type of the parameter used, but it doesn't give a big help when the parameter is a generic class like in this case.
As the module should be compatible with PHP4, the parameter type should be avoided.
#5
Humm... yeah should fix that. affects both 5.x and 6.x. Committing the attached to DRUPAL-5 and DRUPAL-6--1.
#6
actually only applied to the 5.x branch the 6.x has a PHP 5.1 requirement
#7
#8
Automatically closed -- issue fixed for 2 weeks with no activity.