unexpected T_OBJECT_OPERATOR

mortenson - May 29, 2008 - 17:41
Project:Terms of Use
Version:6.x-1.2
Component:Code
Category:bug report
Priority:normal
Assigned:Chill35
Status:closed
Description

Downloaded the module, and extract it in my modules folder. Before even activate it I get:

Parse error: syntax error, unexpected T_OBJECT_OPERATOR, expecting ')' in /home/nosfuimo/public_html/sites/all/modules/terms_of_use/terms_of_use.module on line 61

#1

Chill35 - May 29, 2008 - 20:17

I am unable to reproduce but I believe you...

However, before a module is activated, "in theory"... its *.module file is not parsed... only the *.info file is read on the Modules page... so it's hard to understand...

I downloaded the 6.x-1.2 version and had no problems with it, eitheir with it enabled or not.

I will create a new release tonight, 6.x-1.3.

#2

rodrigo21 - June 3, 2008 - 15:18

Hello, I have tried with version 6.x-1.4 now, but I get:

Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /home/nosfuimo/public_html/sites/all/modules/terms_of_use/terms_of_use.module on line 137

thanks for updating the module anyway.

I have also cleared my cache (just in case).

#3

Chill35 - June 3, 2008 - 18:13

What version of Drupal are you using? 6.2?

What version of PHP are you using? 5.1 or up?

Are you absolutely sure that the module is NOT enabled? It probably is. That's why the module file is parsed...

The line that gives you a problem is stil the same one:

$terms = node_prepare($node)->body;

Are you able to go the Modules page and disable the module?

Where is this php error occuring?

#4

Chill35 - June 3, 2008 - 18:12
Title:Error befor activating» unexpected T_OBJECT_OPERATOR

I am 99% sure that our problem here is caused by the version of PHP you are using...
The ()-> would cause PHP 4 to fart.

I will change the *.info file of the module to restrict usage of the module to those setups that use PHP 5.1+, or I will make the module PHP 4 compatible.

PLEASE let me know the exact version of PHP you're using.

#5

Chill35 - June 3, 2008 - 18:10

Latest release of the module — 6.x-1.6 — should be PHP 4 compatible.

I would love you to tell me what version of PHP you are using. Thank you.

(PHP 4 is getting old. Drupal 7 will not support it, FYI.)

#6

emjayess - June 3, 2008 - 18:17

I got the error:

PHP Parse error:  syntax error, unexpected T_OBJECT_OPERATOR in /www/commonizer/sites/all/modules/terms_of_use/terms_of_use.module on line 137

upon installing this module (submitting 'admin/build/modules')... which I downloaded yesterday (June 2nd, where I am)... using MAMP > php4.

here's the .info from what I tried to install:

; $Id: terms_of_use.info,v 1.1.2.1 2008/05/25 18:35:15 chill35 Exp $
name = Terms of Use
description = Adds terms of Use to the registration page.
core = 6.x
; Information added by drupal.org packaging script on 2008-06-02
version = "6.x-1.4"
core = "6.x"
project = "terms_of_use"
datestamp = "1212384617"

I am using MAMP testing locally, so I switched it to php5 and restarted apache, and the error went away (I had other issues with that, but seems to be the memory setting for MAMP's php5/php.ini installation tho, er something)...

Sounds like you just updated v1.4 v1.6 to work against php4? I can download again and test that next.

#7

Chill35 - June 3, 2008 - 18:19

Sounds like you just updated v1.4 to work against php4? I can download again and test that next.

Yeah I did. Plus I fixed a bug. I add new releases faster than a gun shooter in the Far West. I am at 6.x-1.6 now I think.

I think that the module should *still* work with PHP 4, even though it's getting old, so I fixed the offensive line.
Please retest with PHP 4, that'd be awesome.

(But if you're out of time, that's ok too.)

#8

Chill35 - June 3, 2008 - 18:21

I shouldn't get releases out like that every day. Blame my lack of experience ;-)

#9

emjayess - June 3, 2008 - 18:54
Version:6.x-1.2» 6.x-1.6

No errors with MAMP/php4 (4.4.7) and the latest v1.6... thanks!

I shouldn't get releases out like that every day. Blame my lack of experience ;-)

I was just happy to see that you had a 6.x version yesterday when I needed it, and that when I came back today you were already fixing on the issue I had! I think that's great maintainership... inevitably you (we) need to rely on community to test and find (and report) bugs, and in that way this issue was resolved quicker than if you had attempted to test all configurations yourself first.

I myself have been putting off getting my own contrib/cvs account -- soon enough I will to share some of the modules I have built ;)

thanks again.

#10

mortenson - June 3, 2008 - 19:28

Version 6.x-1.6 working great!
Using PHP 4.4.4

Many thanks for your efficient work!

#11

Chill35 - June 3, 2008 - 19:37
Version:6.x-1.6» 6.x-1.2
Assigned to:Anonymous» Chill35
Status:active» fixed

Thank _you_.

:-)

#12

Anonymous (not verified) - June 17, 2008 - 19:42
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.