Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
OrangeTanguine opened this issue Nov 29, 2018 · 0 comments
Open

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

OrangeTanguine opened this issue Nov 29, 2018 · 0 comments

Comments

@OrangeTanguine
Copy link
Contributor

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 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant