[php-src] Issue #9388: Read of unset typed property /w magic __get throws wrong message
| From: | mvorisek | Date: | Sat, 20 Aug 2022 14:25:04 +0000 |
| Subject: | [php-src] Issue #9388: Read of unset typed property /w magic __get throws wrong message | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-242268@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/9388
Author: mvorisek
### Description
demo: https://3v4l.org/P7jXD (/wo return at all)
demo 2: https://3v4l.org/6RlfS (/w incompatible return type)
demo 3: https://3v4l.org/O9prE (/w type that can be implicitly
casted, but not when using strict types)
The error message
Cannot assign null to property Cl::$name of type string is wrong
& hard to understand, as there is no assignment anywhere.
demo 4: https://3v4l.org/PaD9b (/w same return type as typed
property, nothing wrong here, but it shows nothing is assigned as the error message claims)
### PHP Version
8.0+
### Operating System
any