-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix assumption about property guard hash value
The "member" string here does not necessarily have a pre-calculated hash value. In particular this is not the case if the class has no properties. Fixes oss-fuzz #25546.
- Loading branch information
Showing
2 changed files
with
18 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--TEST-- | ||
Test property guard hash value assumption | ||
--FILE-- | ||
<?php | ||
class Test { | ||
function __get($var) { | ||
return $this->{$var.''}; | ||
} | ||
} | ||
|
||
$test = new Test; | ||
var_dump($test->x); | ||
?> | ||
--EXPECTF-- | ||
Notice: Undefined property: Test::$x in %s on line %d | ||
NULL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters