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

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

Closed
yangshii opened this issue Aug 4, 2022 · 4 comments
Milestone

Comments

@yangshii
Copy link

yangshii commented Aug 4, 2022

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
Copy link
Contributor

glensc commented Aug 4, 2022

  1. translate to english
  2. fix formatting (use markdown blockquote)

@yangshii
Copy link
Author

yangshii commented Aug 4, 2022

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
Copy link
Contributor

glensc commented Aug 4, 2022

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

close the issue yourself if you found a solution.

@glensc glensc added this to the 0.21.3 milestone Aug 4, 2022
@yangshii yangshii closed this as completed Aug 4, 2022
@yangshii
Copy link
Author

yangshii commented Aug 4, 2022

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

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

2 participants