HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Make Vanilla work with PHP 5.4

swookswook
edited March 2012 in Feedback

If you have tried updating to PHP 5.4.0, you will notice that your installation of Vanilla may stop working with an error similar to the following:

Only variables should be passed by reference in ...

On receiving the error, you will most likely proceed to search for solutions and will eventually be pointed towards this page (look under Array Dereferencing).

Changing your error_reporting setting in your php.ini will not help as Vanilla overrides the setting.
Here is the solution for this problem:
https://github.com/...10fc2011557b8ccf50fd5a3b

I have submitted the change as a GitHub pull request but it seems like it wasn't noticed.
At least you have a solution here!

PS. I wrote more up but the forum currently has problems with long posts as well as Google sign-on.

Tagged:

Comments

  • lucluc ✭✭

    That's not really a solution, just a workaround.

    The solution would have been to have vanilla work OK with E_STRICT.
    But, indeed, it could be usefull for crazy people wanting to run php 5.4 in production a few days after it was release :)

  • Perhaps.

    I would however have expected the code to have been written with E_STRICT in mind from the start (or since PHP 5's release) if it was planned that E_STRICT is to be considered.

    error_reporting(E_ALL | E_STRICT) would have been used.

    Also,

     ; error_reporting
     ;   Default Value: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
     ;   Development Value: E_ALL
     ;   Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT
    

    for PHP 5.4.

Sign In or Register to comment.