Skip to content

Warning: get_class() expects parameter 1 to be object #55

@OrangeTanguine

Description

@OrangeTanguine

With PHP7.0.30, we have a warning bug :
( ! ) Warning: get_class() expects parameter 1 to be object, null given in /usr/share/nginx/html/projectname/vendor/snowair/phalcon-debugbar/src/DataCollector/RouteCollector.php on line 59

Bug Line :
$result['Controller'] = get_class( $controller_instance = $dispatcher->getActiveController());

Fix :
$result['Controller'] = $dispatcher->getActiveController() != null ? get_class( $controller_instance = $dispatcher->getActiveController()) : $controller_instance ="";

Thks !

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions