Bug #75420 [Opn->Ver]: Crash when modifing property name in __isset for BP_VAR_IS

From: Date: Tue, 24 Oct 2017 01:31:33 +0000
Subject: Bug #75420 [Opn->Ver]: Crash when modifing property name in __isset for BP_VAR_IS
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-211866@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=75420&edit=1 ID: 75420 Updated by: kalle@php.net Reported by: nikic@php.net Summary: Crash when modifing property name in __isset for BP_VAR_IS -Status: Open +Status: Verified Type: Bug Package: Scripting Engine problem PHP Version: 7.0.24 Block user comment: N Private report: N Previous Comments: ------------------------------------------------------------------------ [2017-10-23 20:00:06] nikic@php.net Description: ------------ $name is changed from string to int in the __isset() call, so that the subsequent __get() call crashes. Test script: --------------- <?php class Test { public function __isset($x) { $GLOBALS['name'] = 24; return true; } public function __get($x) { var_dump($x); return 42; } } $obj = new Test; $name = "foo"; var_dump($obj->$name ?? 12); ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=75420&edit=1

« previous php.bugs (#211866) next »