note 124323 added to arrayaccess.offsetexists
| From: | MartinQ@php.net | Date: | Tue, 22 Oct 2019 21:24:20 +0000 |
| Subject: | note 124323 added to arrayaccess.offsetexists | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-212749@lists.php.net to get a copy of this message | ||
It seems that in PHP 7, if this method returns FALSE then offsetGet() will return NULL (in PHP 5,
offsetGet() didn't first check what value offsetExists() returned). So if your code suddenly
stops working when you upgrade to PHP 7 make sure that offsetExists() returns a sensible value!
----
Server IP: 208.43.231.9
Probable Submitter: 185.85.3.195 (proxied: 95.90.38.146)
----
Manual Page -- http://php.net/manual/en/arrayaccess.offsetexists.php
Edit -- https://master.php.net/note/edit/124323
Del: integrated -- https://master.php.net/note/delete/124323/integrated
Del: useless -- https://master.php.net/note/delete/124323/useless
Del: bad code -- https://master.php.net/note/delete/124323/bad+code
Del: spam -- https://master.php.net/note/delete/124323/spam
Del: non-english -- https://master.php.net/note/delete/124323/non-english
Del: in docs -- https://master.php.net/note/delete/124323/in+docs
Del: other reasons-- https://master.php.net/note/delete/124323
Reject -- https://master.php.net/note/reject/124323
Search -- https://master.php.net/manage/user-notes.php