Skip to content

Helpers::improveException fatal error if class name is "parent" #479

@MartkCz

Description

@MartkCz

When I have following wrong code:

$this->onAnchor[] = [$this, 'init'];

private function init(): void

PHP fatal error printed: Fatal error: Uncaught TypeError: get_class_methods(): Argument #1 ($object_or_class) must be an object or a valid class name, string given in /var/www/html/vendor/tracy/tracy/src/Tracy/Helpers.php on line 187 in https://github.com/nette/tracy/blob/master/src/Tracy/Helpers.php#L187

Because of original message: Call to undefined method parent::init(). "parent" is not valid class name

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions