lbarnaud Mon Nov 3 16:59:18 2008 UTC
Added files: (Branch: PHP_5_2)
/php-src/ext/standard/tests/file bug45303.phpt
Modified files:
/php-src/main/streams plain_wrapper.c
/php-src NEWS
Log:
MFH: Fixed bug #45303 (Opening php:// wrapper in append mode results
in a warning)
http://cvs.php.net/viewvc.cgi/php-src/main/streams/plain_wrapper.c?r1=1.52.2.6.2.27&r2=1.52.2.6.2.28&diff_format=u
Index: php-src/main/streams/plain_wrapper.c
diff -u php-src/main/streams/plain_wrapper.c:1.52.2.6.2.27
php-src/main/streams/plain_wrapper.c:1.52.2.6.2.28
--- php-src/main/streams/plain_wrapper.c:1.52.2.6.2.27 Mon Dec 31 07:20:15 2007
+++ php-src/main/streams/plain_wrapper.c Mon Nov 3 16:59:18 2008
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: plain_wrapper.c,v 1.52.2.6.2.27 2007/12/31 07:20:15 sebastian Exp $ */
+/* $Id: plain_wrapper.c,v 1.52.2.6.2.28 2008/11/03 16:59:18 lbarnaud Exp $ */
#include "php.h"
#include "php_globals.h"
@@ -242,6 +242,7 @@
#ifdef ESPIPE
if (stream->position == (off_t)-1 && errno == ESPIPE) {
stream->position = 0;
+ stream->flags |= PHP_STREAM_FLAG_NO_SEEK;
self->is_pipe = 1;
}
#endif
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1296&r2=1.2027.2.547.2.1297&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1296 php-src/NEWS:1.2027.2.547.2.1297
--- php-src/NEWS:1.2027.2.547.2.1296 Mon Nov 3 16:08:07 2008
+++ php-src/NEWS Mon Nov 3 16:59:18 2008
@@ -21,6 +21,8 @@
dynamicly created property). (Felipe)
- Fixed bug #45529 (new DateTimeZone() and date_create()->getTimezone() behave
different). (Derick)
+- Fixed bug #45303 (Opening php:// wrapper in append mode results in a
warning).
+ (Arnaud)
- Fixed bug #44938 (gettext functions crash with overly long domain).
(Christian Schneider, Ilia)
- Fixed bug #44327 (PDORow::queryString property & numeric offsets / Crash).
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/bug45303.phpt?view=markup&rev=1.1
Index: php-src/ext/standard/tests/file/bug45303.phpt
+++ php-src/ext/standard/tests/file/bug45303.phpt
--TEST--
Bug #45303 (Opening php:// wrapper in append mode results in a warning)
--FILE--
<?php
$fd = fopen("php://stdout","a");
var_dump($fd);
var_dump(fseek($fd, 1024*1024, SEEK_SET));
?>
--EXPECTF--
resource(%d) of type (stream)
Warning: fseek(): stream does not support seeking in %s
int(-1)
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php