Camen Design Forum

PHP 5.2 and domtemplate.php | typo/bug?

append delete Peter

I've installed this on several different shared servers. Those running PHP 5.2 throw up an error in domtemplate.php at line 390

% 
	//XML is already used for the internal representation; if outputting XML no filtering is needed
		if ($this->type == $this::XML) return $source;
%

Changing to this fixes it:

%
	//XML is already used for the internal representation; if outputting XML no filtering is needed
		if ($this->type == $this->XML) return $source;
%

Reply RSS

Replies

append delete #1. Kroc

I have just pushed an update that includes this, and two other community fixes :)
You can download v18 here: https://github.com/Kroc/DOMTemplate/archive/master.zip

Thanks immensely for coming here and reporting the problem. I don't get much direct feedback from users about how they find DOMTemplate, could I ask you how you've gotten on with it?

append delete #2. Peter

Thanks. Downloaded and installed.

PHP threw up an error that pointed me to the file and line number, and a quick Google search explained what the problem was. Other than that, all I've done is glance at the code, which seems clean and well-documented.

append delete #3. Christo

Hey Guys,

After installing the code I received this error message

Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in /home/bdmwiki/public_html/bitcoin/lib/domtemplate/domtemplate.php on line 391

Once I fixed the bug as described above, it worked perfectly

I downloaded the code from the zip file on github on 30 Dec 2013

Thanks for your input.

append delete #4. Martijn

Hi @Christo, thanks for joining in!

Did you download the zip file that @Kroc linked to in reply #1 or did you download NoNonsense Forum?

NoNonsenseForum still includes DOMTemplate version 17. The above mentioned problem has only been fixed in version 18. You can get the latest version of DOMTemplate by using the download link in this topic: https://github.com/Kroc/DOMTemplate/archive/master.zip

Alternatively you can grab the development version of NoNonsense Forum, which includes the latest DOMTemplate: https://github.com/Kroc/NoNonsenseForum/archive/development.zip

Reply

(Leave this as-is, it’s a trap!)

There is no need to “register”, just enter the same name + password of your choice every time.

Pro tip: Use markup to add links, quotes and more.

Your friendly neighbourhood moderators: Kroc, Impressed, Martijn