Item647: You cannot SEARCH for the Value of "0"
Current State: Closed
Released In: 1.0.5
Target Release: patch
Applies To: Engine
Value of "0" need to be reviewed that it correctly gets treated as the string "0" and not the value FALSE in SEARCH
I do not have any actual example that it does not work but during the walkthrough of the Foswiki macros in Item5453
it was identified that the search macros may have potential problems.
It was also identified that any changes are risky and a fix needs to be done with great care and peer reviewing.
So the scope of any fix is AFTER 1.0.0 release because of the risk (high) vs actual impact of the problem (low)
for the discussion and also the code suggested
$a = $b || '';
must be replaced by
$a = defined ( $b ) ? $b : '';
in the cases where $b can be the string "0" and be the string zero and not FALSE.
I am willing to analyse this one more after 1.0.0 release so I put it being worked on for myself.
- 03 Jan 2009
I went carefully through this a while ago and finished it today.
cannot find the value 0. And it cannot handle the format string "0"
For all other parameters to SEARCH
the value 0 makes no sense so no need to add additional code execusion to handle that (example a webname 0 makes no sense at all)
I have fixed both.
only has one parameter where a 0 makes sense and that is the value. And it is handled correctly. No fix needed for METASEARCH
- 25 Apr 2009