1
0
mirror of https://github.com/php/php-src.git synced 2026-04-18 13:31:27 +02:00
Files
archived-php-src/Zend/tests/nullsafe_operator/029.phpt
Nikita Popov ee7eecf321 Fix leak with nullsafe operator with constant LHS
Followup to 5303bcdd32. We need to
perform the addref after emitting the opline, because that might
intern the string.

Fixes oss-fuzz #24479.
2020-07-29 15:51:47 +02:00

12 lines
240 B
PHP

--TEST--
Refcount of constant LHS with nullsafe operator
--FILE--
<?php
['']?->a;
__DIR__?->a;
?>
--EXPECTF--
Warning: Attempt to read property "a" on array in %s on line %d
Warning: Attempt to read property "a" on string in %s on line %d