We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7b23cd5 commit 9b0fa9cCopy full SHA for 9b0fa9c
ext/fileinfo/tests/gh18267.phpt
@@ -0,0 +1,15 @@
1
+--TEST--
2
+GH-18267 finfo_file() assertion trigger on NULL stream context
3
+--EXTENSIONS--
4
+fileinfo
5
+--FILE--
6
+<?php
7
+$cls = new finfo();
8
+$f = fopen("test", "r");
9
+try {
10
+ $cls->file("test",FILEINFO_NONE, $f);
11
+} catch (\TypeError $e) {
12
+ echo $e->getMessage();
13
+}
14
+--EXPECT--
15
+finfo::file(): supplied resource is not a valid Stream-Context resource
0 commit comments