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 #146

Merged
merged 1 commit into from
May 11, 2016

Conversation

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 cornernote merged commit fdcfa80 into bedezign:master May 11, 2016
@cornernote
Copy link
Contributor

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