Error map

Undefined variable Warning: Undefined variable $x

PHP · layer 4, Application & API

Open the full error page →

Centre: this error. First ring: errors it is linked with (7). 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.

Undefined variable — Warning: Undefined variable $x (PHP)Undefined v…TypeError — TypeError: Cannot read properties of undefined (reading 'x') (JavaScript)TypeErrorArray to string conversion — Warning: Array to string conversion (PHP)Array to string con…reading 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 nullArray offset on null — Warning: Trying to access array offset on value of type null (PHP)Array offset on nullUndefined property — Warning: Undefined property: Class::$prop (PHP)Undefined propertyTypeError set undefined — TypeError: Cannot set properties of undefined (setting 'x') (JavaScript)TypeError set undef…NullReferenceException — System.NullReferenceException: Object reference not set to an instance of an object (.NET)NullReferenceExcept…TypeError: not a function — TypeError: x is not a function (JavaScript)TypeError: not a fu…ReferenceError — ReferenceError: x is not defined (JavaScript)ReferenceErrorClassCastException — java.lang.ClassCastException: class A cannot be cast to class B (Java)ClassCastExceptionERR_INVALID_ARG_TYPE — TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined (Node.js)ERR_INVALID_ARG_TYPETypeError — Fatal error: Uncaught TypeError: foo(): Argument #1 ($x) must be of type int, string given (PHP)TypeErrorArrayIndexOutOfBoundsException — java.lang.ArrayIndexOutOfBoundsException: Index 5 out of bounds for length 5 (Java)ArrayIndexOutOfBoun…addEventListener on null — TypeError: Cannot read properties of null (reading 'addEventListener') (JavaScript)addEventListener on…TypeError not iterable — TypeError: x is not iterable (JavaScript)TypeError not itera…read-only property — TypeError: Cannot assign to read only property 'x' of object (JavaScript)read-only propertyuseContext undefined — TypeError: Cannot destructure property 'user' of 'useContext(...)' as it is undefined. (React)useContext undefinedTS2353: 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…Undefined array key — Warning: Undefined array key / Undefined index (PHP)Undefined array keyreduce empty — TypeError: Reduce of empty array with no initial value (JavaScript)reduce emptyinvalid array length — RangeError: Invalid array length (JavaScript)invalid array lengthRangeError — RangeError: Maximum call stack size exceeded (JavaScript)RangeErrorKeyError — KeyError: 'x' (Python)KeyErrorTypeError: NoneType — TypeError: 'NoneType' object is not subscriptable (Python)TypeError: NoneType

Directly related (7)

Two steps away (18)

NullReferenceException.NET

System.NullReferenceException: Object reference not set to an instance of an object

Code dereferenced a variable that is `null` — the .NET equivalent of Java’s NullPointerException.

TypeError: not a functionJavaScript

TypeError: x is not a function

You called something as a function, but its value is not a function (it’s undefined, a string, an object…).

ReferenceErrorJavaScript

ReferenceError: x is not defined

Code refers to a variable or function name that doesn’t exist in the current scope.

ClassCastExceptionJava

java.lang.ClassCastException: class A cannot be cast to class B

An object was cast to a type it isn’t.

ERR_INVALID_ARG_TYPENode.js

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined

A Node API got an argument of the wrong type — usually undefined because an env var or config value is missing.

TypeErrorPHP

Fatal error: Uncaught TypeError: foo(): Argument #1 ($x) must be of type int, string given

A function received a value of the wrong type for a typed parameter.

ArrayIndexOutOfBoundsExceptionJava

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

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

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.

TypeError not iterableJavaScript

TypeError: x is not iterable

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

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.

useContext undefinedReact

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

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

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).

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.

reduce emptyJavaScript

TypeError: Reduce of empty array with no initial value

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

invalid array lengthJavaScript

RangeError: Invalid array length

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

RangeErrorJavaScript

RangeError: Maximum call stack size exceeded

A function called itself (directly or indirectly) too many times — usually infinite recursion.

KeyErrorPython

KeyError: 'x'

You accessed a dictionary key that doesn’t exist.

TypeError: NoneTypePython

TypeError: 'NoneType' object is not subscriptable

You used `[ ]` on a value that is `None` — typically a function that returned nothing.