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

Can't use array for multisite across multiple environments #32

Closed
newtlabs opened this issue May 3, 2019 · 6 comments
Closed

Can't use array for multisite across multiple environments #32

newtlabs opened this issue May 3, 2019 · 6 comments

Comments

@newtlabs
Copy link
Contributor

newtlabs commented May 3, 2019

Hi, I'm updating an old version of the multi-env config to the latest version for a multisite. Before it worked fine but the newer one has issues.

Testing locally, the development environment doesn't work with other environments in front of it. Example:

$env = [
'production' => [
'domain' => ['example.com', 'sub.example.com'],
'path' => '',
'ssl' => true,
],
'staging' => [
'domain' => ['staging.example.com', 'stagingsub.example.com'],
'path' => '',
'ssl' => true,
],
'development' => [
'domain' => ['example.test', 'sub.example.test'],
'path' => '',
'ssl' => true,
],
];

Errors:

PHP Warning: strpos() expects parameter 1 to be string, array given in /sites/example.com/wp-config.load.php on line 77
PHP Warning: preg_quote() expects parameter 1 to be string, array given in /sites/example.com/wp-config.load.php on line 79
PHP Warning: trim() expects parameter 1 to be string, array given in /sites/example.com/wp-config.load.php on line 135
PHP Warning: trim() expects parameter 1 to be string, array given in /sites/example.com/wp-config.load.php on line 138
PHP Warning: strpos() expects parameter 1 to be string, array given in /sites/example.com/wp-config.load.php on line 77
PHP Warning: preg_quote() expects parameter 1 to be string, array given in /sites/example.com/wp-config.load.php on line 79
PHP Warning: trim() expects parameter 1 to be string, array given in /sites/example.com/wp-config.load.php on line 135
PHP Warning: trim() expects parameter 1 to be string, array given in /sites/example.com/wp-config.load.php on line 138

@newtlabs
Copy link
Contributor Author

newtlabs commented Jul 4, 2019

Hi, any chance of taking a quick look at this? I'm setting up a new multisite so it would be great to be able to use the new version of the config, thanks in advance.

@ahenriksen-inferno
Copy link

@newtlabs did you ever get this resolved? I'm having the same issue.

@newtlabs
Copy link
Contributor Author

newtlabs commented Oct 2, 2019

Hi, no sorry I reverted to an old version for now.. hopefully we can get it fixed soon though..

@ahenriksen-inferno
Copy link

@newtlabs
Copy link
Contributor Author

newtlabs commented Oct 2, 2019

It should before it was refactored so v1.0.2 as seen here - https://github.com/studio24/wordpress-multi-env-config/releases

@AlanJIsaacson
Copy link
Member

I too am having the same issue

simonrjones added a commit that referenced this issue Aug 23, 2022
Fix #32: Can't use array for multisite across multiple environments
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

3 participants