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

kiamlaluno - April 12, 2009 - 07:43
Title:Error in GD module making my site unworkable» Syntax error in image_gd.module

#2

kiamlaluno - April 12, 2009 - 07:44
Title:Syntax error in image_gd.module» Syntax error in imageapi_gd.module
Component:Code» ImageAPI GD

#3

dereine - April 12, 2009 - 08:02

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

kiamlaluno - April 12, 2009 - 20:37

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

drewish - April 13, 2009 - 19:11
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.

#6

drewish - April 14, 2009 - 08:35
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

#7

drewish - April 14, 2009 - 08:35
AttachmentSize
imageapi_431422.D5.patch 708 bytes

#8

System Message - April 28, 2009 - 08:40
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.