# exceptions in overloaded objects still a little off

- Thread: https://externals.io/message/9611
- Original archive: https://news-web.php.net/php.internals/9611
- Started by Wez Furlong on 2004-04-29T10:26:03+00:00
- Messages: 1
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #9611 — Wez Furlong — 2004-04-29T10:26:03+00:00

URL: https://externals.io/message/9611#9611

If a read_dimension handler returns a `NULL` zval and throws an exception,
the engine will emit an error "Objects used as arrays in post/pre
increment/decrement must return values by reference".

$foo['bar'] = 42;

I know this is because the value is going to be written into, but
IMO it's better to fire the exception at this point, since the engine
error message hides the useful message from the exception (and is
a little misleading in any case).

--Wez.
