PHP 5.3 generate warnings on Content Translate page:

warning: Parameter 1 to theme_i18n_node_select_translation() expected to be a reference, value given in C:\HTTP\Default\web\includes\theme.inc on line 617.
warning: Parameter 1 to theme_i18n_node_select_translation() expected to be a reference, value given in C:\HTTP\Default\web\includes\theme.inc on line 617.

This is PHP 5.3 incompatibility issue, like other modules ( Views for example - http://drupal.org/node/452384 ).
Removing the ampersand '&' in first parameters may be sufficient for resolve this bug.

Platform: Apache/2.2.13 (Win32) PHP/5.3.0. MySQL: 5.1.39-community.

CommentFileSizeAuthor
#7 i18n_php53fixes.patch671 bytesberdir

Comments

jose reyero’s picture

Category: bug » task

I guess there will be more than that one, though I'm not using PHP 5.3 yet, nor I'll be using it for a while given the troubles it causes.

Patches welcomed.

hass’s picture

I tried to get my DEV environment running on XAMPP 1.7.1, 1.7.0 with MySQL 5.1.33 and others - I've skipped 1.7.2 for the reason that D5 does not run on PHP 5.3 and this are ***damn*** buggy database server versions!!! The issues started with not being able to restore a valid backup from 5.0.x (duplicate entries in search tables - looks like collation bugs) and ends with a completely broken site with very strange errors. Wasted 2 days with this sh** without getting a real idea what's wrong and I'm downgraded back and forth and ended with XAMPP 1.6.8 having PHP 5.2.x and MySQL 5.0.x - unbelievable :-(((. Than I found this http://www.palantir.net/blog/beware-mysql-51-my-son...

How are you able to run Drupal on this versions???

W32’s picture

From your link:
Current version is 5.1.33, so it's been fixed in the last two releases: http://dev.mysql.com/doc/refman/5.1/en/news-5-1-32.html

hass’s picture

I'm still not able to restore my older db on 5.1.x without errors - this is selfspeaking enough. Ignoring them can help but drupal 6.14 is also broken afterward. Debugging have only shown that mysql got/produced connection resets.

Plus it's written in the drupal docs that you should only use mysql 5.0.x

W32’s picture

Ok. Thank you.

berdir’s picture

theme() functions cannot have any by-reference params, so it is save to remove them.

berdir’s picture

Status: Active » Needs review
StatusFileSize
new671 bytes

All other theme functions are ok and I haven't found any php 5.3 related issues when clicking throug the UI.

As stated before, theme() function can't have by reference arguments.

muhleder’s picture

+1 from me. Works to remove the error message. Not seeing any bugs as a result, similar to 5.3 patches used in other modules.

spacereactor’s picture

can this be add into 6.x-1.3 so we dun have to edit this with every update. THK!

jose reyero’s picture

Version: 6.x-1.1 » 6.x-1.3
Status: Needs review » Fixed

Fixed, thanks.

veloce GT’s picture

Status: Fixed » Closed (won't fix)

I still get the following error when translating a book node:

* warning: Parameter 1 to theme_i18n_node_select_translation() expected to be a reference, value given in C:\xampp\htdocs\drupal\includes\theme.inc on line 656.
* warning: Parameter 1 to theme_i18n_node_select_translation() expected to be a reference, value given in C:\xampp\htdocs\drupal\includes\theme.inc on line 656.

Xampp for Windows 1.7.3
PHP Version 5.3.1
Internationalization 6.x-1.3

berdir’s picture

Status: Closed (won't fix) » Fixed

This has been fixed on the 4th, 1.3 has been released on the third, so this fix is not part of the official release. Try the -dev release.

veloce GT’s picture

Thanks for the info. I just relied on the given version number:

Version: 6.x-1.1 » 6.x-1.3
Status: needs review » fixed

and didn't mention the date. Shouldn't the given version number have been 6.x-1.x-dev?

b3liev3’s picture

The patch seems to work. It's again and again the same problem with PHP 5.3

Status: Fixed » Closed (fixed)

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

atsakoumis’s picture

Version: 6.x-1.3 » 6.x-1.6

Hello,

I also had the same problem:
warning: Parameter 1 to theme_i18n_node_select_translation() expected to be a reference, value given in ...\includes\theme.inc on line 656.
warning: Parameter 1 to theme_i18n_node_select_translation() expected to be a reference, value given in ...\theme.inc on line 656.

Try to remove "&" from the file i18n/i18n.pages.inc (user modules directory)

line 262 : function theme_i18n_node_select_translation(&$elements) {