Details
-
Bug
-
Resolution: Fixed
-
Medium
-
4.0.6, 4.1.3, 4.2.0alpha1
-
None
Description
Example :
ezpublish begins with "pub" : {cond( "ezpublish"|begins_with( 'pub' ), 'true', 'false' )} ezpublish begins with "aaa" : {cond( "ezpublish"|begins_with( 'aaa' ), 'true', 'false' )} ezpublish begins with "ezp" : {cond( "ezpublish"|begins_with( 'ezp' ), 'true', 'false' )}
outputs
ezpublish begins with "pub" : false ezpublish begins with "aaa" : true ezpublish begins with "ezp" : true
this is due to a wrong comparison (== vs ===) on the value returned by strpos() PHP function.