Bug #81163 [NEW]: indirect in __sleep
| From: | krakjoe@php.net | Date: | Fri, 18 Jun 2021 05:10:52 +0000 |
| Subject: | Bug #81163 [NEW]: indirect in __sleep | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-234473@lists.php.net to get a copy of this message | ||
From: krakjoe
Operating system:
PHP version: Irrelevant
Package: Reproducible crash
Bug Type: Bug
Bug description:indirect in __sleep
Description:
------------
indirect vars returned in properties for __sleep not handled correctly
Test script:
---------------
<?php
class foo
{
private $private = 'private';
}
class bar extends foo
{
public function __sleep()
{
return (new bar());
}
}
var_dump(serialize(new bar()));
?>
Expected result:
----------------
Warning: serialize(): "private" returned as member variable from
__sleep() but does not exist in /opt/src/php-src/sec.php on line 15
string(14) "O:3:"bar":0:{}"
Actual result:
--------------
assert fail
--
Edit bug report at https://bugs.php.net/bug.php?id=81163&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=81163&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=81163&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=81163&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=81163&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=81163&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=81163&r=support
Expected behavior: https://bugs.php.net/fix.php?id=81163&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=81163&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=81163&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=81163&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=81163&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=81163&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=81163&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=81163&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=81163&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=81163&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=81163&r=mysqlcfg