Get better error reporting from __toString

Created on 3 September 2015, over 9 years ago
Updated 4 August 2024, 10 months ago

Problem/Motivation

__toString fatals on exceptions thrown and non-string returns. Worse, exceptions thrown happily die without a stack trace. This is not nice. Most of core just returns a property so that should be OK on the exception front at least but TranslationWrapper and DateTimePlus have logic in there.

Proposed resolution

catch and trigger_error and enforce string.

Remaining tasks

User interface changes

API changes

Data model changes

Beta phase evaluation

<!--Uncomment the relevant rows for the issue. -->
🐛 Bug report
Status

Fixed

Version

8.0 ⚰️

Component
Other 

Last updated about 12 hours ago

Created by

🇨🇦Canada chx

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024