Skip to content

Commit e8f28df

Browse files
committed
add test
1 parent 3a949cf commit e8f28df

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

ext/zlib/tests/gh22142.phpt

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
--TEST--
2+
GH-22142 (Assertion failure in zendi_try_get_long() on IS_UNDEF)
3+
--EXTENSIONS--
4+
zlib
5+
--FILE--
6+
<?php
7+
8+
class Options {
9+
public int $level;
10+
}
11+
12+
try {
13+
deflate_init(ZLIB_ENCODING_DEFLATE, new Options());
14+
} catch (TypeError $e) {
15+
echo $e->getMessage(), PHP_EOL;
16+
}
17+
18+
?>
19+
--EXPECT--
20+
deflate_init(): Argument #2 ($options) the value for option "level" must be of type int, null given

0 commit comments

Comments
 (0)