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
 [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

Add a Patch

Pull Requests

Add a Pull Request

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-2022 The PHP Group
All rights reserved.
Last updated: Sat May 28 17:05:46 2022 UTC