We introduced a few new PHP 5.3 warnings, this patch simply removes all the & that are not allowed anymore. See #360605: PHP 5.3 Compatibility for more information about that change.

- theme_vertical_tabs(&$element) (no need to pass in stuff to theme functions by reference, it doesn't work anyway.
- Lots of &$node. Because $node is an object, we don't need the & anymore, because a object is passed by reference by default with PHP 5

Note: I still need to run the whole testsuite on PHP 5.3 RC2, I've only partially tested some tests like Node and Comment, that failed without these changes. Uploading the patch so it can run on PHP 5.2.. a PHP 5.3 test slave would be cool :)

CommentFileSizeAuthor
more_php53_fixes.patch16.92 KBberdir

Comments

chx’s picture

Status: Needs review » Reviewed & tested by the community

This is a good change even if we do not care about PHP5.3 but we do, obviously

dries’s picture

Status: Reviewed & tested by the community » Fixed

Ran the tests myself. Everything works and the code changes looked good. Committed to CVS HEAD. Thanks!

Status: Fixed » Closed (fixed)

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

donquixote’s picture

Issue tags: +PHP 5.3, +call by reference

adding tags

donquixote’s picture

Version: 7.x-dev » 6.x-dev
Status: Closed (fixed) » Patch (to be ported)

How can this be fixed for D6 ?
PHP 4 does not pass objects as pointers. So what can we do for &$node in D6?

berdir’s picture

Version: 6.x-dev » 7.x-dev
Status: Patch (to be ported) » Closed (fixed)

This does not need to be fixed for D6. The actual errors for D6 are either fixed in the other patch and it is not possible to remove the & from objects in D6 code.