[php-src] Issue #10836: Access to undefined nested index leads to error 503
| From: | NoxArt | Date: | Sun, 12 Mar 2023 16:00:31 +0000 |
| Subject: | [php-src] Issue #10836: Access to undefined nested index leads to error 503 | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-243897@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/10836
Author: NoxArt
### Description
The following code:
```php
<?php
$myArray = [];
$firstIndex = "AA-123123-BB";
$secondIndex = 'M';
$value = $myArray[$firstIndex][$secondIndex];
```
Resulted in this output:
```
Server error 503
```
But I expected this output instead:
```
Warning: Undefined array key
```
### PHP Version
PHP 8.1.16
### Operating System
_No response_