perftools / xhgui

Web interface for XHProf profiling data can store data in MongoDB or PDO database
1.65k stars 341 forks source link

Fatal error: Uncaught TypeError: Return value of XHGui\ServiceProvider\ServiceProvider::setupPaths() must be an instance #485

Closed yangshii closed 2 years ago

yangshii commented 2 years ago

xhgui配置好以后,浏览器访问报错如下,大神帮忙指点一下,感谢。 xhgui deployed done! i got the error when i visit it in the browser!

Fatal error: Uncaught TypeError: Return value of XHGui\ServiceProvider\ServiceProvider::setupPaths() must be an instance of XHGui\ServiceProvider\void, none returned in /home/xhgui/src/ServiceProvider/ServiceProvider.php:21 Stack trace: #0 /home/xhgui/src/ServiceProvider/ServiceProvider.php(13): XHGui\ServiceProvider\ServiceProvider->setupPaths(Object(XHGui\Application)) #1 /home/xhgui/vendor/pimple/pimple/src/Pimple/Container.php(297): XHGui\ServiceProvider\ServiceProvider->register(Object(XHGui\Application)) #2 /home/xhgui/src/Application.php(17): Pimple\Container->register(Object(XHGui\ServiceProvider\ServiceProvider)) #3 /home/xhgui/webroot/index.php(9): XHGui\Application->__construct() #4 {main} thrown in /home/xhgui/src/ServiceProvider/ServiceProvider.php on line 21

glensc commented 2 years ago
  1. translate to english
  2. fix formatting (use markdown blockquote)
yangshii commented 2 years ago

xhgui配置好以后,浏览器访问报错如下,大神帮忙指点一下,感谢。 xhgui deployed done! i got the error when i visit it in the browser!

Fatal error: Uncaught TypeError: Return value of XHGui\ServiceProvider\ServiceProvider::setupPaths() must be an instance of XHGui\ServiceProvider\void, none returned in /home/xhgui/src/ServiceProvider/ServiceProvider.php:21 Stack trace: #0 /home/xhgui/src/ServiceProvider/ServiceProvider.php(13): XHGui\ServiceProvider\ServiceProvider->setupPaths(Object(XHGui\Application)) #1 /home/xhgui/vendor/pimple/pimple/src/Pimple/Container.php(297): XHGui\ServiceProvider\ServiceProvider->register(Object(XHGui\Application)) #2 /home/xhgui/src/Application.php(17): Pimple\Container->register(Object(XHGui\ServiceProvider\ServiceProvider)) #3 /home/xhgui/webroot/index.php(9): XHGui\Application->__construct() #4 {main} thrown in /home/xhgui/src/ServiceProvider/ServiceProvider.php on line 21

i fing the reason ,it's my fault . i use a php with version 7.0. shoud 7.2 or 8.0.

glensc commented 2 years ago

XHGui\ServiceProvider\void, none returned in indicates too old PHP.

close the issue yourself if you found a solution.

yangshii commented 2 years ago

XHGui\ServiceProvider\void, none returned in indicates too old PHP.