|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2020-10-08 12:51 UTC] sjon@php.net
 
-Status: Open
+Status: Feedback
  [2020-10-08 12:51 UTC] sjon@php.net
  [2020-10-09 11:04 UTC] rico dot unbehaun at gmail dot com
 
-Status: Feedback
+Status: Open
  [2020-10-09 11:04 UTC] rico dot unbehaun at gmail dot com
  [2020-10-12 11:09 UTC] nikic@php.net
 
-Status: Open
+Status: Feedback
  [2020-10-12 11:09 UTC] nikic@php.net
  [2020-10-25 04:22 UTC] php-bugs at lists dot php dot net
  [2020-11-01 07:22 UTC] rico dot unbehaun at gmail dot com
 
-Status: No Feedback
+Status: Closed
  [2020-11-01 07:22 UTC] rico dot unbehaun at gmail dot com
  [2020-11-01 09:28 UTC] requinix@php.net
 
-Status: Closed
+Status: Not a bug
 | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 05:00:02 2025 UTC | 
Description: ------------ If you pass a variable or an array to a function by reference and check in the function whether the variable or the index exists, you get the following error message: Trying to access array offset on value of type ... This worked fine until PHP 7.4.x. See example Test script: --------------- On PHP 7.4.x the following works fine: define('VOID', INF); function ifsetter(&$mElement, $mDefault = '') { if (!isset($mElement) OR $mElement === VOID){ $mElement = $mDefault; } return $mElement; } $t = []; echo ifsetter($t['aaa'], 'hello'); // return 'hello' and set $t['aaa'] = 'hello'; On PHP 8 I get the warning: Trying to access array offset on value of type ...