processwire / processwire-issues

ProcessWire issue reports.
45 stars 2 forks source link

Error received in debug mode if a session variable is of type object #1997

Open kixe opened 5 days ago

kixe commented 5 days ago

Short description of the issue

Error Object of class stdClass could not be converted to string

https://github.com/processwire/processwire/blob/3cc76cc886a49313b4bfb9a1a904bd88d11b7cb7/wire/templates-admin/debug.inc#L121-L122

Optional: Screenshots/Links that demonstrate the issue

Bildschirmfoto 2024-11-20 um 12 08 02

Optional: Suggestion for a possible fix

Change: https://github.com/processwire/processwire/blob/3cc76cc886a49313b4bfb9a1a904bd88d11b7cb7/wire/templates-admin/debug.inc#L121-L122 to: if(is_array($value) || is_object($value)) $value = print_r($value, true);

Setup/Environment

ryancramerdesign commented 3 days ago

@kixe Thanks, I've pushed a fix for this.