Error map
Cannot use object as array Fatal error: Uncaught Error: Cannot use object of type stdClass as array
PHP · layer 4, Application & API
Centre: this error. First ring: errors it is linked with (12). 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.
Directly related (12)
PHP Fatal error: Uncaught Error: Call to undefined function
PHP can’t find the function you called — usually a missing extension, missing include, or namespace issue.
System.InvalidCastException: Unable to cast object of type 'X' to type 'Y'
An explicit cast failed because the object’s runtime type isn’t the target type.
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.
Fatal error: Uncaught DivisionByZeroError: Division by zero
Code divided by zero (or used modulo by zero) — PHP 8 throws instead of warning.
Fatal error: Uncaught Exception: message in file.php:12
An exception was thrown and nothing caught it, so PHP stopped the script.
java.lang.ClassCastException: class A cannot be cast to class B
An object was cast to a type it isn’t.
Fatal error: Uncaught Error: Call to a member function x() on null
Code called a method on a variable that is null instead of an object.
Fatal error: Uncaught ArgumentCountError: Too few arguments to function foo(), 1 passed and exactly 2 expected
A function was called with fewer arguments than it requires.
Fatal error: Uncaught TypeError: Unsupported operand types: string + int
An arithmetic or array operator was used with incompatible types (PHP 8 is stricter than PHP 7).
WordPress: Fatal error: Uncaught Error: Call to undefined function wp_get_current_user() / add_action() / get_header()
Code called a WordPress function before WordPress loaded, or a theme/plugin file was opened directly.
Fatal error: Cannot redeclare function foo() (previously declared in …)
The same function (or class) was defined twice — usually a file included more than once.
Deprecated: Implicit conversion from float 2.5 to int loses precision
PHP 8.1+ warns when a float with a fractional part is silently converted to int (array keys, % operator, int parameters).
Two steps away (34)
HTTP 500 Internal Server Error
The server hit an unexpected condition — usually an unhandled exception or misconfiguration in the application.
PHP Fatal error: Uncaught Error: Class "X" not found
PHP couldn’t load the class — autoloading failed, the namespace is wrong, or the dependency isn’t installed.
Warning: Cannot modify header information - headers already sent
You called `header()`, `setcookie()` or `session_start()` after output had already been sent to the browser.
AttributeError: 'X' object has no attribute 'y'
You accessed an attribute or method that doesn’t exist on that object type.
java.lang.IllegalArgumentException
A method rejected an argument value as invalid.
java.lang.IllegalStateException
A method was called when the object wasn’t in the right state for it.
PHP Fatal error: Allowed memory size of X bytes exhausted
The script tried to use more memory than PHP’s `memory_limit` allows.
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.
Swift: Cannot convert value of type 'X' to expected argument type 'Y'
The value’s type doesn’t match what the function or property expects.
SQL Error: division by zero / Divide by zero error encountered
An expression divided by a value that was 0 for at least one row.
ZeroDivisionError: division by zero
A number was divided (or modulo’d) by zero.
WordPress: Plugin could not be activated because it triggered a fatal error
Activating the plugin caused a PHP fatal error — usually PHP version incompatibility, a conflict with another plugin/theme, or mi…
java.lang.ArithmeticException: / by zero
Integer division or modulo by zero.
java.util.NoSuchElementException: No value present
Code asked for an element that doesn’t exist — Optional.get() on empty, iterator.next() past the end, Scanner with no input.
ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection
Code accessed a List/collection position that doesn’t exist (IndexOutOfRangeException for arrays).
java.lang.StringIndexOutOfBoundsException: begin 0, end 10, length 5
substring()/charAt() used an index outside the string.
java.lang.UnsupportedOperationException (List.of / Arrays.asList is immutable)
Code tried to modify an immutable or fixed-size collection.
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.
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.
PHP Fatal error: Maximum execution time of 30 seconds exceeded
The script ran longer than `max_execution_time` and PHP stopped it.
PHP Parse error: syntax error, unexpected …
PHP can’t parse the file because of a syntax mistake — the real error is often on the line before the one reported.
WordPress: There Has Been a Critical Error on This Website
A PHP fatal error (usually from a plugin or theme) stopped WordPress; the real error is in the debug log or recovery-mode email.
Fatal error: Uncaught mysqli_sql_exception
A MySQLi query or connection failed; since PHP 8.1 MySQLi throws exceptions by default.
Composer: PHP Fatal error: Allowed memory size of 1610612736 bytes exhausted
Composer ran out of memory while resolving or installing dependencies.
Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated
PHP 8.1+ warns when null is passed to a built-in function that expects a string/int.
Deprecated: Creation of dynamic property Foo::$bar is deprecated
PHP 8.2+ deprecates creating properties that aren’t declared in the class.
WordPress on PHP 8: Fatal error: Uncaught Error: Call to undefined function create_function() / each()
An old plugin/theme uses functions removed in PHP 8 (create_function, each), so the site breaks after a PHP upgrade.
Fatal error: Maximum function nesting level of '256' reached, aborting!
Recursion went deeper than Xdebug’s max_nesting_level allows (or PHP crashed with a segfault without Xdebug).
WordPress: Installation failed: Could not create directory (plugin/theme install or update)
WordPress can’t write to wp-content/plugins, themes or upgrade — ownership/permissions or disk space.
To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed
WordPress can’t write directly to its files (ownership differs from the PHP user), so it falls back to asking for FTP details.
Warning: include(x.php): Failed to open stream: No such file or directory
PHP couldn’t open a file for include/require/fopen — wrong path, missing file, or no permission.
DeprecationWarning: Buffer() is deprecated due to security and usability issues (DEP0005)
Code (yours or a dependency) uses the deprecated new Buffer() constructor.
WARN: the attribute `version` is obsolete, it will be ignored
A harmless Compose v2 warning: the top-level version: line in docker-compose.yml is no longer used.
Rust: error[E0308]: mismatched types — expected `X`, found `Y`
A value’s type doesn’t match what the context expects — common with &str vs String, Option/Result vs plain values, and integer ty…
Map another error
Popular: 4035004000xC000007BTypeErrorCritical error404NullPointerException