Problem upgrading from copyright-5.x-1.0 to copyright-5.x-1.2

gines - June 16, 2007 - 14:54
Project:Copyright
Version:5.x-1.2
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:closed
Description

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.

#1

D4rKr0W@darkrow.net - June 17, 2007 - 00:26
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...

#2

toemaz - June 17, 2007 - 12:48
Status:active» needs review

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!)

AttachmentSize
copyright_foreach_by_reference.patch 985 bytes

#3

Robrecht Jacques - June 17, 2007 - 16:22
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!

#4

Gumugum - June 18, 2007 - 05:02

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

#5

Robrecht Jacques - June 18, 2007 - 06:10

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.

#6

Anonymous - July 2, 2007 - 06:15
Status:fixed» closed
 
 

Drupal is a registered trademark of Dries Buytaert.