Skip to content

Conversation

@kamui545
Copy link
Contributor

FatalThrowableError in ViewCollector.php line 53:
Type error: Argument 1 passed to Barryvdh\Debugbar\DataCollector\ViewCollector::addView() must be an instance of Illuminate\View\View, string given, called in /data/mld/prod/vendor/barryvdh/laravel-debugbar/src/LaravelDebugbar.php on line 202

You should bump the version of the package as it is probably a breaking change and won't work for 5.3.

@barryvdh
Copy link
Owner

can't we add a check to support both?

function ($view, $data = []) use ($debugbar) {
    if ($data) {
        $view = $data[0];  // For Laravel >= 5.4
    }
    $debugbar['views']->addView($view);
}

@kamui545
Copy link
Contributor Author

Yeah, I've thought about it actually. I will test and update.

@kamui545
Copy link
Contributor Author

Tested on few 5.3/5.4 apps, looks good.

@barryvdh barryvdh merged commit 4d9e7df into barryvdh:master Jan 18, 2017
@barryvdh
Copy link
Owner

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

Successfully merging this pull request may close these issues.

2 participants