Question
When forcing a link to be named
0, the url of the link is displayed instead of
0.
Example :
[[https://twiki.org][0]]
is shown in
TWikiRelease04x00x04 as :
I have found a workaround : adding a space before
0:
[[https://twiki.org][ 0]]
which give me the wanted result :
The problem is only occuring with
0 (The numbers 1 and greater don't need to be prefixed by a space)
The problem is not occuring at all on the Cairo release (01 Sep 2004)
Given that I have a workaround, the bug introduced have a very low impact on our installation (There may be around 5 links like that).
Environment
--
GuillaumeNobiron - 19 Jul 2006
Answer
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
Sounds like some Perl devilry. This should be posted on
Bugs
--
FranzJosefSilli - 01 Aug 2006
Found
TWikibug:Item5471
which shows similar effect in totally different context. 0 seems to be somehow problematic.
--
FranzJosefGigler - 14 Apr 2008
This is a typical Perl coding issue:
if( $something ) { do it; }
In above example, if
$something has value
0, Perl considers it as 'false'. As a programmer you need to distinguish between string (compare to an empty value) and a number (compare to zero). If you look at a string value you can do this test (there are other tests too):
if( $something != '' ) { do it; }
--
PeterThoeny - 14 Apr 2008