Bug #79193 [Opn]: 7.3 -> 7.4 broke `self::$field =& $field`, now `isset( $field['name'] )` false
| From: | nikic@php.net | Date: | Thu, 30 Jan 2020 13:49:56 +0000 |
| Subject: | Bug #79193 [Opn]: 7.3 -> 7.4 broke `self::$field =& $field`, now `isset( $field['name'] )` false | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-225252@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=79193&edit=1
ID: 79193
Updated by: nikic@php.net
Reported by: leho at conversionready dot com
Summary: 7.3 -> 7.4 broke
self::$field =& $field, now
isset( $field['name'] ) false
Status: Open
Type: Bug
Package: opcache
Operating System: Linux
PHP Version: 7.4.2
-Assigned To:
+Assigned To: nikic
Block user comment: N
Private report: N
New Comment:
Looks like a type inference bug.
Previous Comments:
------------------------------------------------------------------------
[2020-01-29 22:04:19] requinix@php.net
Yup.
------------------------------------------------------------------------
[2020-01-29 21:44:43] leho at conversionready dot com
Good call! opcache.enable = 0 also makes this problem disappear.
Time to reassign Package -> Opcache?
------------------------------------------------------------------------
[2020-01-29 21:33:59] requinix@php.net
Any difference if you disable opcache?
------------------------------------------------------------------------
[2020-01-29 20:45:14] leho at conversionready dot com
Interestingly, isset( self::$field['name'] ); // true
------------------------------------------------------------------------
[2020-01-29 20:38:03] leho at conversionready dot com
Description:
------------
This seems like some kind of an engine regression from 7.3. Staging system running 7.4.2 breaks,
live system 7.3.13 works.
Code https://github.com/opencredit/badgeos/blob/1.4.11/includes/cmb/init.php#L380
Relevant code below:
```
/**
* $field $field array (4)
*
* âname => string (18) "Upload Badge Image"
*
* ââ§desc => string (903) "<p>To set an image use the
<strong>Achievement Image</strong> metabox to the...
*
* âid => string (39) "_badgeos_upload_badge_image_achievement"
*
* âtype => string (9) "text_only"
*/
...
self::$field =& $field;
isset( $field['name'] ); // false. How??
```
Behavior changed when I loaded the same screen on another FPM pool that was running Xdebug -
everything passed error free.
Behavior also changes if I replace reference with regular assignment, like self::$field =
$field - this particular problem goes away, but other (probably unrelated) pieces in the
chain now cough.
Your thoughts?
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=79193&edit=1