mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Because of the "H" modifier in ZPP, there are two bugs: 1) The stub is wrong and will cause a crash in debug mode. 2) Non-dynamic properties are not read correctly because they are not DEINDIRECTed. Closes GH-17750.
21 lines
376 B
PHP
21 lines
376 B
PHP
--TEST--
|
|
GH-17745 (zlib extension incorrectly handles object arguments)
|
|
--EXTENSIONS--
|
|
zlib
|
|
--FILE--
|
|
<?php
|
|
$obj = new stdClass;
|
|
$obj->level = 3;
|
|
var_dump(deflate_init(ZLIB_ENCODING_RAW, $obj));
|
|
|
|
class Options {
|
|
public int $level = 3;
|
|
}
|
|
var_dump(deflate_init(ZLIB_ENCODING_RAW, new Options));
|
|
?>
|
|
--EXPECT--
|
|
object(DeflateContext)#2 (0) {
|
|
}
|
|
object(DeflateContext)#3 (0) {
|
|
}
|