iliaa Thu Feb 23 18:28:08 2006 UTC
Modified files: (Branch: PHP_5_1)
/php-src/ext/standard streamsfuncs.c
/php-src NEWS
Log:
Fixed bug #35900 (stream_select() should warning when tv_sec is negative).
http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/streamsfuncs.c?r1=1.58.2.2&r2=1.58.2.3&diff_format=u
Index: php-src/ext/standard/streamsfuncs.c
diff -u php-src/ext/standard/streamsfuncs.c:1.58.2.2
php-src/ext/standard/streamsfuncs.c:1.58.2.3
--- php-src/ext/standard/streamsfuncs.c:1.58.2.2 Wed Feb 1 10:31:57 2006
+++ php-src/ext/standard/streamsfuncs.c Thu Feb 23 18:28:07 2006
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: streamsfuncs.c,v 1.58.2.2 2006/02/01 10:31:57 tony2001 Exp $ */
+/* $Id: streamsfuncs.c,v 1.58.2.3 2006/02/23 18:28:07 iliaa Exp $ */
#include "php.h"
#include "php_globals.h"
@@ -752,6 +752,14 @@
if (sec != NULL) {
convert_to_long(sec);
+ if (sec < 0) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "The
seconds parameter must be greater then 0.");
+ RETURN_FALSE;
+ } else if (usec < 0) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "The
microseconds parameter must be greater then 0.");
+ RETURN_FALSE;
+ }
+
/* Solaris + BSD do not like microsecond values which are >= 1
sec */
if (usec > 999999) {
tv.tv_sec = Z_LVAL_P(sec) + (usec / 1000000);
http://cvs.php.net/viewcvs.cgi/php-src/NEWS?r1=1.2027.2.423&r2=1.2027.2.424&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.423 php-src/NEWS:1.2027.2.424
--- php-src/NEWS:1.2027.2.423 Tue Feb 21 15:32:06 2006
+++ php-src/NEWS Thu Feb 23 18:28:08 2006
@@ -97,6 +97,8 @@
- Fixed bug #35998 (SplFileInfo::getPathname() returns unix style filenames
in win32). (Marcus)
- Fixed bug #35954 (Fatal com_exception casting object). (Rob)
+- Fixed bug #35900 (stream_select() should warning when tv_sec is negative).
+ (Ilia)
- Fixed bug #34272 (empty array onto COM object blows up). (Rob)
12 Jan 2006, PHP 5.1.2
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php