When upgraded web don't work showing at apache error logs:

PHP Parse error: syntax error, unexpected '&', expecting T_VARIABLE or '$' in /var/www/vhosts/??????????/httpdocs/modules/copyright/copyright.module on line 573

My php version is 4.4.2.

I can't even run update, because apache stop by this error.

PS: Sorry for my english, I speak spanish.

CommentFileSizeAuthor
#2 copyright_foreach_by_reference.patch985 bytestoemaz

Comments

D4rKr0W@darkrow.net’s picture

Priority: Normal » Critical

I do have the same problem.

This is happening with both 1.1 and 1.2 versions of the module.
My php version is 4.4.7-0.dotdeb.0, hope it's not because the system is hardened (kernel,apache,php...).
Hope you guys are going to fix this issue soon...

toemaz’s picture

Status: Active » Needs review
StatusFileSize
new985 bytes

As of PHP 5, you can easily modify array's elements by preceding $value with &. This will assign reference instead of copying the value.

Two possible solutions for this particular issue:

  1. upgrade your php from 4.x to 5.x
  2. apply the attached patch (not tested yet!)
Robrecht Jacques’s picture

Status: Needs review » Fixed

Yes, this is a PHP5-only construct that found its way into the code.

Fixed in 5.x-1.3.

If you think the problem is not fixed using this new version, please reopen this issue. Thanks toemaz!

Anonymous’s picture

When I upgraded from 1.0 to 1.3 and ran update.php, I got the following error:

* warning: array_merge() [function.array-merge]: Argument #2 is not an array in /public_html/update.php on line 309.
* warning: Invalid argument supplied for foreach() in /public_html/update.php on line 540.

Although so far the site is running fine after the upgrade, and the Switch Themeissue seems to have been fixed.

Will the above error have any negative effects? My PHP version is 5.1.6 and MySQL database 4.1.21

Robrecht Jacques’s picture

Your update succeeded correctly - don't worry.

There was a little bug that resulted in returning the wrong thing update.php was expecting. Fixed in 5.x-1.4.

Anonymous’s picture

Status: Fixed » Closed (fixed)