Opened 8 years ago

Closed 8 years ago

Last modified 6 years ago

#376 closed defect (fixed)

ReplaceToken boolean problems

Reported by: zacharydangercampbell@… Owned by: mrook
Priority: major Milestone: 2.4.0RC3
Component: phing-core Version: 2.3.3
Keywords: Cc: Mp@…


If you try to replace tokens with boolean true/false it actually replaces with the value 1/.

    <token key="TOKEN_KEY_TRUE" value="true" />
    <token key="TOKEN_KEY_FALSE" value="false />

results in (output from phing):

[filter:ReplaceTokens] Replaced "@TOKEN_KEY_TRUE@" with "1"
[filter:ReplaceTokens] Replaced "@TOKEN_KEY_FALSE@" with ""

I tried looking through the code and found examples in other classes that have special filters for exactly this case, but that seems to not be the case for ReplaceTokens.

Attachments (0)

Change History (6)

comment:1 Changed 8 years ago by mrook

  • Milestone set to 2.4.0RC3

comment:2 Changed 8 years ago by mrook

  • Status changed from new to assigned

comment:3 Changed 8 years ago by mrook

(In [664]) Refs #376 - add special case for boolean values to replacetokens

comment:4 Changed 8 years ago by mrook

  • Resolution set to fixed
  • Status changed from assigned to closed

This issue has been fixed in the SVN tree, revision r664.

Thank you for the report, and for helping us make Phing better!

comment:5 Changed 6 years ago by mp

(In [1177]) Remove automagical conversion of strings to booleans. See

Refs #633, #495, #376, #383.

Introduces a BC break for existing tasks.

comment:6 Changed 6 years ago by mp

  • Cc Mp@… added

Add Comment

Modify Ticket

as closed The owner will remain mrook.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.