Error map

Array offset on null Warning: Trying to access array offset on value of type null

PHP · layer 4, Application & API

Open the full error page →

Centre: this error. First ring: errors it is linked with (10). Outer ring: what those are linked with. Colours show the layer of a request each error belongs to. Click any dot to re-centre the map on it; hover to follow its connections. The centre dot opens the error page.

Array offset on null — Warning: Trying to access array offset on value of type null (PHP)Array offse…Undefined array key — Warning: Undefined array key / Undefined index (PHP)Undefined array keyUndefined variable — Warning: Undefined variable $x (PHP)Undefined variablereading length — TypeError: Cannot read properties of undefined (reading 'length') (JavaScript)reading lengthObject.keys null — TypeError: Cannot convert undefined or null to object (JavaScript)Object.keys nullreduce empty — TypeError: Reduce of empty array with no initial value (JavaScript)reduce emptyArrayIndexOutOfBoundsException — java.lang.ArrayIndexOutOfBoundsException: Index 5 out of bounds for length 5 (Java)ArrayIndexOutOfBoun…TypeError not iterable — TypeError: x is not iterable (JavaScript)TypeError not itera…invalid array length — RangeError: Invalid array length (JavaScript)invalid array lengthUndefined property — Warning: Undefined property: Class::$prop (PHP)Undefined propertyUndefined array key — Laravel/PHP 8: ErrorException: Undefined array key "name" (PHP 8) / Undefined index: name (PHP 7) (Laravel)Undefined array keyTypeError — TypeError: Cannot read properties of undefined (reading 'x') (JavaScript)TypeErrorHeaders already sent — Warning: Cannot modify header information - headers already sent (PHP)Headers already sentKeyError — KeyError: 'x' (Python)KeyErrorTypeError set undefined — TypeError: Cannot set properties of undefined (setting 'x') (JavaScript)TypeError set undef…Array to string conversion — Warning: Array to string conversion (PHP)Array to string con…addEventListener on null — TypeError: Cannot read properties of null (reading 'addEventListener') (JavaScript)addEventListener on…useContext undefined — TypeError: Cannot destructure property 'user' of 'useContext(...)' as it is undefined. (React)useContext undefinedFailed to execute on 'Node' — Console: Uncaught TypeError: Failed to execute 'appendChild' on 'Node': parameter 1 is not of type 'Node' (Browser)Failed to execute o…read-only property — TypeError: Cannot assign to read only property 'x' of object (JavaScript)read-only propertyTS2353: Object literal may only specify known properties — TypeScript: error TS2353: Object literal may only specify known properties, and 'nmae' does not exist in type 'User' (TypeScript)TS2353: Object lite…TS2740: Type is missing the following properties — TypeScript: error TS2740: Type '{ name: string; }' is missing the following properties from type 'User': id, email (TypeScript)TS2740: Type is mis…AbortError — AbortError: The user aborted a request. / signal is aborted without reason (JavaScript)AbortErrorbody already used — TypeError: Failed to execute 'json' on 'Response': body stream already read (JavaScript)body already usedStringIndexOutOfBoundsException — java.lang.StringIndexOutOfBoundsException: begin 0, end 10, length 5 (Java)StringIndexOutOfBou…UnsupportedOperationException — java.lang.UnsupportedOperationException (List.of / Arrays.asList is immutable) (Java)UnsupportedOperatio…Stream closed — java.io.IOException: Stream closed (Java)Stream closedTS2532 / TS18048 — TS18048: 'x' is possibly 'undefined'. (TS2532: Object is possibly 'undefined'.) (Node.js)TS2532 / TS18048RuntimeError dict — RuntimeError: dictionary changed size during iteration (Python)RuntimeError dictAw, Snap! — Chrome: Aw, Snap! Something went wrong while displaying this webpage. Error code: STATUS_ACCESS_VIOLATION / SIGILL / Out of Memory (Browser)Aw, Snap!Undefined variable $x (Blade view) — Laravel: ErrorException: Undefined variable $posts (View: /resources/views/posts/index.blade.php) (Laravel)Undefined variable …Attempt to read property "x" on null — Laravel/PHP 8: ErrorException: Attempt to read property "name" on null (Laravel)Attempt to read pro…Laravel: Allowed memory size exhausted (request) — Laravel/PHP: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in vendor/laravel/framework (Laravel)Laravel: Allowed me…

Directly related (10)

Undefined array keyPHP

Warning: Undefined array key / Undefined index

Your code reads an array key that doesn’t exist — common with `$_GET`, `$_POST` and decoded JSON.

Undefined variablePHP

Warning: Undefined variable $x

PHP read a variable that was never assigned in the current scope.

reading lengthJavaScript

TypeError: Cannot read properties of undefined (reading 'length')

Code checked .length on something that is undefined — typically an array or string that hasn’t loaded.

Object.keys nullJavaScript

TypeError: Cannot convert undefined or null to object

Object.keys/entries/assign was called with undefined or null.

