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

Latest commit throws exception #75

Closed
ghost opened this issue Jan 13, 2014 · 6 comments
Closed

Latest commit throws exception #75

ghost opened this issue Jan 13, 2014 · 6 comments

Comments

@ghost
Copy link

ghost commented Jan 13, 2014

After updating debugbar to latest commit, laravel now shows blank page and in laravel.log i have this trace:

[2014-01-13 12:38:09] local.ERROR: exception 'ErrorException' with message 'Array to string conversion' in C:\Htdocs\at.xxx.com\uv2\vendor\barryvdh\laravel-debugbar\src\Barryvdh\Debugbar\DataCollector\IlluminateRouteCollector.php:111

Stack trace:
#0 [internal function]: Illuminate\Exception\Handler->handleError(8, 'Array to string...', 'C:\Htdocs\at.un...', 111, Array)
#1 C:\Htdocs\at.xxx.com\uv2\vendor\barryvdh\laravel-debugbar\src\Barryvdh\Debugbar\DataCollector\IlluminateRouteCollector.php(111): array_unique(Array)
#2 C:\Htdocs\at.xxx.com\uv2\vendor\barryvdh\laravel-debugbar\src\Barryvdh\Debugbar\DataCollector\IlluminateRouteCollector.php(83): Barryvdh\Debugbar\DataCollector\IlluminateRouteCollector->getBeforeFilters(Object(Illuminate\Routing\Route))
#3 C:\Htdocs\at.xxx.com\uv2\vendor\barryvdh\laravel-debugbar\src\Barryvdh\Debugbar\DataCollector\IlluminateRouteCollector.php(29): Barryvdh\Debugbar\DataCollector\IlluminateRouteCollector->getRouteInformation(Object(Illuminate\Routing\Route))
#4 C:\Htdocs\at.xxx.com\uv2\vendor\maximebf\debugbar\src\DebugBar\DebugBar.php(214): Barryvdh\Debugbar\DataCollector\IlluminateRouteCollector->collect()
#5 C:\Htdocs\at.xxx.com\uv2\vendor\maximebf\debugbar\src\DebugBar\DebugBar.php(234): DebugBar\DebugBar->collect()
#6 C:\Htdocs\at.xxx.com\uv2\vendor\maximebf\debugbar\src\DebugBar\JavascriptRenderer.php(707): DebugBar\DebugBar->getData()
#7 C:\Htdocs\at.xxx.com\uv2\vendor\barryvdh\laravel-debugbar\src\Barryvdh\Debugbar\LaravelDebugBar.php(420): DebugBar\JavascriptRenderer->render()
#8 C:\Htdocs\at.xxx.com\uv2\vendor\barryvdh\laravel-debugbar\src\Barryvdh\Debugbar\LaravelDebugBar.php(293): Barryvdh\Debugbar\LaravelDebugbar->injectDebugbar(Object(Symfony\Component\HttpFoundation\Response))
#9 C:\Htdocs\at.xxx.com\uv2\vendor\barryvdh\laravel-debugbar\src\Barryvdh\Debugbar\Middleware.php(35): Barryvdh\Debugbar\LaravelDebugbar->modifyResponse(Object(Illuminate\Http\Request), Object(Symfony\Component\HttpFoundation\Response))
#10 C:\Htdocs\at.xxx.com\uv2\vendor\laravel\framework\src\Illuminate\Http\FrameGuard.php(38): Barryvdh\Debugbar\Middleware->handle(Object(Illuminate\Http\Request), 1, true)
#11 C:\Htdocs\at.xxx.com\uv2\vendor\laravel\framework\src\Illuminate\Session\Middleware.php(58): Illuminate\Http\FrameGuard->handle(Object(Illuminate\Http\Request), 1, true)
#12 C:\Htdocs\at.xxx.com\uv2\vendor\laravel\framework\src\Illuminate\Cookie\Queue.php(47): Illuminate\Session\Middleware->handle(Object(Illuminate\Http\Request), 1, true)
#13 C:\Htdocs\at.xxx.com\uv2\vendor\laravel\framework\src\Illuminate\Cookie\Guard.php(51): Illuminate\Cookie\Queue->handle(Object(Illuminate\Http\Request), 1, true)
#14 C:\Htdocs\at.xxx.com\uv2\vendor\stack\builder\src\Stack\StackedHttpKernel.php(23): Illuminate\Cookie\Guard->handle(Object(Illuminate\Http\Request), 1, true)
#15 C:\Htdocs\at.xxx.com\uv2\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(552): Stack\StackedHttpKernel->handle(Object(Illuminate\Http\Request))
#16 C:\Htdocs\at.xxx.com\uv2\public\index.php(50): Illuminate\Foundation\Application->run()

@barryvdh
Copy link
Owner

You are on the latest Laravel 4.1?
Can you run php artisan routes fine?

@ghost
Copy link
Author

ghost commented Jan 13, 2014

Yes, latest 4.1 laravel, and with debugbar enabled php artisan routes runs fine and prints out routes list. I'l check, maybe disabling filters will work

@ghost
Copy link
Author

ghost commented Jan 13, 2014

So, when i disable this line in routes. Route::when('forums/*', 'checkForumAccess'); then application starts working fine and debugbar does not show error messages.

With debugbar turned off and checkForumAccess enabled, application also works fine.

My filters.php has this line:
Route::filter('checkForumAccess', 'xxx\Filters\Forum\ForumFilter');

and ForumFilter looks like this:

http://pastebin.com/FmABggc0

@barryvdh
Copy link
Owner

Can you try the latest dev-master? Or change this line in IlluminateRouteCollector.php:

$patterns = array_merge($patterns, $inner);
//Should become:
$patterns = array_merge($patterns, array_keys($inner));

Does that help?

@barryvdh barryvdh reopened this Jan 13, 2014
@ghost
Copy link
Author

ghost commented Jan 13, 2014

Thanks. Looks like commit
"barryvdh/laravel-debugbar": "dev-master#33eddf84fc3967cdd670ddde36de2542fdf87bc7", fixes problem. With this commit works fine.

@barryvdh
Copy link
Owner

Cool, thanks.

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