felipe Tue Oct 7 12:53:08 2008 UTC
Modified files: (Branch: PHP_5_2)
/php-src/ext/interbase/tests interbase.inc
Log:
- MFH: Fixed code ("Division by zero" anymore)
http://cvs.php.net/viewvc.cgi/php-src/ext/interbase/tests/interbase.inc?r1=1.10&r2=1.10.6.1&diff_format=u
Index: php-src/ext/interbase/tests/interbase.inc
diff -u php-src/ext/interbase/tests/interbase.inc:1.10
php-src/ext/interbase/tests/interbase.inc:1.10.6.1
--- php-src/ext/interbase/tests/interbase.inc:1.10 Tue Jun 1 08:38:33 2004
+++ php-src/ext/interbase/tests/interbase.inc Tue Oct 7 12:53:08 2008
@@ -1,4 +1,4 @@
-<?php /* $Id: interbase.inc,v 1.10 2004/06/01 08:38:33 abies Exp $ */
+<?php /* $Id: interbase.inc,v 1.10.6.1 2008/10/07 12:53:08 felipe Exp $ */
srand((double)microtime()*1000000);
@@ -104,6 +104,9 @@
}
} else if ($prec == 0) {
$n = substr(rand() . rand(), 0, rand() % $len + 1);
+ } else if (($prec - $len) == 0) {
+ $n = substr(rand() . rand(), 0, 1);
+ $n .= "." . substr(rand(), 0, $prec);
} else {
$n = substr(rand() . rand(), 0, rand() % ($len - $prec) + 1);
$n .= "." . substr(rand(), 0, $prec);
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php