]> granicus.if.org Git - php/commitdiff
Throw notice for plain wrapper fread/fwrite errors
authorNikita Popov <nikita.ppv@gmail.com>
Tue, 23 Jul 2019 09:57:02 +0000 (11:57 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Thu, 25 Jul 2019 08:42:10 +0000 (10:42 +0200)
Similar to what is done for socket read/write errors.

37 files changed:
UPGRADING
ext/fileinfo/tests/bug61964-mb.phpt
ext/fileinfo/tests/bug61964.phpt
ext/standard/tests/file/007_variation1.phpt
ext/standard/tests/file/007_variation11-win32-mb.phpt
ext/standard/tests/file/007_variation11-win32.phpt
ext/standard/tests/file/007_variation11.phpt
ext/standard/tests/file/007_variation13-win32.phpt
ext/standard/tests/file/007_variation13.phpt
ext/standard/tests/file/007_variation15.phpt
ext/standard/tests/file/007_variation17.phpt
ext/standard/tests/file/007_variation19.phpt
ext/standard/tests/file/007_variation21.phpt
ext/standard/tests/file/007_variation23.phpt
ext/standard/tests/file/007_variation3.phpt
ext/standard/tests/file/007_variation5.phpt
ext/standard/tests/file/007_variation7.phpt
ext/standard/tests/file/007_variation9.phpt
ext/standard/tests/file/bug35781.phpt
ext/standard/tests/file/fgetc_variation3.phpt
ext/standard/tests/file/fgetcsv_variation26.phpt
ext/standard/tests/file/fgets_variation1.phpt
ext/standard/tests/file/fgetss_variation1-win32.phpt
ext/standard/tests/file/fgetss_variation1.phpt
ext/standard/tests/file/fputcsv_variation14.phpt
ext/standard/tests/file/fread_variation2.phpt
ext/standard/tests/file/fread_variation4-win32.phpt [deleted file]
ext/standard/tests/file/fread_variation4.phpt
ext/standard/tests/file/fscanf_variation51.phpt
ext/standard/tests/file/fwrite.phpt
ext/standard/tests/file/fwrite_variation1-win32-mb.phpt
ext/standard/tests/file/fwrite_variation1.phpt
ext/standard/tests/filters/bug35916.phpt
ext/standard/tests/streams/bug54946.phpt
main/streams/plain_wrapper.c
main/streams/streams.c
scripts/dev/bless_tests.php

index 5d38e596aaa52e5d9eed70fcceb826cacc9c10ea..3765c39639e381bd1dfe5c6f15500108197aee0e 100644 (file)
--- a/UPGRADING
+++ b/UPGRADING
@@ -142,6 +142,8 @@ PHP 7.4 UPGRADE NOTES
   . fread() and fwrite() will now return false if the operation failed.
     Previously an empty string or 0 was returned. EAGAIN/EWOULDBLOCK are not
     considered failures.
+  . fread() and fwrite() on plain files will now throw a notice on failure,
+    such as when trying to write to a read-only file resource.
 
 - Tokenizer:
   . token_get_all() will now emit a T_BAD_CHARACTER token for unexpected
index bee1c8f9ad56cc7760d9d1f2f23a743320518bcf..8432a8314ec4a34e70ca0e3b6f662cdb202b927f 100644 (file)
@@ -45,11 +45,10 @@ rmdir($dir);
 ?>
 ===DONE===
 --EXPECTF--
-bool(false)
+bool(false)%A
 resource(%d) of type (file_info)
 resource(%d) of type (file_info)
-bool(false)
-
+bool(false)%A
 Notice: finfo_open(): Warning: offset `string' invalid in %sbug61964-mb.php on line %d
 
 Notice: finfo_open(): Warning: offset ` Core' invalid in %sbug61964-mb.php on line %d
index 49829e98d8a8644bad34497ebeb4604825ee2c13..b2eb6e2f16faf6aac175f250b577e8b583e5d801 100644 (file)
@@ -45,11 +45,10 @@ rmdir($dir);
 ?>
 ===DONE===
 --EXPECTF--
-bool(false)
+bool(false)%A
 resource(%d) of type (file_info)
 resource(%d) of type (file_info)
-bool(false)
-
+bool(false)%A
 Notice: finfo_open(): Warning: offset `string' invalid in %sbug61964.php on line %d
 
 Notice: finfo_open(): Warning: offset ` Core' invalid in %sbug61964.php on line %d
index c05ca6fdf01bd172dad890f589095f7015ba2638..f22fdc0dc979a2ef155e4e775ee1b0ce39af83aa 100644 (file)
@@ -48,6 +48,8 @@ int(0)
 string(20) "line
 line of text
 li"
+
+Notice: fwrite(): write of 37 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 bool(true)
 string(7) "Unknown"
index c2e42f68d2c3a5e98e23a75dc0607d5dbad55ee7..fc24ba38533534f659fbab212b874446d1b94acc 100644 (file)
@@ -68,6 +68,8 @@ string(6) "stream"
 int(0)
 int(37)
 int(37)
+
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(true)
index 7b6ae81465de07b552b5fedf9be7abe1e20e3a9a..f52e211ea56eb65ca876a23082a0f4e4eeafaf63 100644 (file)
@@ -66,6 +66,8 @@ string(6) "stream"
 int(0)
 int(37)
 int(37)
+
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(true)
index 3748f6f962f6e9cd90826942a0b2e35fd06f8246..6bc9975104459ad0b0136132e0a01b968222ada1 100644 (file)
@@ -66,6 +66,8 @@ string(6) "stream"
 int(0)
 int(37)
 int(37)
+
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(true)
index 72292d057f8cfa8e0b3ab5ef4f0a8badfd2ddeba..d588cc42350e8e9e38091e8a6b7976b2f5f34153 100644 (file)
@@ -56,6 +56,8 @@ unlink(__DIR__."/007_variation13.tmp");
 resource(%d) of type (stream)
 string(6) "stream"
 int(37)
+
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(true)
index a35b244c9368b6630bf3d425d4d54c8e63e20fb5..742d06a487964d0d449d25bce7c0d4155178130b 100644 (file)
@@ -56,6 +56,8 @@ unlink(__DIR__."/007_variation13.tmp");
 resource(%d) of type (stream)
 string(6) "stream"
 int(37)
+
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(true)
index 41fa58f02c91811e74357b93e689fd12c0d630b2..128ed2fc46b352e0a46f21fdf483a8f711a3d167 100644 (file)
@@ -49,6 +49,8 @@ string(6) "stream"
 int(0)
 int(37)
 int(37)
+
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(true)
index 780ea96365f493ada84d86f412f0f53160f38acd..b817526365084346de475c96df5c12056e953d4b 100644 (file)
@@ -48,6 +48,8 @@ int(0)
 string(20) "line
 line of text
 li"
+
+Notice: fwrite(): write of 37 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 bool(true)
 string(7) "Unknown"
index b10b4b50691cdd69ccf6f8f1c95743826f817beb..316616fa140b1dc14701d6893002f87a75f3160e 100644 (file)
@@ -61,6 +61,8 @@ string(6) "stream"
 int(0)
 int(37)
 int(37)
+
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(true)
index fec0db24e4ea89804839533e762072f77bc295d0..37b1797491013cdefd16374c69cb4af6b7be885c 100644 (file)
@@ -51,6 +51,8 @@ unlink(__DIR__."/007_variation21.tmp");
 resource(%d) of type (stream)
 string(6) "stream"
 int(37)
+
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(true)
index 81060fa1b1295f0ac1890f5ad6c10f2a05ed0f60..eafa408eacb6e25b429dd71d20ae2b8118c8b5a1 100644 (file)
@@ -49,6 +49,8 @@ string(6) "stream"
 int(0)
 int(37)
 int(37)
+
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(true)
index 3572ca746fb0bcab9e71047aacde33db6e8d2019..59fb4587f96f47c215a5894ffb7db617b7024ca0 100644 (file)
@@ -61,6 +61,8 @@ string(6) "stream"
 int(0)
 int(37)
 int(37)
+
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(true)
index 40f0794c8bd4aa8f8fc6f948396a93f7fa4c0075..5e4fc5c9dbc964362c54afe7f98f1472be476de5 100644 (file)
@@ -51,6 +51,8 @@ unlink(__DIR__."/007_variation5.tmp");
 resource(%d) of type (stream)
 string(6) "stream"
 int(37)
+
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(true)
index 322e1ee44c2c572cad93e2156288c2683c24cff1..40e22c4655d026f1c266558a919e1bcb9132f2db 100644 (file)
@@ -49,6 +49,8 @@ string(6) "stream"
 int(0)
 int(37)
 int(37)
+
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(true)
index a730240fa306f2e592361ee4c2b40e7179953b84..c20d3b4cf1b21a0516dee69b19e291b5796095d5 100644 (file)
@@ -48,6 +48,8 @@ int(0)
 string(20) "line
 line of text
 li"
+
+Notice: fwrite(): write of 37 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 bool(true)
 string(7) "Unknown"
index b7ffa9876029ae213701911e022c71f3ede4a826..30b49beb7805c667facfd2ade97015dd108b3f41 100644 (file)
@@ -18,7 +18,8 @@ var_dump(file_get_contents($filename));
 
 echo "Done\n";
 ?>
---EXPECT--
+--EXPECTF--
+Notice: fpassthru(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 string(15) "Guvf vf n grfg
 "
 Done
index 8e052907e8bc70aee5d16935a182c2864539a103..67f5c76ff40cc4b16226f257ec4823730f4ed8ea 100644 (file)
@@ -49,12 +49,14 @@ foreach ($file_modes as $file_mode ) {
 
 echo "Done\n";
 ?>
---EXPECT--
+--EXPECTF--
 *** Testing fgetc() with file opened in write only mode ***
 -- File opened in mode : w --
 bool(true)
 int(0)
 bool(false)
+
+Notice: fgetc(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
@@ -62,6 +64,8 @@ bool(false)
 bool(true)
 int(0)
 bool(false)
+
+Notice: fgetc(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
@@ -69,6 +73,8 @@ bool(false)
 bool(true)
 int(0)
 bool(false)
+
+Notice: fgetc(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
@@ -76,6 +82,8 @@ bool(false)
 bool(true)
 int(0)
 bool(false)
+
+Notice: fgetc(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
@@ -83,6 +91,8 @@ bool(false)
 bool(true)
 int(0)
 bool(false)
+
+Notice: fgetc(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
@@ -90,6 +100,8 @@ bool(false)
 bool(true)
 int(0)
 bool(false)
+
+Notice: fgetc(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
@@ -97,6 +109,8 @@ bool(false)
 bool(true)
 int(0)
 bool(false)
+
+Notice: fgetc(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
@@ -104,6 +118,8 @@ bool(false)
 bool(true)
 int(0)
 bool(false)
+
+Notice: fgetc(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
@@ -111,6 +127,8 @@ bool(false)
 bool(true)
 int(0)
 bool(false)
+
+Notice: fgetc(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
index 16f080aaf27867cf3ba56778780fa8d402105e76..289972acb3a6a6052bec2acd6466e8d282df53dc 100644 (file)
@@ -76,365 +76,509 @@ foreach ($csv_lists as $csv_list) {
 
 echo "Done\n";
 ?>
---EXPECT--
+--EXPECTF--
 *** Testing fgetcsv() : reading the files opened in write only mode ***
 
 -- Testing fgetcsv() with file opened using w mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 
 -- Testing fgetcsv() with file opened using wb mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 
 -- Testing fgetcsv() with file opened using wt mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 
 -- Testing fgetcsv() with file opened using a mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 
 -- Testing fgetcsv() with file opened using ab mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 
 -- Testing fgetcsv() with file opened using at mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 
 -- Testing fgetcsv() with file opened using x mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 
 -- Testing fgetcsv() with file opened using xb mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 
 -- Testing fgetcsv() with file opened using xt mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 
 -- Testing fgetcsv() with file opened using w mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 
 -- Testing fgetcsv() with file opened using wb mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 
 -- Testing fgetcsv() with file opened using wt mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 
 -- Testing fgetcsv() with file opened using a mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 
 -- Testing fgetcsv() with file opened using ab mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 
 -- Testing fgetcsv() with file opened using at mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 
 -- Testing fgetcsv() with file opened using x mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 
 -- Testing fgetcsv() with file opened using xb mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 
 -- Testing fgetcsv() with file opened using xt mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 
 -- Testing fgetcsv() with file opened using w mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 
 -- Testing fgetcsv() with file opened using wb mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 
 -- Testing fgetcsv() with file opened using wt mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 
 -- Testing fgetcsv() with file opened using a mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 
 -- Testing fgetcsv() with file opened using ab mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 
 -- Testing fgetcsv() with file opened using at mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 
 -- Testing fgetcsv() with file opened using x mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 
 -- Testing fgetcsv() with file opened using xb mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 
 -- Testing fgetcsv() with file opened using xt mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 
 -- Testing fgetcsv() with file opened using w mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 
 -- Testing fgetcsv() with file opened using wb mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 
 -- Testing fgetcsv() with file opened using wt mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 
 -- Testing fgetcsv() with file opened using a mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 
 -- Testing fgetcsv() with file opened using ab mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 
 -- Testing fgetcsv() with file opened using at mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 
 -- Testing fgetcsv() with file opened using x mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 
 -- Testing fgetcsv() with file opened using xb mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 
 -- Testing fgetcsv() with file opened using xt mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 
 -- Testing fgetcsv() with file opened using w mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 
 -- Testing fgetcsv() with file opened using wb mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 
 -- Testing fgetcsv() with file opened using wt mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 
 -- Testing fgetcsv() with file opened using a mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 
 -- Testing fgetcsv() with file opened using ab mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 
 -- Testing fgetcsv() with file opened using at mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 
 -- Testing fgetcsv() with file opened using x mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 
 -- Testing fgetcsv() with file opened using xb mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 
 -- Testing fgetcsv() with file opened using xt mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 
 -- Testing fgetcsv() with file opened using w mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 
 -- Testing fgetcsv() with file opened using wb mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 
 -- Testing fgetcsv() with file opened using wt mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 
 -- Testing fgetcsv() with file opened using a mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 
 -- Testing fgetcsv() with file opened using ab mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 
 -- Testing fgetcsv() with file opened using at mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 
 -- Testing fgetcsv() with file opened using x mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 
 -- Testing fgetcsv() with file opened using xb mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 
 -- Testing fgetcsv() with file opened using xt mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 
 -- Testing fgetcsv() with file opened using w mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 
 -- Testing fgetcsv() with file opened using wb mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 
 -- Testing fgetcsv() with file opened using wt mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 
 -- Testing fgetcsv() with file opened using a mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 
 -- Testing fgetcsv() with file opened using ab mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 
 -- Testing fgetcsv() with file opened using at mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 
 -- Testing fgetcsv() with file opened using x mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 
 -- Testing fgetcsv() with file opened using xb mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 
 -- Testing fgetcsv() with file opened using xt mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 
 -- Testing fgetcsv() with file opened using w mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 
 -- Testing fgetcsv() with file opened using wb mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 
 -- Testing fgetcsv() with file opened using wt mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 
 -- Testing fgetcsv() with file opened using a mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 
 -- Testing fgetcsv() with file opened using ab mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 
 -- Testing fgetcsv() with file opened using at mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 
 -- Testing fgetcsv() with file opened using x mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 
 -- Testing fgetcsv() with file opened using xb mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 
 -- Testing fgetcsv() with file opened using xt mode --
+
+Notice: fgetcsv(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
index b4f7ad5a0ee6941d57bc1b1b9e5ca23349689a51..50856df2e092ababa90987ed4fefe4b9abcd45bd 100644 (file)
@@ -48,12 +48,14 @@ foreach ($file_modes as $file_mode ) {
 
 echo "Done\n";
 ?>
---EXPECT--
+--EXPECTF--
 *** Testing fgets() with file opened in write only mode ***
 -- File opened in mode : w --
 bool(true)
 int(0)
 bool(false)
+
+Notice: fgets(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
@@ -61,6 +63,8 @@ bool(false)
 bool(true)
 int(0)
 bool(false)
+
+Notice: fgets(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
@@ -68,6 +72,8 @@ bool(false)
 bool(true)
 int(0)
 bool(false)
+
+Notice: fgets(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
@@ -75,6 +81,8 @@ bool(false)
 bool(true)
 int(0)
 bool(false)
+
+Notice: fgets(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
@@ -82,6 +90,8 @@ bool(false)
 bool(true)
 int(0)
 bool(false)
+
+Notice: fgets(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
@@ -89,6 +99,8 @@ bool(false)
 bool(true)
 int(0)
 bool(false)
+
+Notice: fgets(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
@@ -96,6 +108,8 @@ bool(false)
 bool(true)
 int(0)
 bool(false)
+
+Notice: fgets(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
@@ -103,6 +117,8 @@ bool(false)
 bool(true)
 int(0)
 bool(false)
+
+Notice: fgets(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
@@ -110,6 +126,8 @@ bool(false)
 bool(true)
 int(0)
 bool(false)
+
+Notice: fgets(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
index 54c48e4280b2ca0ba75bb3203ab84abb9857c193..72e19c293fc416b1d46c7f8901dee80ea7a4ea28 100644 (file)
@@ -79,7 +79,7 @@ for($mode_counter = 0; $mode_counter < count($file_modes); $mode_counter++) {
 
 echo "Done\n";
 ?>
---EXPECT--
+--EXPECTF--
 *** Testing fgetss() : usage variations ***
 
 -- Testing fgetss() with file opened using w mode --
@@ -88,6 +88,8 @@ bool(true)
 int(0)
 bool(false)
 -- fgetss() with default length, file pointer at 0 , expected : no character should be read --
+
+Notice: fgetss(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
@@ -98,6 +100,8 @@ bool(true)
 int(0)
 bool(false)
 -- fgetss() with default length, file pointer at 0 , expected : no character should be read --
+
+Notice: fgetss(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
@@ -108,6 +112,8 @@ bool(true)
 int(0)
 bool(false)
 -- fgetss() with default length, file pointer at 0 , expected : no character should be read --
+
+Notice: fgetss(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
@@ -118,6 +124,8 @@ bool(true)
 int(0)
 bool(false)
 -- fgetss() with default length, file pointer at 0 , expected : no character should be read --
+
+Notice: fgetss(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
@@ -128,6 +136,8 @@ bool(true)
 int(0)
 bool(false)
 -- fgetss() with default length, file pointer at 0 , expected : no character should be read --
+
+Notice: fgetss(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
@@ -138,6 +148,8 @@ bool(true)
 int(0)
 bool(false)
 -- fgetss() with default length, file pointer at 0 , expected : no character should be read --
+
+Notice: fgetss(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
@@ -148,6 +160,8 @@ bool(true)
 int(0)
 bool(false)
 -- fgetss() with default length, file pointer at 0 , expected : no character should be read --
+
+Notice: fgetss(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
@@ -158,6 +172,8 @@ bool(true)
 int(0)
 bool(false)
 -- fgetss() with default length, file pointer at 0 , expected : no character should be read --
+
+Notice: fgetss(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
@@ -168,6 +184,8 @@ bool(true)
 int(0)
 bool(false)
 -- fgetss() with default length, file pointer at 0 , expected : no character should be read --
+
+Notice: fgetss(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
index 391e0ec4afabee81f4f14b1acb780f056de44f63..e1a202388c9e7055155072c62e7e0a2415a2b530 100644 (file)
@@ -75,7 +75,7 @@ for($mode_counter = 0; $mode_counter < count($file_modes); $mode_counter++) {
 
 echo "Done\n";
 ?>
---EXPECT--
+--EXPECTF--
 *** Testing fgetss() : usage variations ***
 
 -- Testing fgetss() with file opened using w mode --
@@ -84,6 +84,8 @@ bool(true)
 int(0)
 bool(false)
 -- fgetss() with default length, file pointer at 0 , expected : no character should be read --
+
+Notice: fgetss(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
@@ -94,6 +96,8 @@ bool(true)
 int(0)
 bool(false)
 -- fgetss() with default length, file pointer at 0 , expected : no character should be read --
+
+Notice: fgetss(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
@@ -104,6 +108,8 @@ bool(true)
 int(0)
 bool(false)
 -- fgetss() with default length, file pointer at 0 , expected : no character should be read --
+
+Notice: fgetss(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
@@ -114,6 +120,8 @@ bool(true)
 int(0)
 bool(false)
 -- fgetss() with default length, file pointer at 0 , expected : no character should be read --
+
+Notice: fgetss(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
@@ -124,6 +132,8 @@ bool(true)
 int(0)
 bool(false)
 -- fgetss() with default length, file pointer at 0 , expected : no character should be read --
+
+Notice: fgetss(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
@@ -134,6 +144,8 @@ bool(true)
 int(0)
 bool(false)
 -- fgetss() with default length, file pointer at 0 , expected : no character should be read --
+
+Notice: fgetss(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
@@ -144,6 +156,8 @@ bool(true)
 int(0)
 bool(false)
 -- fgetss() with default length, file pointer at 0 , expected : no character should be read --
+
+Notice: fgetss(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
@@ -154,6 +168,8 @@ bool(true)
 int(0)
 bool(false)
 -- fgetss() with default length, file pointer at 0 , expected : no character should be read --
+
+Notice: fgetss(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
@@ -164,6 +180,8 @@ bool(true)
 int(0)
 bool(false)
 -- fgetss() with default length, file pointer at 0 , expected : no character should be read --
+
+Notice: fgetss(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
index abc794de347bdba5734a19b673dbb7ca89eb348f..79576e4656c2f4fb7cacc44bd0595b2a2cb06e2f 100644 (file)
@@ -89,6 +89,8 @@ echo "Done\n";
 Notice: fputcsv(): delimiter must be a single character in %s on line %d
 
 Notice: fputcsv(): enclosure must be a single character in %s on line %d
+
+Notice: fputcsv(): write of 12 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
@@ -99,6 +101,8 @@ string(0) ""
 Notice: fputcsv(): delimiter must be a single character in %s on line %d
 
 Notice: fputcsv(): enclosure must be a single character in %s on line %d
+
+Notice: fputcsv(): write of 12 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
@@ -109,6 +113,8 @@ string(0) ""
 Notice: fputcsv(): delimiter must be a single character in %s on line %d
 
 Notice: fputcsv(): enclosure must be a single character in %s on line %d
+
+Notice: fputcsv(): write of 12 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
@@ -119,6 +125,8 @@ string(0) ""
 Notice: fputcsv(): delimiter must be a single character in %s on line %d
 
 Notice: fputcsv(): enclosure must be a single character in %s on line %d
+
+Notice: fputcsv(): write of 15 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
@@ -129,6 +137,8 @@ string(0) ""
 Notice: fputcsv(): delimiter must be a single character in %s on line %d
 
 Notice: fputcsv(): enclosure must be a single character in %s on line %d
+
+Notice: fputcsv(): write of 15 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
@@ -139,6 +149,8 @@ string(0) ""
 Notice: fputcsv(): delimiter must be a single character in %s on line %d
 
 Notice: fputcsv(): enclosure must be a single character in %s on line %d
+
+Notice: fputcsv(): write of 15 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
@@ -149,6 +161,8 @@ string(0) ""
 Notice: fputcsv(): delimiter must be a single character in %s on line %d
 
 Notice: fputcsv(): enclosure must be a single character in %s on line %d
+
+Notice: fputcsv(): write of 16 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
@@ -159,6 +173,8 @@ string(0) ""
 Notice: fputcsv(): delimiter must be a single character in %s on line %d
 
 Notice: fputcsv(): enclosure must be a single character in %s on line %d
+
+Notice: fputcsv(): write of 16 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
@@ -169,6 +185,8 @@ string(0) ""
 Notice: fputcsv(): delimiter must be a single character in %s on line %d
 
 Notice: fputcsv(): enclosure must be a single character in %s on line %d
+
+Notice: fputcsv(): write of 16 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
@@ -179,6 +197,8 @@ string(0) ""
 Notice: fputcsv(): delimiter must be a single character in %s on line %d
 
 Notice: fputcsv(): enclosure must be a single character in %s on line %d
+
+Notice: fputcsv(): write of 18 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
@@ -189,6 +209,8 @@ string(0) ""
 Notice: fputcsv(): delimiter must be a single character in %s on line %d
 
 Notice: fputcsv(): enclosure must be a single character in %s on line %d
+
+Notice: fputcsv(): write of 18 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
@@ -199,6 +221,8 @@ string(0) ""
 Notice: fputcsv(): delimiter must be a single character in %s on line %d
 
 Notice: fputcsv(): enclosure must be a single character in %s on line %d
+
+Notice: fputcsv(): write of 18 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
@@ -209,6 +233,8 @@ string(0) ""
 Notice: fputcsv(): delimiter must be a single character in %s on line %d
 
 Notice: fputcsv(): enclosure must be a single character in %s on line %d
+
+Notice: fputcsv(): write of 16 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
@@ -219,6 +245,8 @@ string(0) ""
 Notice: fputcsv(): delimiter must be a single character in %s on line %d
 
 Notice: fputcsv(): enclosure must be a single character in %s on line %d
+
+Notice: fputcsv(): write of 16 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
@@ -229,6 +257,8 @@ string(0) ""
 Notice: fputcsv(): delimiter must be a single character in %s on line %d
 
 Notice: fputcsv(): enclosure must be a single character in %s on line %d
+
+Notice: fputcsv(): write of 16 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
@@ -239,6 +269,8 @@ string(0) ""
 Notice: fputcsv(): delimiter must be a single character in %s on line %d
 
 Notice: fputcsv(): enclosure must be a single character in %s on line %d
+
+Notice: fputcsv(): write of 16 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
@@ -249,6 +281,8 @@ string(0) ""
 Notice: fputcsv(): delimiter must be a single character in %s on line %d
 
 Notice: fputcsv(): enclosure must be a single character in %s on line %d
+
+Notice: fputcsv(): write of 16 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
@@ -259,6 +293,8 @@ string(0) ""
 Notice: fputcsv(): delimiter must be a single character in %s on line %d
 
 Notice: fputcsv(): enclosure must be a single character in %s on line %d
+
+Notice: fputcsv(): write of 16 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
@@ -269,6 +305,8 @@ string(0) ""
 Notice: fputcsv(): delimiter must be a single character in %s on line %d
 
 Notice: fputcsv(): enclosure must be a single character in %s on line %d
+
+Notice: fputcsv(): write of 18 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
@@ -279,6 +317,8 @@ string(0) ""
 Notice: fputcsv(): delimiter must be a single character in %s on line %d
 
 Notice: fputcsv(): enclosure must be a single character in %s on line %d
+
+Notice: fputcsv(): write of 18 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
@@ -289,6 +329,8 @@ string(0) ""
 Notice: fputcsv(): delimiter must be a single character in %s on line %d
 
 Notice: fputcsv(): enclosure must be a single character in %s on line %d
+
+Notice: fputcsv(): write of 18 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
@@ -299,6 +341,8 @@ string(0) ""
 Notice: fputcsv(): delimiter must be a single character in %s on line %d
 
 Notice: fputcsv(): enclosure must be a single character in %s on line %d
+
+Notice: fputcsv(): write of 22 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
@@ -309,6 +353,8 @@ string(0) ""
 Notice: fputcsv(): delimiter must be a single character in %s on line %d
 
 Notice: fputcsv(): enclosure must be a single character in %s on line %d
+
+Notice: fputcsv(): write of 22 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
@@ -319,6 +365,8 @@ string(0) ""
 Notice: fputcsv(): delimiter must be a single character in %s on line %d
 
 Notice: fputcsv(): enclosure must be a single character in %s on line %d
+
+Notice: fputcsv(): write of 22 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
@@ -329,6 +377,8 @@ string(0) ""
 Notice: fputcsv(): delimiter must be a single character in %s on line %d
 
 Notice: fputcsv(): enclosure must be a single character in %s on line %d
+
+Notice: fputcsv(): write of 24 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
@@ -339,6 +389,8 @@ string(0) ""
 Notice: fputcsv(): delimiter must be a single character in %s on line %d
 
 Notice: fputcsv(): enclosure must be a single character in %s on line %d
+
+Notice: fputcsv(): write of 24 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
@@ -349,6 +401,8 @@ string(0) ""
 Notice: fputcsv(): delimiter must be a single character in %s on line %d
 
 Notice: fputcsv(): enclosure must be a single character in %s on line %d
+
+Notice: fputcsv(): write of 24 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
index a3c8efb0b0c752de467458875b7f1fb9d77572ca..908ce90f2eea3dd1c5b03cbc938c2778d2ace174 100644 (file)
@@ -103,7 +103,7 @@ foreach($file_content_types as $file_content_type) {
 
 echo "Done\n";
 ?>
---EXPECT--
+--EXPECTF--
 *** Testing fread() : usage variations ***
 
 -- Testing fread() with file having content of type numeric --
@@ -111,14 +111,18 @@ echo "Done\n";
 -- Reading entire file content, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1024 bytes from file, expecting 0 bytes ... OK
+Reading 1024 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
 -- Reading file content less than max. file size, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1000 bytes from file, expecting 0 bytes ... OK
+Reading 1000 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
@@ -126,14 +130,18 @@ bool(false)
 -- Reading entire file content, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1024 bytes from file, expecting 0 bytes ... OK
+Reading 1024 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
 -- Reading file content less than max. file size, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1000 bytes from file, expecting 0 bytes ... OK
+Reading 1000 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
@@ -141,14 +149,18 @@ bool(false)
 -- Reading entire file content, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1024 bytes from file, expecting 0 bytes ... OK
+Reading 1024 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
 -- Reading file content less than max. file size, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1000 bytes from file, expecting 0 bytes ... OK
+Reading 1000 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
@@ -156,14 +168,18 @@ bool(false)
 -- Reading entire file content, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1024 bytes from file, expecting 0 bytes ... OK
+Reading 1024 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
 -- Reading file content less than max. file size, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1000 bytes from file, expecting 0 bytes ... OK
+Reading 1000 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
@@ -171,14 +187,18 @@ bool(false)
 -- Reading entire file content, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1024 bytes from file, expecting 0 bytes ... OK
+Reading 1024 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
 -- Reading file content less than max. file size, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1000 bytes from file, expecting 0 bytes ... OK
+Reading 1000 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
@@ -186,14 +206,18 @@ bool(false)
 -- Reading entire file content, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1024 bytes from file, expecting 0 bytes ... OK
+Reading 1024 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
 -- Reading file content less than max. file size, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1000 bytes from file, expecting 0 bytes ... OK
+Reading 1000 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
@@ -201,14 +225,18 @@ bool(false)
 -- Reading entire file content, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1024 bytes from file, expecting 0 bytes ... OK
+Reading 1024 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
 -- Reading file content less than max. file size, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1000 bytes from file, expecting 0 bytes ... OK
+Reading 1000 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
@@ -216,14 +244,18 @@ bool(false)
 -- Reading entire file content, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1024 bytes from file, expecting 0 bytes ... OK
+Reading 1024 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
 -- Reading file content less than max. file size, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1000 bytes from file, expecting 0 bytes ... OK
+Reading 1000 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
@@ -231,14 +263,18 @@ bool(false)
 -- Reading entire file content, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1024 bytes from file, expecting 0 bytes ... OK
+Reading 1024 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
 -- Reading file content less than max. file size, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1000 bytes from file, expecting 0 bytes ... OK
+Reading 1000 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
@@ -248,14 +284,18 @@ bool(false)
 -- Reading entire file content, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1024 bytes from file, expecting 0 bytes ... OK
+Reading 1024 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
 -- Reading file content less than max. file size, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1000 bytes from file, expecting 0 bytes ... OK
+Reading 1000 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
@@ -263,14 +303,18 @@ bool(false)
 -- Reading entire file content, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1024 bytes from file, expecting 0 bytes ... OK
+Reading 1024 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
 -- Reading file content less than max. file size, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1000 bytes from file, expecting 0 bytes ... OK
+Reading 1000 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
@@ -278,14 +322,18 @@ bool(false)
 -- Reading entire file content, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1024 bytes from file, expecting 0 bytes ... OK
+Reading 1024 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
 -- Reading file content less than max. file size, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1000 bytes from file, expecting 0 bytes ... OK
+Reading 1000 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
@@ -293,14 +341,18 @@ bool(false)
 -- Reading entire file content, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1024 bytes from file, expecting 0 bytes ... OK
+Reading 1024 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
 -- Reading file content less than max. file size, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1000 bytes from file, expecting 0 bytes ... OK
+Reading 1000 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
@@ -308,14 +360,18 @@ bool(false)
 -- Reading entire file content, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1024 bytes from file, expecting 0 bytes ... OK
+Reading 1024 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
 -- Reading file content less than max. file size, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1000 bytes from file, expecting 0 bytes ... OK
+Reading 1000 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
@@ -323,14 +379,18 @@ bool(false)
 -- Reading entire file content, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1024 bytes from file, expecting 0 bytes ... OK
+Reading 1024 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
 -- Reading file content less than max. file size, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1000 bytes from file, expecting 0 bytes ... OK
+Reading 1000 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
@@ -338,14 +398,18 @@ bool(false)
 -- Reading entire file content, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1024 bytes from file, expecting 0 bytes ... OK
+Reading 1024 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
 -- Reading file content less than max. file size, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1000 bytes from file, expecting 0 bytes ... OK
+Reading 1000 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
@@ -353,14 +417,18 @@ bool(false)
 -- Reading entire file content, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1024 bytes from file, expecting 0 bytes ... OK
+Reading 1024 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
 -- Reading file content less than max. file size, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1000 bytes from file, expecting 0 bytes ... OK
+Reading 1000 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
@@ -368,14 +436,18 @@ bool(false)
 -- Reading entire file content, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1024 bytes from file, expecting 0 bytes ... OK
+Reading 1024 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
 -- Reading file content less than max. file size, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1000 bytes from file, expecting 0 bytes ... OK
+Reading 1000 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
@@ -385,14 +457,18 @@ bool(false)
 -- Reading entire file content, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1024 bytes from file, expecting 0 bytes ... OK
+Reading 1024 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
 -- Reading file content less than max. file size, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1000 bytes from file, expecting 0 bytes ... OK
+Reading 1000 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
@@ -400,14 +476,18 @@ bool(false)
 -- Reading entire file content, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1024 bytes from file, expecting 0 bytes ... OK
+Reading 1024 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
 -- Reading file content less than max. file size, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1000 bytes from file, expecting 0 bytes ... OK
+Reading 1000 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
@@ -415,14 +495,18 @@ bool(false)
 -- Reading entire file content, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1024 bytes from file, expecting 0 bytes ... OK
+Reading 1024 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
 -- Reading file content less than max. file size, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1000 bytes from file, expecting 0 bytes ... OK
+Reading 1000 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
@@ -430,14 +514,18 @@ bool(false)
 -- Reading entire file content, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1024 bytes from file, expecting 0 bytes ... OK
+Reading 1024 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
 -- Reading file content less than max. file size, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1000 bytes from file, expecting 0 bytes ... OK
+Reading 1000 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
@@ -445,14 +533,18 @@ bool(false)
 -- Reading entire file content, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1024 bytes from file, expecting 0 bytes ... OK
+Reading 1024 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
 -- Reading file content less than max. file size, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1000 bytes from file, expecting 0 bytes ... OK
+Reading 1000 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
@@ -460,14 +552,18 @@ bool(false)
 -- Reading entire file content, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1024 bytes from file, expecting 0 bytes ... OK
+Reading 1024 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
 -- Reading file content less than max. file size, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1000 bytes from file, expecting 0 bytes ... OK
+Reading 1000 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
@@ -475,14 +571,18 @@ bool(false)
 -- Reading entire file content, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1024 bytes from file, expecting 0 bytes ... OK
+Reading 1024 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
 -- Reading file content less than max. file size, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1000 bytes from file, expecting 0 bytes ... OK
+Reading 1000 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
@@ -490,14 +590,18 @@ bool(false)
 -- Reading entire file content, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1024 bytes from file, expecting 0 bytes ... OK
+Reading 1024 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
 -- Reading file content less than max. file size, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1000 bytes from file, expecting 0 bytes ... OK
+Reading 1000 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
@@ -505,14 +609,18 @@ bool(false)
 -- Reading entire file content, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1024 bytes from file, expecting 0 bytes ... OK
+Reading 1024 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
 -- Reading file content less than max. file size, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1000 bytes from file, expecting 0 bytes ... OK
+Reading 1000 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
@@ -522,14 +630,18 @@ bool(false)
 -- Reading entire file content, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1024 bytes from file, expecting 0 bytes ... OK
+Reading 1024 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
 -- Reading file content less than max. file size, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1000 bytes from file, expecting 0 bytes ... OK
+Reading 1000 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
@@ -537,14 +649,18 @@ bool(false)
 -- Reading entire file content, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1024 bytes from file, expecting 0 bytes ... OK
+Reading 1024 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
 -- Reading file content less than max. file size, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1000 bytes from file, expecting 0 bytes ... OK
+Reading 1000 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
@@ -552,14 +668,18 @@ bool(false)
 -- Reading entire file content, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1024 bytes from file, expecting 0 bytes ... OK
+Reading 1024 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
 -- Reading file content less than max. file size, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1000 bytes from file, expecting 0 bytes ... OK
+Reading 1000 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
@@ -567,14 +687,18 @@ bool(false)
 -- Reading entire file content, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1024 bytes from file, expecting 0 bytes ... OK
+Reading 1024 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
 -- Reading file content less than max. file size, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1000 bytes from file, expecting 0 bytes ... OK
+Reading 1000 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
@@ -582,14 +706,18 @@ bool(false)
 -- Reading entire file content, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1024 bytes from file, expecting 0 bytes ... OK
+Reading 1024 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
 -- Reading file content less than max. file size, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1000 bytes from file, expecting 0 bytes ... OK
+Reading 1000 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
@@ -597,14 +725,18 @@ bool(false)
 -- Reading entire file content, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1024 bytes from file, expecting 0 bytes ... OK
+Reading 1024 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
 -- Reading file content less than max. file size, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1000 bytes from file, expecting 0 bytes ... OK
+Reading 1000 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
@@ -612,14 +744,18 @@ bool(false)
 -- Reading entire file content, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1024 bytes from file, expecting 0 bytes ... OK
+Reading 1024 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
 -- Reading file content less than max. file size, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1000 bytes from file, expecting 0 bytes ... OK
+Reading 1000 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
@@ -627,14 +763,18 @@ bool(false)
 -- Reading entire file content, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1024 bytes from file, expecting 0 bytes ... OK
+Reading 1024 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
 -- Reading file content less than max. file size, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1000 bytes from file, expecting 0 bytes ... OK
+Reading 1000 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
@@ -642,14 +782,18 @@ bool(false)
 -- Reading entire file content, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1024 bytes from file, expecting 0 bytes ... OK
+Reading 1024 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
 -- Reading file content less than max. file size, expeceted : 0 bytes --
 int(0)
 bool(false)
-Reading 1000 bytes from file, expecting 0 bytes ... OK
+Reading 1000 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 
diff --git a/ext/standard/tests/file/fread_variation4-win32.phpt b/ext/standard/tests/file/fread_variation4-win32.phpt
deleted file mode 100644 (file)
index 94328ac..0000000
+++ /dev/null
@@ -1,469 +0,0 @@
---TEST--
-Test fread() function : usage variations - read beyond file size, write only mode
---SKIPIF--
-<?php
-if (substr(PHP_OS, 0, 3) != 'WIN') {
-  die('skip...only valid for Windows');
-}
-?>
---FILE--
-<?php
-/*
- Prototype: string fread ( resource $handle [, int $length] );
- Description: reads up to length bytes from the file pointer referenced by handle.
-   Reading stops when up to length bytes have been read, EOF (end of file) is
-   reached, (for network streams) when a packet becomes available, or (after
-   opening userspace stream) when 8192 bytes have been read whichever comes first.
-*/
-
-// include the file.inc for common functions for test
-include ("file.inc");
-
-/* Function : function check_read(resource $file_handle, int $read_size, int $expect_size)
-   Description : Read data from file of size $read_size and verifies that $expected_size no. of
-                 bytes are read.
-     $file_handle : File Handle
-     $read_size   : No. of bytes to be read.
-     $expect_size : Expected data length
-   Returns: returns the data read
-*/
-function check_read($file_handle, $read_size, $expect_size) {
-  // print file pointer position before read
-  var_dump( ftell($file_handle) );
-  var_dump( feof($file_handle) );
-
-  // read the data of size $read_size
-  echo "Reading $read_size bytes from file, expecting $expect_size bytes ... ";
-  $data_from_file = fread($file_handle, $read_size);
-
-  // check if data read is of expected size
-  if ( strlen($data_from_file) == $expect_size)
-    echo "OK\n";
-  else
-    echo "Error reading file, total number of bytes read = ".strlen($data_from_file)."\n";
-
-  // file pointer position after read
-  var_dump( ftell($file_handle) );
-  // check if file pointer at eof()
-  var_dump( feof($file_handle) );
-
-  return $data_from_file;
-}
-
-echo "*** Testing fread() : usage variations ***\n";
-
-$file_modes = array("a","ab","at",
-                    "w","wb","wt",
-                    "x","xb","xt" );
-
-$file_content_types = array("numeric","text","text_with_new_line");
-
-foreach($file_content_types as $file_content_type) {
-  echo "\n-- Testing fread() with file having content of type ". $file_content_type ." --\n";
-
-  /* open the file using $files_modes and perform fread() on it */
-  foreach($file_modes as $file_mode) {
-    if(!strstr($file_mode,"x")){
-       /* create files with $file_content_type */
-       create_files ( __DIR__, 1, $file_content_type, 0755, 1, "w", "fread_variation", 4);
-    }
-
-    $filename = __DIR__."/fread_variation4.tmp"; // this is name of the file created by create_files()
-    echo "-- File opened in mode ".$file_mode." --\n";
-    $file_handle = fopen($filename, $file_mode);
-    if (!$file_handle) {
-       echo "Error: failed to fopen() file: $filename!";
-       exit();
-    }
-
-    if(strstr($file_mode,"w") || strstr($file_mode,"x") ) {
-      fill_file($file_handle, $file_content_type, 1024);
-    }
-
-    rewind($file_handle);
-    echo "-- Reading beyond filesize, expeceted : 1024 bytes --\n";
-    // read file by giving size more than its size
-    rewind($file_handle);
-    $data_from_file = check_read($file_handle, 1030, ( strstr($file_mode, "+") ? 1024 : 0) );
-    if ( $data_from_file != false)
-      var_dump( md5($data_from_file) );
-
-    echo "-- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes --\n";
-    rewind($file_handle);
-    // try fread when file pointer at end
-    fseek($file_handle, 0, SEEK_END);
-    //reading file when file pointer at end
-    $data_from_file = check_read($file_handle, 10, 0);
-    if ( $data_from_file != false)
-      var_dump( md5($data_from_file) );
-
-    // now close the file
-    fclose($file_handle);
-
-    // delete the file created
-    delete_file($filename); // delete file
-  } // end of inner foreach loop
-}// end of outer foreach loop
-
-echo"Done\n";
-?>
---EXPECT--
-*** Testing fread() : usage variations ***
-
--- Testing fread() with file having content of type numeric --
--- File opened in mode a --
--- Reading beyond filesize, expeceted : 1024 bytes --
-int(0)
-bool(false)
-Reading 1030 bytes from file, expecting 0 bytes ... OK
-int(0)
-bool(false)
--- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes --
-int(1024)
-bool(false)
-Reading 10 bytes from file, expecting 0 bytes ... OK
-int(1024)
-bool(false)
--- File opened in mode ab --
--- Reading beyond filesize, expeceted : 1024 bytes --
-int(0)
-bool(false)
-Reading 1030 bytes from file, expecting 0 bytes ... OK
-int(0)
-bool(false)
--- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes --
-int(1024)
-bool(false)
-Reading 10 bytes from file, expecting 0 bytes ... OK
-int(1024)
-bool(false)
--- File opened in mode at --
--- Reading beyond filesize, expeceted : 1024 bytes --
-int(0)
-bool(false)
-Reading 1030 bytes from file, expecting 0 bytes ... OK
-int(0)
-bool(false)
--- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes --
-int(1024)
-bool(false)
-Reading 10 bytes from file, expecting 0 bytes ... OK
-int(1024)
-bool(false)
--- File opened in mode w --
--- Reading beyond filesize, expeceted : 1024 bytes --
-int(0)
-bool(false)
-Reading 1030 bytes from file, expecting 0 bytes ... OK
-int(0)
-bool(false)
--- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes --
-int(1024)
-bool(false)
-Reading 10 bytes from file, expecting 0 bytes ... OK
-int(1024)
-bool(false)
--- File opened in mode wb --
--- Reading beyond filesize, expeceted : 1024 bytes --
-int(0)
-bool(false)
-Reading 1030 bytes from file, expecting 0 bytes ... OK
-int(0)
-bool(false)
--- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes --
-int(1024)
-bool(false)
-Reading 10 bytes from file, expecting 0 bytes ... OK
-int(1024)
-bool(false)
--- File opened in mode wt --
--- Reading beyond filesize, expeceted : 1024 bytes --
-int(0)
-bool(false)
-Reading 1030 bytes from file, expecting 0 bytes ... OK
-int(0)
-bool(false)
--- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes --
-int(1024)
-bool(false)
-Reading 10 bytes from file, expecting 0 bytes ... OK
-int(1024)
-bool(false)
--- File opened in mode x --
--- Reading beyond filesize, expeceted : 1024 bytes --
-int(0)
-bool(false)
-Reading 1030 bytes from file, expecting 0 bytes ... OK
-int(0)
-bool(false)
--- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes --
-int(1024)
-bool(false)
-Reading 10 bytes from file, expecting 0 bytes ... OK
-int(1024)
-bool(false)
--- File opened in mode xb --
--- Reading beyond filesize, expeceted : 1024 bytes --
-int(0)
-bool(false)
-Reading 1030 bytes from file, expecting 0 bytes ... OK
-int(0)
-bool(false)
--- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes --
-int(1024)
-bool(false)
-Reading 10 bytes from file, expecting 0 bytes ... OK
-int(1024)
-bool(false)
--- File opened in mode xt --
--- Reading beyond filesize, expeceted : 1024 bytes --
-int(0)
-bool(false)
-Reading 1030 bytes from file, expecting 0 bytes ... OK
-int(0)
-bool(false)
--- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes --
-int(1024)
-bool(false)
-Reading 10 bytes from file, expecting 0 bytes ... OK
-int(1024)
-bool(false)
-
--- Testing fread() with file having content of type text --
--- File opened in mode a --
--- Reading beyond filesize, expeceted : 1024 bytes --
-int(0)
-bool(false)
-Reading 1030 bytes from file, expecting 0 bytes ... OK
-int(0)
-bool(false)
--- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes --
-int(1024)
-bool(false)
-Reading 10 bytes from file, expecting 0 bytes ... OK
-int(1024)
-bool(false)
--- File opened in mode ab --
--- Reading beyond filesize, expeceted : 1024 bytes --
-int(0)
-bool(false)
-Reading 1030 bytes from file, expecting 0 bytes ... OK
-int(0)
-bool(false)
--- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes --
-int(1024)
-bool(false)
-Reading 10 bytes from file, expecting 0 bytes ... OK
-int(1024)
-bool(false)
--- File opened in mode at --
--- Reading beyond filesize, expeceted : 1024 bytes --
-int(0)
-bool(false)
-Reading 1030 bytes from file, expecting 0 bytes ... OK
-int(0)
-bool(false)
--- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes --
-int(1024)
-bool(false)
-Reading 10 bytes from file, expecting 0 bytes ... OK
-int(1024)
-bool(false)
--- File opened in mode w --
--- Reading beyond filesize, expeceted : 1024 bytes --
-int(0)
-bool(false)
-Reading 1030 bytes from file, expecting 0 bytes ... OK
-int(0)
-bool(false)
--- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes --
-int(1024)
-bool(false)
-Reading 10 bytes from file, expecting 0 bytes ... OK
-int(1024)
-bool(false)
--- File opened in mode wb --
--- Reading beyond filesize, expeceted : 1024 bytes --
-int(0)
-bool(false)
-Reading 1030 bytes from file, expecting 0 bytes ... OK
-int(0)
-bool(false)
--- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes --
-int(1024)
-bool(false)
-Reading 10 bytes from file, expecting 0 bytes ... OK
-int(1024)
-bool(false)
--- File opened in mode wt --
--- Reading beyond filesize, expeceted : 1024 bytes --
-int(0)
-bool(false)
-Reading 1030 bytes from file, expecting 0 bytes ... OK
-int(0)
-bool(false)
--- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes --
-int(1024)
-bool(false)
-Reading 10 bytes from file, expecting 0 bytes ... OK
-int(1024)
-bool(false)
--- File opened in mode x --
--- Reading beyond filesize, expeceted : 1024 bytes --
-int(0)
-bool(false)
-Reading 1030 bytes from file, expecting 0 bytes ... OK
-int(0)
-bool(false)
--- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes --
-int(1024)
-bool(false)
-Reading 10 bytes from file, expecting 0 bytes ... OK
-int(1024)
-bool(false)
--- File opened in mode xb --
--- Reading beyond filesize, expeceted : 1024 bytes --
-int(0)
-bool(false)
-Reading 1030 bytes from file, expecting 0 bytes ... OK
-int(0)
-bool(false)
--- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes --
-int(1024)
-bool(false)
-Reading 10 bytes from file, expecting 0 bytes ... OK
-int(1024)
-bool(false)
--- File opened in mode xt --
--- Reading beyond filesize, expeceted : 1024 bytes --
-int(0)
-bool(false)
-Reading 1030 bytes from file, expecting 0 bytes ... OK
-int(0)
-bool(false)
--- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes --
-int(1024)
-bool(false)
-Reading 10 bytes from file, expecting 0 bytes ... OK
-int(1024)
-bool(false)
-
--- Testing fread() with file having content of type text_with_new_line --
--- File opened in mode a --
--- Reading beyond filesize, expeceted : 1024 bytes --
-int(0)
-bool(false)
-Reading 1030 bytes from file, expecting 0 bytes ... OK
-int(0)
-bool(false)
--- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes --
-int(1024)
-bool(false)
-Reading 10 bytes from file, expecting 0 bytes ... OK
-int(1024)
-bool(false)
--- File opened in mode ab --
--- Reading beyond filesize, expeceted : 1024 bytes --
-int(0)
-bool(false)
-Reading 1030 bytes from file, expecting 0 bytes ... OK
-int(0)
-bool(false)
--- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes --
-int(1024)
-bool(false)
-Reading 10 bytes from file, expecting 0 bytes ... OK
-int(1024)
-bool(false)
--- File opened in mode at --
--- Reading beyond filesize, expeceted : 1024 bytes --
-int(0)
-bool(false)
-Reading 1030 bytes from file, expecting 0 bytes ... OK
-int(0)
-bool(false)
--- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes --
-int(1024)
-bool(false)
-Reading 10 bytes from file, expecting 0 bytes ... OK
-int(1024)
-bool(false)
--- File opened in mode w --
--- Reading beyond filesize, expeceted : 1024 bytes --
-int(0)
-bool(false)
-Reading 1030 bytes from file, expecting 0 bytes ... OK
-int(0)
-bool(false)
--- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes --
-int(1024)
-bool(false)
-Reading 10 bytes from file, expecting 0 bytes ... OK
-int(1024)
-bool(false)
--- File opened in mode wb --
--- Reading beyond filesize, expeceted : 1024 bytes --
-int(0)
-bool(false)
-Reading 1030 bytes from file, expecting 0 bytes ... OK
-int(0)
-bool(false)
--- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes --
-int(1024)
-bool(false)
-Reading 10 bytes from file, expecting 0 bytes ... OK
-int(1024)
-bool(false)
--- File opened in mode wt --
--- Reading beyond filesize, expeceted : 1024 bytes --
-int(0)
-bool(false)
-Reading 1030 bytes from file, expecting 0 bytes ... OK
-int(0)
-bool(false)
--- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes --
-int(1137)
-bool(false)
-Reading 10 bytes from file, expecting 0 bytes ... OK
-int(1137)
-bool(false)
--- File opened in mode x --
--- Reading beyond filesize, expeceted : 1024 bytes --
-int(0)
-bool(false)
-Reading 1030 bytes from file, expecting 0 bytes ... OK
-int(0)
-bool(false)
--- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes --
-int(1024)
-bool(false)
-Reading 10 bytes from file, expecting 0 bytes ... OK
-int(1024)
-bool(false)
--- File opened in mode xb --
--- Reading beyond filesize, expeceted : 1024 bytes --
-int(0)
-bool(false)
-Reading 1030 bytes from file, expecting 0 bytes ... OK
-int(0)
-bool(false)
--- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes --
-int(1024)
-bool(false)
-Reading 10 bytes from file, expecting 0 bytes ... OK
-int(1024)
-bool(false)
--- File opened in mode xt --
--- Reading beyond filesize, expeceted : 1024 bytes --
-int(0)
-bool(false)
-Reading 1030 bytes from file, expecting 0 bytes ... OK
-int(0)
-bool(false)
--- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes --
-int(1137)
-bool(false)
-Reading 10 bytes from file, expecting 0 bytes ... OK
-int(1137)
-bool(false)
-Done
index 538c441f1f7f992a5d7bb554080ce6112d22e816..de2fceb0347010f7de7c2d0e50124c443c481cbc 100644 (file)
@@ -1,11 +1,5 @@
 --TEST--
 Test fread() function : usage variations - read beyond file size, write only mode
---SKIPIF--
-<?php
-if (substr(PHP_OS, 0, 3) == 'WIN') {
-  die('skip.. Not valid for Windows');
-}
-?>
 --FILE--
 <?php
 /*
@@ -107,7 +101,7 @@ foreach($file_content_types as $file_content_type) {
 
 echo"Done\n";
 ?>
---EXPECT--
+--EXPECTF--
 *** Testing fread() : usage variations ***
 
 -- Testing fread() with file having content of type numeric --
@@ -115,117 +109,153 @@ echo"Done\n";
 -- Reading beyond filesize, expeceted : 1024 bytes --
 int(0)
 bool(false)
-Reading 1030 bytes from file, expecting 0 bytes ... OK
+Reading 1030 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes --
 int(1024)
 bool(false)
-Reading 10 bytes from file, expecting 0 bytes ... OK
+Reading 10 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(1024)
 bool(false)
 -- File opened in mode ab --
 -- Reading beyond filesize, expeceted : 1024 bytes --
 int(0)
 bool(false)
-Reading 1030 bytes from file, expecting 0 bytes ... OK
+Reading 1030 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes --
 int(1024)
 bool(false)
-Reading 10 bytes from file, expecting 0 bytes ... OK
+Reading 10 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(1024)
 bool(false)
 -- File opened in mode at --
 -- Reading beyond filesize, expeceted : 1024 bytes --
 int(0)
 bool(false)
-Reading 1030 bytes from file, expecting 0 bytes ... OK
+Reading 1030 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes --
 int(1024)
 bool(false)
-Reading 10 bytes from file, expecting 0 bytes ... OK
+Reading 10 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(1024)
 bool(false)
 -- File opened in mode w --
 -- Reading beyond filesize, expeceted : 1024 bytes --
 int(0)
 bool(false)
-Reading 1030 bytes from file, expecting 0 bytes ... OK
+Reading 1030 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes --
 int(1024)
 bool(false)
-Reading 10 bytes from file, expecting 0 bytes ... OK
+Reading 10 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(1024)
 bool(false)
 -- File opened in mode wb --
 -- Reading beyond filesize, expeceted : 1024 bytes --
 int(0)
 bool(false)
-Reading 1030 bytes from file, expecting 0 bytes ... OK
+Reading 1030 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes --
 int(1024)
 bool(false)
-Reading 10 bytes from file, expecting 0 bytes ... OK
+Reading 10 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(1024)
 bool(false)
 -- File opened in mode wt --
 -- Reading beyond filesize, expeceted : 1024 bytes --
 int(0)
 bool(false)
-Reading 1030 bytes from file, expecting 0 bytes ... OK
+Reading 1030 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes --
 int(1024)
 bool(false)
-Reading 10 bytes from file, expecting 0 bytes ... OK
+Reading 10 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(1024)
 bool(false)
 -- File opened in mode x --
 -- Reading beyond filesize, expeceted : 1024 bytes --
 int(0)
 bool(false)
-Reading 1030 bytes from file, expecting 0 bytes ... OK
+Reading 1030 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes --
 int(1024)
 bool(false)
-Reading 10 bytes from file, expecting 0 bytes ... OK
+Reading 10 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(1024)
 bool(false)
 -- File opened in mode xb --
 -- Reading beyond filesize, expeceted : 1024 bytes --
 int(0)
 bool(false)
-Reading 1030 bytes from file, expecting 0 bytes ... OK
+Reading 1030 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes --
 int(1024)
 bool(false)
-Reading 10 bytes from file, expecting 0 bytes ... OK
+Reading 10 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(1024)
 bool(false)
 -- File opened in mode xt --
 -- Reading beyond filesize, expeceted : 1024 bytes --
 int(0)
 bool(false)
-Reading 1030 bytes from file, expecting 0 bytes ... OK
+Reading 1030 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes --
 int(1024)
 bool(false)
-Reading 10 bytes from file, expecting 0 bytes ... OK
+Reading 10 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(1024)
 bool(false)
 
@@ -234,117 +264,153 @@ bool(false)
 -- Reading beyond filesize, expeceted : 1024 bytes --
 int(0)
 bool(false)
-Reading 1030 bytes from file, expecting 0 bytes ... OK
+Reading 1030 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes --
 int(1024)
 bool(false)
-Reading 10 bytes from file, expecting 0 bytes ... OK
+Reading 10 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(1024)
 bool(false)
 -- File opened in mode ab --
 -- Reading beyond filesize, expeceted : 1024 bytes --
 int(0)
 bool(false)
-Reading 1030 bytes from file, expecting 0 bytes ... OK
+Reading 1030 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes --
 int(1024)
 bool(false)
-Reading 10 bytes from file, expecting 0 bytes ... OK
+Reading 10 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(1024)
 bool(false)
 -- File opened in mode at --
 -- Reading beyond filesize, expeceted : 1024 bytes --
 int(0)
 bool(false)
-Reading 1030 bytes from file, expecting 0 bytes ... OK
+Reading 1030 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes --
 int(1024)
 bool(false)
-Reading 10 bytes from file, expecting 0 bytes ... OK
+Reading 10 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(1024)
 bool(false)
 -- File opened in mode w --
 -- Reading beyond filesize, expeceted : 1024 bytes --
 int(0)
 bool(false)
-Reading 1030 bytes from file, expecting 0 bytes ... OK
+Reading 1030 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes --
 int(1024)
 bool(false)
-Reading 10 bytes from file, expecting 0 bytes ... OK
+Reading 10 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(1024)
 bool(false)
 -- File opened in mode wb --
 -- Reading beyond filesize, expeceted : 1024 bytes --
 int(0)
 bool(false)
-Reading 1030 bytes from file, expecting 0 bytes ... OK
+Reading 1030 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes --
 int(1024)
 bool(false)
-Reading 10 bytes from file, expecting 0 bytes ... OK
+Reading 10 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(1024)
 bool(false)
 -- File opened in mode wt --
 -- Reading beyond filesize, expeceted : 1024 bytes --
 int(0)
 bool(false)
-Reading 1030 bytes from file, expecting 0 bytes ... OK
+Reading 1030 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes --
 int(1024)
 bool(false)
-Reading 10 bytes from file, expecting 0 bytes ... OK
+Reading 10 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(1024)
 bool(false)
 -- File opened in mode x --
 -- Reading beyond filesize, expeceted : 1024 bytes --
 int(0)
 bool(false)
-Reading 1030 bytes from file, expecting 0 bytes ... OK
+Reading 1030 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes --
 int(1024)
 bool(false)
-Reading 10 bytes from file, expecting 0 bytes ... OK
+Reading 10 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(1024)
 bool(false)
 -- File opened in mode xb --
 -- Reading beyond filesize, expeceted : 1024 bytes --
 int(0)
 bool(false)
-Reading 1030 bytes from file, expecting 0 bytes ... OK
+Reading 1030 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes --
 int(1024)
 bool(false)
-Reading 10 bytes from file, expecting 0 bytes ... OK
+Reading 10 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(1024)
 bool(false)
 -- File opened in mode xt --
 -- Reading beyond filesize, expeceted : 1024 bytes --
 int(0)
 bool(false)
-Reading 1030 bytes from file, expecting 0 bytes ... OK
+Reading 1030 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes --
 int(1024)
 bool(false)
-Reading 10 bytes from file, expecting 0 bytes ... OK
+Reading 10 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(1024)
 bool(false)
 
@@ -353,117 +419,153 @@ bool(false)
 -- Reading beyond filesize, expeceted : 1024 bytes --
 int(0)
 bool(false)
-Reading 1030 bytes from file, expecting 0 bytes ... OK
+Reading 1030 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes --
 int(1024)
 bool(false)
-Reading 10 bytes from file, expecting 0 bytes ... OK
+Reading 10 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(1024)
 bool(false)
 -- File opened in mode ab --
 -- Reading beyond filesize, expeceted : 1024 bytes --
 int(0)
 bool(false)
-Reading 1030 bytes from file, expecting 0 bytes ... OK
+Reading 1030 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes --
 int(1024)
 bool(false)
-Reading 10 bytes from file, expecting 0 bytes ... OK
+Reading 10 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(1024)
 bool(false)
 -- File opened in mode at --
 -- Reading beyond filesize, expeceted : 1024 bytes --
 int(0)
 bool(false)
-Reading 1030 bytes from file, expecting 0 bytes ... OK
+Reading 1030 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes --
 int(1024)
 bool(false)
-Reading 10 bytes from file, expecting 0 bytes ... OK
+Reading 10 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(1024)
 bool(false)
 -- File opened in mode w --
 -- Reading beyond filesize, expeceted : 1024 bytes --
 int(0)
 bool(false)
-Reading 1030 bytes from file, expecting 0 bytes ... OK
+Reading 1030 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes --
 int(1024)
 bool(false)
-Reading 10 bytes from file, expecting 0 bytes ... OK
+Reading 10 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(1024)
 bool(false)
 -- File opened in mode wb --
 -- Reading beyond filesize, expeceted : 1024 bytes --
 int(0)
 bool(false)
-Reading 1030 bytes from file, expecting 0 bytes ... OK
+Reading 1030 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes --
 int(1024)
 bool(false)
-Reading 10 bytes from file, expecting 0 bytes ... OK
+Reading 10 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(1024)
 bool(false)
 -- File opened in mode wt --
 -- Reading beyond filesize, expeceted : 1024 bytes --
 int(0)
 bool(false)
-Reading 1030 bytes from file, expecting 0 bytes ... OK
+Reading 1030 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes --
-int(1024)
+int(%r1024|1137%r)
 bool(false)
-Reading 10 bytes from file, expecting 0 bytes ... OK
-int(1024)
+Reading 10 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
+int(%r1024|1137%r)
 bool(false)
 -- File opened in mode x --
 -- Reading beyond filesize, expeceted : 1024 bytes --
 int(0)
 bool(false)
-Reading 1030 bytes from file, expecting 0 bytes ... OK
+Reading 1030 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes --
 int(1024)
 bool(false)
-Reading 10 bytes from file, expecting 0 bytes ... OK
+Reading 10 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(1024)
 bool(false)
 -- File opened in mode xb --
 -- Reading beyond filesize, expeceted : 1024 bytes --
 int(0)
 bool(false)
-Reading 1030 bytes from file, expecting 0 bytes ... OK
+Reading 1030 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes --
 int(1024)
 bool(false)
-Reading 10 bytes from file, expecting 0 bytes ... OK
+Reading 10 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(1024)
 bool(false)
 -- File opened in mode xt --
 -- Reading beyond filesize, expeceted : 1024 bytes --
 int(0)
 bool(false)
-Reading 1030 bytes from file, expecting 0 bytes ... OK
+Reading 1030 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
 int(0)
 bool(false)
 -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes --
-int(1024)
+int(%r1024|1137%r)
 bool(false)
-Reading 10 bytes from file, expecting 0 bytes ... OK
-int(1024)
+Reading 10 bytes from file, expecting 0 bytes ... 
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
+OK
+int(%r1024|1137%r)
 bool(false)
 Done
index d03ba68896e09368d21917a7bef5be30a98c5036..712e1e18c7b6980ad6ea21d2275b776aea613aff 100644 (file)
@@ -65,88 +65,214 @@ if(file_exists($filename)) {
   unlink($filename);
 }
 ?>
---EXPECT--
+--EXPECTF--
 *** Test fscanf(): to read from a file opened in write only mode ***
 
 -- iteration 1 --
+
+Notice: fscanf(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
+
+Notice: fscanf(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
+
+Notice: fscanf(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
+
+Notice: fscanf(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
+
+Notice: fscanf(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
+
+Notice: fscanf(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
+
+Notice: fscanf(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 
 -- iteration 2 --
+
+Notice: fscanf(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
+
+Notice: fscanf(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
+
+Notice: fscanf(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
+
+Notice: fscanf(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
+
+Notice: fscanf(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
+
+Notice: fscanf(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
+
+Notice: fscanf(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 
 -- iteration 3 --
+
+Notice: fscanf(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
+
+Notice: fscanf(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
+
+Notice: fscanf(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
+
+Notice: fscanf(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
+
+Notice: fscanf(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
+
+Notice: fscanf(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
+
+Notice: fscanf(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 
 -- iteration 4 --
+
+Notice: fscanf(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
+
+Notice: fscanf(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
+
+Notice: fscanf(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
+
+Notice: fscanf(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
+
+Notice: fscanf(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
+
+Notice: fscanf(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
+
+Notice: fscanf(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 
 -- iteration 5 --
+
+Notice: fscanf(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
+
+Notice: fscanf(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
+
+Notice: fscanf(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
+
+Notice: fscanf(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
+
+Notice: fscanf(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
+
+Notice: fscanf(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
+
+Notice: fscanf(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 
 -- iteration 6 --
+
+Notice: fscanf(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
+
+Notice: fscanf(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
+
+Notice: fscanf(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
+
+Notice: fscanf(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
+
+Notice: fscanf(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
+
+Notice: fscanf(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
+
+Notice: fscanf(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 
 -- iteration 7 --
+
+Notice: fscanf(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
+
+Notice: fscanf(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
+
+Notice: fscanf(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
+
+Notice: fscanf(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
+
+Notice: fscanf(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
+
+Notice: fscanf(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
+
+Notice: fscanf(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 
 -- iteration 8 --
+
+Notice: fscanf(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
+
+Notice: fscanf(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
+
+Notice: fscanf(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
+
+Notice: fscanf(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
+
+Notice: fscanf(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
+
+Notice: fscanf(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
+
+Notice: fscanf(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 
 -- iteration 9 --
+
+Notice: fscanf(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
+
+Notice: fscanf(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
+
+Notice: fscanf(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
+
+Notice: fscanf(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
+
+Notice: fscanf(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
+
+Notice: fscanf(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
+
+Notice: fscanf(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 
 *** Done ***
index 3f8123a8f71dfe2f1f0aefc44a9c2a19d63fddd3..7cdb270ae3da410718645439d5068f0fd64f2669 100644 (file)
@@ -35,6 +35,8 @@ bool(false)
 
 Warning: fwrite() expects parameter 2 to be string, array given in %s on line %d
 bool(false)
+
+Notice: fwrite(): write of 4 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 int(4)
index ec3cdd756a8d5b398c411cb1dfa33295b7b931cc..706c765f8c102020e4b884c981efc2c8cf48357d 100644 (file)
@@ -78,16 +78,20 @@ foreach($file_content_types as $file_content_type) {
 
 echo "Done\n";
 ?>
---EXPECT--
+--EXPECTF--
 *** Testing fwrite() various  operations ***
 
 -- Testing fwrite() with file having content of type numeric --
 -- Opening file in r --
 int(0)
+
+Notice: fwrite(): write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 int(2)
+
+Notice: fwrite(): write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(2)
 bool(false)
@@ -96,10 +100,14 @@ int(1024)
 string(32) "950b7457d1deb6332f2fc5d42f3129d6"
 -- Opening file in rb --
 int(0)
+
+Notice: fwrite(): write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 int(2)
+
+Notice: fwrite(): write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(2)
 bool(false)
@@ -108,10 +116,14 @@ int(1024)
 string(32) "950b7457d1deb6332f2fc5d42f3129d6"
 -- Opening file in rt --
 int(0)
+
+Notice: fwrite(): write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 int(2)
+
+Notice: fwrite(): write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(2)
 bool(false)
@@ -122,10 +134,14 @@ string(32) "950b7457d1deb6332f2fc5d42f3129d6"
 -- Testing fwrite() with file having content of type text --
 -- Opening file in r --
 int(0)
+
+Notice: fwrite(): write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 int(2)
+
+Notice: fwrite(): write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(2)
 bool(false)
@@ -134,10 +150,14 @@ int(1024)
 string(32) "e486000c4c8452774f746a27658d87fa"
 -- Opening file in rb --
 int(0)
+
+Notice: fwrite(): write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 int(2)
+
+Notice: fwrite(): write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(2)
 bool(false)
@@ -146,10 +166,14 @@ int(1024)
 string(32) "e486000c4c8452774f746a27658d87fa"
 -- Opening file in rt --
 int(0)
+
+Notice: fwrite(): write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 int(2)
+
+Notice: fwrite(): write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(2)
 bool(false)
@@ -160,10 +184,14 @@ string(32) "e486000c4c8452774f746a27658d87fa"
 -- Testing fwrite() with file having content of type text_with_new_line --
 -- Opening file in r --
 int(0)
+
+Notice: fwrite(): write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 int(2)
+
+Notice: fwrite(): write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(2)
 bool(false)
@@ -172,10 +200,14 @@ int(1024)
 string(32) "b09c8026a64a88d36d4c2f17983964bb"
 -- Opening file in rb --
 int(0)
+
+Notice: fwrite(): write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 int(2)
+
+Notice: fwrite(): write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(2)
 bool(false)
@@ -184,10 +216,14 @@ int(1024)
 string(32) "b09c8026a64a88d36d4c2f17983964bb"
 -- Opening file in rt --
 int(0)
+
+Notice: fwrite(): write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 int(2)
+
+Notice: fwrite(): write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(2)
 bool(false)
@@ -198,10 +234,14 @@ string(32) "b09c8026a64a88d36d4c2f17983964bb"
 -- Testing fwrite() with file having content of type alphanumeric --
 -- Opening file in r --
 int(0)
+
+Notice: fwrite(): write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 int(2)
+
+Notice: fwrite(): write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(2)
 bool(false)
@@ -210,10 +250,14 @@ int(1024)
 string(32) "3fabd48d8eaa65c14e0d93d6880c560c"
 -- Opening file in rb --
 int(0)
+
+Notice: fwrite(): write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 int(2)
+
+Notice: fwrite(): write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(2)
 bool(false)
@@ -222,10 +266,14 @@ int(1024)
 string(32) "3fabd48d8eaa65c14e0d93d6880c560c"
 -- Opening file in rt --
 int(0)
+
+Notice: fwrite(): write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 int(2)
+
+Notice: fwrite(): write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(2)
 bool(false)
index c141aa588017dc11c0c651e31a575ef3d1b33d14..20bde9b71a288bc4689852e06087809af9184c0a 100644 (file)
@@ -70,16 +70,20 @@ foreach($file_content_types as $file_content_type) {
 
 echo "Done\n";
 ?>
---EXPECT--
+--EXPECTF--
 *** Testing fwrite() various  operations ***
 
 -- Testing fwrite() with file having content of type numeric --
 -- Opening file in r --
 int(0)
+
+Notice: fwrite(): write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 int(2)
+
+Notice: fwrite(): write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(2)
 bool(false)
@@ -88,10 +92,14 @@ int(1024)
 string(32) "950b7457d1deb6332f2fc5d42f3129d6"
 -- Opening file in rb --
 int(0)
+
+Notice: fwrite(): write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 int(2)
+
+Notice: fwrite(): write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(2)
 bool(false)
@@ -100,10 +108,14 @@ int(1024)
 string(32) "950b7457d1deb6332f2fc5d42f3129d6"
 -- Opening file in rt --
 int(0)
+
+Notice: fwrite(): write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 int(2)
+
+Notice: fwrite(): write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(2)
 bool(false)
@@ -114,10 +126,14 @@ string(32) "950b7457d1deb6332f2fc5d42f3129d6"
 -- Testing fwrite() with file having content of type text --
 -- Opening file in r --
 int(0)
+
+Notice: fwrite(): write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 int(2)
+
+Notice: fwrite(): write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(2)
 bool(false)
@@ -126,10 +142,14 @@ int(1024)
 string(32) "e486000c4c8452774f746a27658d87fa"
 -- Opening file in rb --
 int(0)
+
+Notice: fwrite(): write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 int(2)
+
+Notice: fwrite(): write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(2)
 bool(false)
@@ -138,10 +158,14 @@ int(1024)
 string(32) "e486000c4c8452774f746a27658d87fa"
 -- Opening file in rt --
 int(0)
+
+Notice: fwrite(): write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 int(2)
+
+Notice: fwrite(): write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(2)
 bool(false)
@@ -152,10 +176,14 @@ string(32) "e486000c4c8452774f746a27658d87fa"
 -- Testing fwrite() with file having content of type text_with_new_line --
 -- Opening file in r --
 int(0)
+
+Notice: fwrite(): write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 int(2)
+
+Notice: fwrite(): write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(2)
 bool(false)
@@ -164,10 +192,14 @@ int(1024)
 string(32) "b09c8026a64a88d36d4c2f17983964bb"
 -- Opening file in rb --
 int(0)
+
+Notice: fwrite(): write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 int(2)
+
+Notice: fwrite(): write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(2)
 bool(false)
@@ -176,10 +208,14 @@ int(1024)
 string(32) "b09c8026a64a88d36d4c2f17983964bb"
 -- Opening file in rt --
 int(0)
+
+Notice: fwrite(): write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 int(2)
+
+Notice: fwrite(): write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(2)
 bool(false)
@@ -190,10 +226,14 @@ string(32) "b09c8026a64a88d36d4c2f17983964bb"
 -- Testing fwrite() with file having content of type alphanumeric --
 -- Opening file in r --
 int(0)
+
+Notice: fwrite(): write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 int(2)
+
+Notice: fwrite(): write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(2)
 bool(false)
@@ -202,10 +242,14 @@ int(1024)
 string(32) "3fabd48d8eaa65c14e0d93d6880c560c"
 -- Opening file in rb --
 int(0)
+
+Notice: fwrite(): write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 int(2)
+
+Notice: fwrite(): write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(2)
 bool(false)
@@ -214,10 +258,14 @@ int(1024)
 string(32) "3fabd48d8eaa65c14e0d93d6880c560c"
 -- Opening file in rt --
 int(0)
+
+Notice: fwrite(): write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(0)
 bool(false)
 int(2)
+
+Notice: fwrite(): write of 1024 bytes failed with errno=9 Bad file descriptor in %s on line %d
 bool(false)
 int(2)
 bool(false)
index 8c853023b158efd5ffafc957ec44a98faf869981..578e462bd9e8d2ec518c4e05613ce3f3a7816a24 100644 (file)
@@ -36,7 +36,9 @@ fclose($fp);
 readfile($file);
 unlink($file);
 ?>
---EXPECT--
+--EXPECTF--
 fffffffffff
+
+Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 hello
 THANK YOU
index f220e9afba9a6745d3a29b9520bb1a1070de80d8..0f58d19647382b1da41935208477b6c80ae736f6 100644 (file)
@@ -31,8 +31,13 @@ fclose($stream);
 unlink($filename);
 ?>
 ===DONE===
---EXPECT--
+--EXPECTF--
+Notice: stream_get_contents(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 string(0) ""
+
+Notice: stream_get_contents(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 string(0) ""
+
+Notice: stream_get_contents(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
 string(0) ""
 ===DONE===
index 3c6a9afb28cd4fa68a6647937e4568f3be3ef531..bce58f7df2b7e6f910b0b8f8da23ebd73cc16bd0 100644 (file)
@@ -351,6 +351,16 @@ static ssize_t php_stdiop_write(php_stream *stream, const char *buf, size_t coun
 #else
                ssize_t bytes_written = write(data->fd, buf, count);
 #endif
+               if (bytes_written < 0) {
+                       if (errno == EWOULDBLOCK || errno == EAGAIN) {
+                               return 0;
+                       }
+                       if (errno == EINTR) {
+                               /* TODO: Should this be treated as a proper error or not? */
+                               return bytes_written;
+                       }
+                       php_error_docref(NULL, E_NOTICE, "write of %zu bytes failed with errno=%d %s", count, errno, strerror(errno));
+               }
                return bytes_written;
        } else {
 
@@ -415,11 +425,14 @@ static ssize_t php_stdiop_read(php_stream *stream, char *buf, size_t count)
                                /* Not an error. */
                                ret = 0;
                        } else if (errno == EINTR) {
-                               /* An error, but not EOF */
-                       } else if (errno == EBADF) {
-                               /* TODO: Remove this special-case? */
+                               /* TODO: Should this be treated as a proper error or not? */
                        } else {
-                               stream->eof = 1;
+                               php_error_docref(NULL, E_NOTICE, "read of %zu bytes failed with errno=%d %s", count, errno, strerror(errno));
+
+                               /* TODO: Remove this special-case? */
+                               if (errno != EBADF) {
+                                       stream->eof = 1;
+                               }
                        }
                } else if (ret == 0) {
                        stream->eof = 1;
index 296bf9600e55ce76fdee2f0030c3d4727c0886cd..45bdc828b970e5e02598dea26bbec7b42f1fc16e 100644 (file)
@@ -1240,7 +1240,9 @@ PHPAPI ssize_t _php_stream_write(php_stream *stream, const char *buf, size_t cou
                return 0;
        }
 
-       if (buf == NULL || stream->ops->write == NULL) {
+       ZEND_ASSERT(buf != NULL);
+       if (stream->ops->write == NULL) {
+               php_error_docref(NULL, E_NOTICE, "Stream is not writable");
                return (ssize_t) -1;
        }
 
index 190ebfb86a6ac5a4fcc120c58c0928e40bf567d0..25a4843c073651ed5ebe332a4949926094685ced 100755 (executable)
@@ -53,6 +53,7 @@ function normalizeOutput(string $out): string {
     $out = preg_replace('/in \/.+:\d+$/m', 'in %s:%d', $out);
     $out = preg_replace('/^#(\d+) \/.+\(\d+\):/m', '#$1 %s(%d):', $out);
     $out = preg_replace('/Resource id #\d+/', 'Resource id #%d', $out);
+    $out = preg_replace('/resource\(\d+\) of type/', 'resource(%d) of type', $out);
     $out = preg_replace('/string\(\d+\) "([^"]*%d)/', 'string(%d) "$1', $out);
     return $out;
 }