wordpress-multi-env-config icon indicating copy to clipboard operation
wordpress-multi-env-config copied to clipboard

Can't use array for multisite across multiple environments

Open newtlabs opened this issue 5 years ago • 6 comments

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 avatar May 03 '19 14:05 newtlabs

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 avatar Jul 04 '19 10:07 newtlabs

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

ahenriksen-inferno avatar Oct 02 '19 10:10 ahenriksen-inferno

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

newtlabs avatar Oct 02 '19 12:10 newtlabs

@newtlabs is it this revision by chance? https://github.com/studio24/wordpress-multi-env-config/commit/cc35881e1bd503561c6c5f5cea32a4326ee8d7e4

ahenriksen-inferno avatar Oct 02 '19 12:10 ahenriksen-inferno

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

newtlabs avatar Oct 02 '19 12:10 newtlabs

I too am having the same issue

AlanJIsaacson avatar Apr 30 '20 08:04 AlanJIsaacson