Skip to content

Commit 0c564dd

Browse files
committed
Throw notice for plain wrapper fread/fwrite errors
1 parent 6d6d954 commit 0c564dd

30 files changed

+878
-142
lines changed

ext/fileinfo/tests/bug61964-mb.phpt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,14 @@ rmdir($dir);
4646
===DONE===
4747
--EXPECTF--
4848
bool(false)
49+
50+
Notice: finfo_open(): read of 8192 bytes failed with errno=21 Is a directory in %sbug61964-mb.php on line %d
4951
resource(%d) of type (file_info)
5052
resource(%d) of type (file_info)
5153
bool(false)
5254

55+
Notice: finfo_open(): read of 8192 bytes failed with errno=21 Is a directory in %sbug61964-mb.php on line %d
56+
5357
Notice: finfo_open(): Warning: offset `string' invalid in %sbug61964-mb.php on line %d
5458

5559
Notice: finfo_open(): Warning: offset ` Core' invalid in %sbug61964-mb.php on line %d

ext/fileinfo/tests/bug61964.phpt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,14 @@ rmdir($dir);
4646
===DONE===
4747
--EXPECTF--
4848
bool(false)
49+
50+
Notice: finfo_open(): read of 8192 bytes failed with errno=21 Is a directory in %sbug61964.php on line %d
4951
resource(%d) of type (file_info)
5052
resource(%d) of type (file_info)
5153
bool(false)
5254

55+
Notice: finfo_open(): read of 8192 bytes failed with errno=21 Is a directory in %sbug61964.php on line %d
56+
5357
Notice: finfo_open(): Warning: offset `string' invalid in %sbug61964.php on line %d
5458

5559
Notice: finfo_open(): Warning: offset ` Core' invalid in %sbug61964.php on line %d

ext/standard/tests/file/007_variation1.phpt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ int(0)
4848
string(20) "line
4949
line of text
5050
li"
51+
52+
Notice: fwrite(): write of 37 bytes failed with errno=9 Bad file descriptor in %s on line %d
5153
bool(false)
5254
bool(true)
5355
string(7) "Unknown"

ext/standard/tests/file/007_variation11.phpt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ string(6) "stream"
6666
int(0)
6767
int(37)
6868
int(37)
69+
70+
Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
6971
bool(false)
7072
int(0)
7173
bool(true)

ext/standard/tests/file/007_variation13.phpt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ unlink(__DIR__."/007_variation13.tmp");
5656
resource(%d) of type (stream)
5757
string(6) "stream"
5858
int(37)
59+
60+
Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
5961
bool(false)
6062
int(0)
6163
bool(true)

ext/standard/tests/file/007_variation15.phpt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ string(6) "stream"
4949
int(0)
5050
int(37)
5151
int(37)
52+
53+
Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
5254
bool(false)
5355
int(0)
5456
bool(true)

ext/standard/tests/file/007_variation17.phpt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ int(0)
4848
string(20) "line
4949
line of text
5050
li"
51+
52+
Notice: fwrite(): write of 37 bytes failed with errno=9 Bad file descriptor in %s on line %d
5153
bool(false)
5254
bool(true)
5355
string(7) "Unknown"

ext/standard/tests/file/007_variation19.phpt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ string(6) "stream"
6161
int(0)
6262
int(37)
6363
int(37)
64+
65+
Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
6466
bool(false)
6567
int(0)
6668
bool(true)

ext/standard/tests/file/007_variation21.phpt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ unlink(__DIR__."/007_variation21.tmp");
5151
resource(%d) of type (stream)
5252
string(6) "stream"
5353
int(37)
54+
55+
Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
5456
bool(false)
5557
int(0)
5658
bool(true)

ext/standard/tests/file/007_variation23.phpt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ string(6) "stream"
4949
int(0)
5050
int(37)
5151
int(37)
52+
53+
Notice: fread(): read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d
5254
bool(false)
5355
int(0)
5456
bool(true)

0 commit comments

Comments
 (0)