I've just installed the ConTemplate module (v5.x-2.0) in my site and after enabling the module, I just got a blank page. All of my site have got blank pages.

Looking at the apache error log I see this error:

PHP Parse error: syntax error, unexpected '=', expecting ')' in C:\\web\\enelsur.es\\sites\\all\\modules\\contemplate\\contemplate.module on line 743

Looking at that line, it looks like this:

function contemplate_eval($tmplt, $obj, &$xml_elements = null) {

And if I remove "= null" then, the error disappears and my site come to life again.

My installation:

  • PHP 4.4.7
  • Web Server Apache/2.2.6 (Win32)

If more info is needed, just ask for it.

Comments

jrglasgow’s picture

Assigned: Unassigned » jrglasgow
Status: Active » Postponed (maintainer needs more info)

I am developing with PHP 5 so this is probably something with PHP 4

if you change line 743 to read

function contemplate_eval($tmplt, $obj, &$xml_elements = array()) {

do you still have this same error

jpereza’s picture

Thanks for your quick answer, jrglasgow.
I cannot check it right now, I will do when I get back to home this afternoon.

But I think it won't work because the error said unexpected '=', so I suppose that in PHP 4 you cannot initialize a parameter that have this syntax &$xml_elements.

jpereza’s picture

Title: PHP Parse error: syntax error » PHP 4 Parse error: syntax error

My supposition was true.

I've read in the PHP Manual this:

Note: As of PHP 5, default values may be passed by reference.

So, in PHP 4 it cannot be assigned a default value to a parameter passed by reference, as it is trying to do.

jrglasgow’s picture

Status: Postponed (maintainer needs more info) » Fixed

I have committed a fix for this, it is in the next release, 5.x-2.01

Anonymous’s picture

Status: Fixed » Closed (fixed)

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