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

Bootstrap Array to String conversion fix #145

Closed
WJRovers opened this issue May 10, 2016 · 1 comment
Closed

Bootstrap Array to String conversion fix #145

WJRovers opened this issue May 10, 2016 · 1 comment

Comments

@WJRovers
Copy link
Contributor

Hey There,

as reviewing your extension I came across some bugs. One of them being the bootstrap bug.
Yii2 allows multidimensional arrays to be put into the application's bootstrap (see http://www.yiiframework.com/doc-2.0/yii-filters-contentnegotiator.html)

When this type of bootstrap is used the application will spit out 'Array to String conversion' errors.
In order to fix this you can change a single line of code found in Bootstrap.php lines 28 to 32.

if ($moduleName) {
    // The module was added in the configuration, make sure to add it to the application bootstrap so it gets loaded
    $app->bootstrap[] = $moduleName;
    $app->bootstrap = array_unique($app->bootstrap, SORT_REGULAR);
}

(original:

$app->bootstrap = array_unique($app->bootstrap);
)

Hope this helps anyone 👍

@cornernote
Copy link
Contributor

Hi @WJRovers,

Thanks!

Do you want to do the PR so you get credit for the commit?

cornernote added a commit that referenced this issue May 11, 2016
Bootstrap Array to String conversion fix #145
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