maxim Tue Feb 4 16:24:51 2003 EDT
Modified files:
/phpdoc/scripts bughunter.php
Log:
fixed parameter parser for void type
Index: phpdoc/scripts/bughunter.php
diff -u phpdoc/scripts/bughunter.php:1.2 phpdoc/scripts/bughunter.php:1.3
--- phpdoc/scripts/bughunter.php:1.2 Tue Feb 4 16:17:29 2003
+++ phpdoc/scripts/bughunter.php Tue Feb 4 16:24:51 2003
@@ -16,7 +16,7 @@
| Authors: Maxim Maletsky <[EMAIL PROTECTED]> |
+----------------------------------------------------------------------+
- $Id: bughunter.php,v 1.2 2003/02/04 21:17:29 maxim Exp $
+ $Id: bughunter.php,v 1.3 2003/02/04 21:24:51 maxim Exp $
*/
/*
@@ -280,8 +280,14 @@
$p[$i] = trim($p[$i], '[] ');
+ if($p[$i] == 'void' and sizeof($p) == 1) {
+ $params[$i+1]['optional'] = True;
+ $params[$i+1]['type'] = 'void';
+ $params[$i+1]['name'] = 'void';
+ }
+
// if plain text mandatory parameter
- if(preg_match_all("/^({$this->rex_php_types})
+(\&?)([a-z]+[[:alnum:]_\|]*)$/", $p[$i], $matches, PREG_SET_ORDER)) {
+ else if(preg_match_all("/^({$this->rex_php_types})
++(\&?)([a-z]+[[:alnum:]_\|]*)$/", $p[$i], $matches, PREG_SET_ORDER)) {
$params[$i+1]['type'] = $matches[0][1];
$params[$i+1]['name'] = $matches[0][3];
if(strlen($matches[0][2]))
@@ -343,9 +349,6 @@
echo "\n\n<hr>Process took : " . round(getmicrotime() - $t_start, 3) . "
seconds\n<hr>\n\n";
echo "\n\n<b>Results :</b>\n\n";
-#print_r((array) $hunter);
-
-#phpinfo();
$tot = 0;
foreach($hunter->result as $ext => $function) {
flush();
@@ -374,5 +377,6 @@
echo "\n\nTotal proto inconsistencies: <b>$tot</b>";
+#print_r((array) $hunter);
?>
--
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php