Bug #80564 [NEW]: ReflectionProperty::__toString() converts property value to string

From: Date: Wed, 30 Dec 2020 04:43:40 +0000
Subject: Bug #80564 [NEW]: ReflectionProperty::__toString() converts property value to string
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-231306@lists.php.net to get a copy of this message
From: david at grudl dot com Operating system: PHP version: 8.0.1RC1 Package: Reflection related Bug Type: Bug Bug description:ReflectionProperty::__toString() converts property value to string Description: ------------ ReflectionProperty::__toString() convert also value of property to string and it may fail, see https://3v4l.org/rfoGl Test script: --------------- <?php class A { public static $x; } A::$x = new stdClass; $rp = new ReflectionProperty('A', 'x'); echo $rp; Expected result: ---------------- Property [ public static $x ] Actual result: -------------- Fatal error: Uncaught Error: Object of class stdClass could not be converted to string -- Edit bug report at https://bugs.php.net/bug.php?id=80564&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=80564&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=80564&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=80564&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=80564&r=needscript Try newer version: https://bugs.php.net/fix.php?id=80564&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=80564&r=support Expected behavior: https://bugs.php.net/fix.php?id=80564&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=80564&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=80564&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=80564&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=80564&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=80564&r=dst IIS Stability: https://bugs.php.net/fix.php?id=80564&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=80564&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=80564&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=80564&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=80564&r=mysqlcfg

« previous php.bugs (#231306) next »