wordpress-multi-env-config
wordpress-multi-env-config copied to clipboard
Can't use array for multisite across multiple environments
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
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.
@newtlabs did you ever get this resolved? I'm having the same issue.
Hi, no sorry I reverted to an old version for now.. hopefully we can get it fixed soon though..
@newtlabs is it this revision by chance? https://github.com/studio24/wordpress-multi-env-config/commit/cc35881e1bd503561c6c5f5cea32a4326ee8d7e4
It should before it was refactored so v1.0.2 as seen here - https://github.com/studio24/wordpress-multi-env-config/releases
I too am having the same issue