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 |
Jump to:
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
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
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
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
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
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
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 137upon 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.4v1.6 to work against php4? I can download again and test that next.#7
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
I shouldn't get releases out like that every day. Blame my lack of experience ;-)
#9
No errors with MAMP/php4 (4.4.7) and the latest v1.6... thanks!
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
Version 6.x-1.6 working great!
Using PHP 4.4.4
Many thanks for your efficient work!
#11
Thank _you_.
:-)
#12
Automatically closed -- issue fixed for two weeks with no activity.