php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #80824 Illegal offset type
Submitted: 2021-03-03 07:58 UTC Modified: 2021-03-03 08:03 UTC
From: ffilipe0 at hotmail dot com Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 8.0.2 OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: ffilipe0 at hotmail dot com
New email:
PHP Version: OS:

 

 [2021-03-03 07:58 UTC] ffilipe0 at hotmail dot com
Description:
------------
PHP 8.0.2 (CLI) is handling illegal offset type has a fatal error.
PHP Fatal error:  Uncaught TypeError: Illegal offset type

Test script:
---------------
$newUser = new User($socket);
$this->users[$socket] = $newUser;


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-03-03 08:03 UTC] requinix@php.net
-Status: Open +Status: Not a bug
 [2021-03-03 08:03 UTC] requinix@php.net
Yes, that's right.

https://www.php.net/manual/en/migration80.incompatible.php
> A number of warnings have been converted into Error exceptions:
>
> * Attempting to use an invalid type (array or object) as an array key or string
>   offset.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jan 15 11:01:31 2025 UTC