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?

CommentFileSizeAuthor
#7 imageapi_431422.D5.patch708 bytesdrewish
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

apaderno’s picture

Title: Error in GD module making my site unworkable » Syntax error in image_gd.module
apaderno’s picture

Title: Syntax error in image_gd.module » Syntax error in imageapi_gd.module
Component: Code » ImageAPI GD
dawehner’s picture

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?

apaderno’s picture

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.

drewish’s picture

Version: 5.x-1.5-beta1 » 6.x-1.x-dev
Status: Active » Fixed

Humm... yeah should fix that. affects both 5.x and 6.x. Committing the attached to DRUPAL-5 and DRUPAL-6--1.

drewish’s picture

Version: 6.x-1.x-dev » 5.x-1.x-dev

actually only applied to the 5.x branch the 6.x has a PHP 5.1 requirement

drewish’s picture

FileSize
708 bytes

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.