Skip to content

Commit 987ee94

Browse files
committed
GH-14930: Add test with long filename from custom stream wrapper
1 parent af2e539 commit 987ee94

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
--TEST--
2+
GH-14930: Custom stream wrapper dir_readdir output truncated to 255 characters in PHP 8.3
3+
--FILE--
4+
<?php
5+
6+
class DummyWrapper
7+
{
8+
public $context;
9+
10+
public function dir_opendir($url, $options)
11+
{
12+
return true;
13+
}
14+
15+
public function dir_readdir()
16+
{
17+
return 'very-long-filename-ieNoquiaC6ijeiy9beejaiphoriejo2cheehooGou8uhoh7eh0gefahyuQuohd7eec9auso9eeFah2Maedohsemi1eetoo5fo5biePh5eephai7SiuguipouLeemequ2oope9aigoQu5efak2aLeri9ithaiJ9eew3dianaiHoo1aexaighiitee6geghiequ5nohhiikahwee8ohk2Soip2Aikeithohdeitiedeiku7DiTh2eep3deitiedeiku7DiTh2ee.txt';
18+
}
19+
}
20+
21+
stream_wrapper_register('dummy', DummyWrapper::class);
22+
23+
$dh = opendir('dummy://', stream_context_create());
24+
var_dump(readdir($dh));
25+
?>
26+
--EXPECT--
27+
string(288) "very-long-filename-ieNoquiaC6ijeiy9beejaiphoriejo2cheehooGou8uhoh7eh0gefahyuQuohd7eec9auso9eeFah2Maedohsemi1eetoo5fo5biePh5eephai7SiuguipouLeemequ2oope9aigoQu5efak2aLeri9ithaiJ9eew3dianaiHoo1aexaighiitee6geghiequ5nohhiikahwee8ohk2Soip2Aikeithohdeitiedeiku7DiTh2eep3deitiedeiku7DiTh2ee.txt"

0 commit comments

Comments
 (0)