Bug #74657 [Opn->Csd]: Undefined constants in array properties result in broken properties
| From: | laruence@php.net | Date: | Sat, 27 May 2017 04:09:57 +0000 |
| Subject: | Bug #74657 [Opn->Csd]: Undefined constants in array properties result in broken properties | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-209275@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=74657&edit=1
ID: 74657
Updated by: laruence@php.net
Reported by: kelunik@php.net
Summary: Undefined constants in array properties result in
broken properties
-Status: Open
+Status: Closed
Type: Bug
Package: Scripting Engine problem
PHP Version: 7.0.19
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of laruence@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=5269c4cacbc1372341d2091337d87fa3b0181490
Log: Fixed bug #74657 (Undefined constants in array properties result in broken properties)
Previous Comments:
------------------------------------------------------------------------
[2017-05-26 11:01:12] kelunik@php.net
Description:
------------
See https://3v4l.org/HgKbi. On the second construction
there's not another error thrown.
Test script:
---------------
<?php
interface I {
}
class C {
const FOO = I::FOO;
public $options = [self::FOO => "bar"];
}
try {
var_dump((new C)->options);
} catch (Throwable $e) {}
var_dump((new C)->options);
Expected result:
----------------
The second construction should throw an error like the first one.
Actual result:
--------------
The second construction went fine and
$this->options is UNKNOWN:0.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=74657&edit=1