reduce emptyJavaScript

TypeError: Reduce of empty array with no initial value

Array.reduce() ran on an empty array without an initial value.

ArrayIndexOutOfBoundsExceptionJava

java.lang.ArrayIndexOutOfBoundsException: Index 5 out of bounds for length 5

Code accessed an array index outside 0 … length-1.

TypeError not iterableJavaScript

TypeError: x is not iterable

for…of, spread or destructuring was used on something that isn’t an array/iterable.

invalid array lengthJavaScript

RangeError: Invalid array length

An array was created or resized with a negative, fractional or enormous length.

Undefined propertyPHP

Warning: Undefined property: Class::$prop

Code read an object property that doesn’t exist on that object.

Undefined array keyLaravel

Laravel/PHP 8: ErrorException: Undefined array key "name" (PHP 8) / Undefined index: name (PHP 7)

Code read an array element whose key isn't present.

Two steps away (22)

TypeErrorJavaScript

TypeError: Cannot read properties of undefined (reading 'x')

You tried to access a property on a value that is `undefined` (or `null`) — usually data that hasn’t loaded yet or a wrong proper…

Headers already sentPHP

Warning: Cannot modify header information - headers already sent

You called `header()`, `setcookie()` or `session_start()` after output had already been sent to the browser.

KeyErrorPython

KeyError: 'x'

You accessed a dictionary key that doesn’t exist.

TypeError set undefinedJavaScript

TypeError: Cannot set properties of undefined (setting 'x')

Code assigned a property on a value that is undefined (or null).

Array to string conversionPHP

Warning: Array to string conversion

An array was used where a string is expected — echoing it, concatenating it, or passing it to a string function.

addEventListener on nullJavaScript

TypeError: Cannot read properties of null (reading 'addEventListener')

document.querySelector/getElementById returned null, so the element doesn’t exist when the script runs.

useContext undefinedReact

TypeError: Cannot destructure property 'user' of 'useContext(...)' as it is undefined.

A component read a context with no matching Provider above it.

Failed to execute on 'Node'Browser

Console: Uncaught TypeError: Failed to execute 'appendChild' on 'Node': parameter 1 is not of type 'Node'

A DOM method received something that is not a DOM node — `null`, `undefined`, a string, or a jQuery/React object instead of an el…

read-only propertyJavaScript

TypeError: Cannot assign to read only property 'x' of object

Code tried to modify a frozen object, a getter-only property, or immutable state.

TS2353: Object literal may only specify known propertiesTypeScript

TypeScript: error TS2353: Object literal may only specify known properties, and 'nmae' does not exist in type 'User'

An object literal has an extra (or misspelled) property not in the target type (excess property check).

TS2740: Type is missing the following propertiesTypeScript

TypeScript: error TS2740: Type '{ name: string; }' is missing the following properties from type 'User': id, email

An object doesn't provide all required properties of the target type.

AbortErrorJavaScript

AbortError: The user aborted a request. / signal is aborted without reason

A fetch was cancelled through an AbortController (or the browser cancelled it).

body already usedJavaScript

TypeError: Failed to execute 'json' on 'Response': body stream already read

A fetch Response body was consumed twice (e.g. calling .text() then .json()).

StringIndexOutOfBoundsExceptionJava

java.lang.StringIndexOutOfBoundsException: begin 0, end 10, length 5

substring()/charAt() used an index outside the string.

UnsupportedOperationExceptionJava

java.lang.UnsupportedOperationException (List.of / Arrays.asList is immutable)

Code tried to modify an immutable or fixed-size collection.

Stream closedJava

java.io.IOException: Stream closed

Code read or wrote a stream after it was closed — often by a try-with-resources block or a wrapper closing the underlying stream.

TS2532 / TS18048Node.js

TS18048: 'x' is possibly 'undefined'. (TS2532: Object is possibly 'undefined'.)

TypeScript requires you to handle the case where a value may be undefined before using it.

RuntimeError dictPython

RuntimeError: dictionary changed size during iteration

A dict (or set) was modified while being looped over.

Aw, Snap!Browser

Chrome: Aw, Snap! Something went wrong while displaying this webpage. Error code: STATUS_ACCESS_VIOLATION / SIGILL / Out of Memory

A Chrome tab crashed — out of memory, a faulty extension, a graphics/driver issue or a very heavy page.

Undefined variable $x (Blade view)Laravel

Laravel: ErrorException: Undefined variable $posts (View: /resources/views/posts/index.blade.php)

A Blade template uses a variable the controller didn't pass to the view.

Attempt to read property "x" on nullLaravel

Laravel/PHP 8: ErrorException: Attempt to read property "name" on null

You accessed a property on a value that is `null`, typically an empty relationship or a query that found nothing.

Laravel: Allowed memory size exhausted (request)Laravel

Laravel/PHP: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in vendor/laravel/framework

A request (or artisan job) used more memory than PHP's `memory_limit` allows.