felipe Thu Oct 30 14:30:02 2008 UTC Modified files: /php-src/ext/standard streamsfuncs.c Log: - Fix the fix (thanks Hannes!) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/streamsfuncs.c?r1=1.126&r2=1.127&diff_format=u Index: php-src/ext/standard/streamsfuncs.c diff -u php-src/ext/standard/streamsfuncs.c:1.126 php-src/ext/standard/streamsfuncs.c:1.127 --- php-src/ext/standard/streamsfuncs.c:1.126 Thu Oct 30 10:08:00 2008 +++ php-src/ext/standard/streamsfuncs.c Thu Oct 30 14:30:02 2008 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: streamsfuncs.c,v 1.126 2008/10/30 10:08:00 felipe Exp $ */ +/* $Id: streamsfuncs.c,v 1.127 2008/10/30 14:30:02 felipe Exp $ */ #include "php.h" #include "php_globals.h" @@ -408,7 +408,7 @@ php_stream_from_zval(stream, &zsrc); - if (pos >= 0 && php_stream_seek(stream, pos, SEEK_SET) < 0) { + if ((pos > 0 || (pos == 0 && ZEND_NUM_ARGS() > 2)) && php_stream_seek(stream, pos, SEEK_SET) < 0) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed to seek to position %ld in the stream", pos); RETURN_FALSE; }
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php