PHPDoc with default values=Null bug

From: Date: Wed, 29 Aug 2001 08:42:05 +0000
Subject: PHPDoc with default values=Null bug
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-1712@lists.php.net to get a copy of this message
Hi i have a method defined the following way: function XML_sql2xml ($dsn = Null, $root = "root") { phpdoc does not handle this right, it reports value = unknown and skips the second argument. the following patch helps for me, but i'm not sure, if it's the right way: -- snip -- diff -u -r1.4 PhpdocParserCore.php --- PhpdocParserCore.php 28 Aug 2001 18:44:23 -0000 1.4 +++ PhpdocParserCore.php 29 Aug 2001 08:52:26 -0000 @@ -645,6 +645,11 @@ $raw_value = $regs[0]; $value = $regs[0]; } + else { + $type = 'null'; + $raw_value = $regs[0]; + $value = 'null'; + } } -- snip -- chregu -- nam...christian stocker adr...bremgartnerstr. 66, ch-8003 zurich pho...+41 1 451 6021 www...http://phant.ch/chregu mob...+41 76 561 8860 ema...chregu@phant.ch

« previous php.pear.dev (#1712) next »