Active
Project:
dependantDropdown
Version:
5.x-1.0-beta
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Dec 2006 at 04:24 UTC
Updated:
27 Jan 2007 at 16:11 UTC
Parse error: parse error, unexpected '&', expecting T_VARIABLE or '$' in /usr/local/apache/htdocs/sitename.com/drupal474/modules/dependantDropdown/dependantDropdown.module on line 79
Note: drupal 4.7.4
Comments
Comment #1
hedb commentedThe error comes in this line:
foreach ($form as $fieldname => &$field)
It seems that this syntax is not accepted: "=> &$"
What is your PHP version?
Do you know what is drupal policy towards php versions?
I'll take a look how to refactor the code so it'll work on previous versions.
hed
Comment #2
scroogie commentedQuoted from here:
In this case i think you could just do
instead of
and drop the reference in the foreach.
Comment #3
coupet commentedServer is setup as follows:
PHP Version 4.4.0
Apache/1.3.33 (Unix) PHP/4.4.0 FrontPage/5.0.2.2635 mod_throttle/3.1.2 mod_ssl/2.8.22 OpenSSL/0.9.7a
Comment #4
hedb commentedscroogie answer is right i guess,
now does any of you guys know how do i maintain two branches in CVS to post this fix?
because my CVS version is already forwarded to 5
tnx,
hed
Comment #5
coupet commentedCVS Branches
http://drupal.org/node/17570
Comment #6
coupet commentedLooking forward for a patch
Comment #7
hedb commentedA patch?
I'm missing something
i opened another branch for 4.7 and fixed it there
My main branch is 5.0 compatible
I must admit that i don't understand those releases.
Comment #8
coupet commentedI downloaded and installed both 4.7 releases on 1/05/2006 and getting same parse error.
Comment #9
Budrick commentedIve changed this function and it works for me on php 4.4.4:
Comment #10
ray007 commentedThe latest 5.x version download has the same problem:
replacing the line
foreach ($form as $fieldname => &$field) {with
makes the error go away ... will test now if it works as expected.