Skip to content

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

@kixe

Description

@kixe

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

  • ProcessWire version: 3.0.242
  • (Optional) PHP version: 8.3
  • (Optional) MySQL version:
  • (Optional) Any 3rd party modules that are installed and could be related to the issue:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions