Re: [VOTE] Undefined Property Error Promotion
| From: | Mark Randall | Date: | Fri, 22 Apr 2022 17:12:51 +0000 |
| Subject: | Re: [VOTE] Undefined Property Error Promotion | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-117572@lists.php.net to get a copy of this message | ||
On 22/04/2022 14:42, Rowan Tommins wrote:
As with your previous RFC, I approve of this in principle, but am frustrated how little time has been spent considering the edge cases, such as the ones I mentioned here: https://externals.io/message/117487#117487Accessing an unset property, which currently emits a warning, will instead throw an Error. If a property has already been written to via some mechanism, then the property exists and this RFC does not apply, no warning or error should be expected. It's a different responsibility to handle the guards against writing to one which has not been defined (AllowDynamicProperties RFC). Re: Case 4, an untyped property without its own initializer is effectively defaulted to null.