mysociety / petitions

Petitions website code, formerly used by Number 10, still used by various local councils
Other
25 stars 5 forks source link

Fix parameters passed by reference in new.php #28

Closed Flupsy closed 10 years ago

Flupsy commented 10 years ago

PHP 5.4 doesn't allow parameters passed by reference any more, and there are two examples in new.php at lines 123 and 128. This will be needed for the wheezy upgrade.

Flupsy commented 10 years ago

Can whoever makes this change commit it to the wheezy-changes branch please?

crowbot commented 10 years ago

@BenJam could you assign this to someone in the next few weeks please? It's a blocker to upgrade.

stevenday commented 10 years ago

I'll fix this.

stevenday commented 10 years ago

Done in 1e14a9544e3aab5b62232992a2aa67ef62db15d9

Flupsy commented 10 years ago

I ran the tests with this change but I got

[Thu Nov 28 09:20:35 2013] [error] [client 127.0.0.1] FastCGI: server "/data/vhost/ian.petitions.dev.mysociety.org/docs/fcgi/php-basic" stderr: /data/vhost/ian.petitions.dev.mysociety.org/petitions/web/new.php:123: Parameter 1 to petition_submitted_main() expected to be a reference, value given, referer: http://ian.petitions.dev.mysociety.org/new
dracos commented 10 years ago

Try the branch now, I've switched away from call_user_func as it doesn't support reference at all.

Flupsy commented 10 years ago

Lovely - thanks :)