[support] PHP 5.3 upgrade problems
andy baxter
andy at earthsong.free-online.co.uk
Wed Oct 14 05:02:28 UTC 2009
andy baxter wrote:
> The majority of the errors I am getting are of the form:
>
> 'Parameter n to function_name() /expected to be a reference, value
> given/ in //path/to/file/ on line m//.'
>
> This error is a known issue with PHP 5.3 and drupal from what I have
> read so far.
>
> I have seen a few reported issues where people are recommending finding
> the relevant function and changing the parameter definition from
> '&$variable' to just '$variable'.
>
> But I'm worried that this is just a quick fix which might throw up
> problems elsewhere - I don't really know either PHP or the drupal
> codebase well enough to know for sure what is the right way to fix these
> problems.
>
What I really want to know is, if I find the (relatively few) places in
the code where php5.3 is causing an issue that actually breaks site
functions, and apply the fix above (i.e. &$variable -> $variable) or
something similar, is this a good way of solving the problem for the
time being, given that the site goes public on thursday, or is it just
going to break something else, or cause other problems like security
holes or whatever?
It seems to have stopped the error in the couple of places I've already
tried it, but it worries me to just convert a pass-by-reference into a
straight parameter pass like this. I like to understand what I am doing
rather than just apply a patch, which is why I was asking if anyone can
explain a bit more about what's going on here?
cheers,
andy
More information about the support
mailing list