PITS /
01156: Conditional markup not working in PHP 5.3
Summary: Conditional markup not working in PHP 5.3
Created: 2009-12-03 06:49
Status: Closed - fixed for 2.2.8
Category: Bug, PHP Compatibility
From: Petko
Assigned:
Priority: 5
Version: 2.2.7
OS: PHP 5.3.x
Description: Reported on the mailing list by Dan McMullen:
(:if exists Group.PageName:) seems to always return false. a copy of the development wiki under linux/php 5.2.10 works as expected. (:if exists Main.HomePage:) exists (:else:) foo (:ifend:) produces 'foo' on osx/php5.3 and 'exists' on linux/php5.2.10.
Fails for me too. Scott Connard December 03, 2009, at 08:42 AM
i did some poking at the code on this one. it looks to me like this line in pmwiki.php:
$Conditions['exists'] = 'PageExists(MakePageName(\$pagename, \$condparm))';
should be:
$Conditions['exists'] = 'PageExists(MakePageName($pagename, $condparm))';
bang December 03, 2009, at 12:32 PM
Did someone find out what was the change in PHP 5.3 that triggered this? -- Rogutės, 2009-12-05