From 43227540d2dbf61bbdb92cb278bd15bad0b62671 Mon Sep 17 00:00:00 2001 From: Paul de Wouters Date: Mon, 6 Jul 2020 11:13:20 +0100 Subject: [PATCH 1/3] Turn on error display for local server --- inc/namespace.php | 2 -- wp-config.php | 4 ++++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/inc/namespace.php b/inc/namespace.php index 280a95b5..4f0b89fb 100644 --- a/inc/namespace.php +++ b/inc/namespace.php @@ -55,8 +55,6 @@ function bootstrap() { 'port' => getenv( 'REDIS_PORT' ), ]; - ini_set( 'display_errors', 'on' ); - if ( $config['tachyon'] ) { define( 'TACHYON_URL', getenv( 'TACHYON_URL' ) ); diff --git a/wp-config.php b/wp-config.php index cf6df4df..fcb04a07 100644 --- a/wp-config.php +++ b/wp-config.php @@ -13,3 +13,7 @@ if ( getenv( 'HM_ENV_ARCHITECTURE' ) === 'local-server' ) { define( 'HM_ENV_ARCHITECTURE', getenv( 'HM_ENV_ARCHITECTURE' ) ); } + +if ( defined( 'PHP_SAPI' ) && PHP_SAPI === 'cli' ) { + ini_set( 'display_errors', 'on' ); +} From 28b010fff35a23e3af48196fd6361197d53a0eb6 Mon Sep 17 00:00:00 2001 From: Paul de Wouters Date: Mon, 6 Jul 2020 11:18:53 +0100 Subject: [PATCH 2/3] Update wp-config.php --- wp-config.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/wp-config.php b/wp-config.php index fcb04a07..f5b87460 100644 --- a/wp-config.php +++ b/wp-config.php @@ -10,10 +10,11 @@ * @package altis/local-server */ -if ( getenv( 'HM_ENV_ARCHITECTURE' ) === 'local-server' ) { - define( 'HM_ENV_ARCHITECTURE', getenv( 'HM_ENV_ARCHITECTURE' ) ); -} - if ( defined( 'PHP_SAPI' ) && PHP_SAPI === 'cli' ) { ini_set( 'display_errors', 'on' ); } + +if ( getenv( 'HM_ENV_ARCHITECTURE' ) === 'local-server' ) { + /* phpcs:ignore PSR1.Files.SideEffects */ + define( 'HM_ENV_ARCHITECTURE', getenv( 'HM_ENV_ARCHITECTURE' ) ); +} From 7c46c93d93b93a03f38c05b4880d265ad849f647 Mon Sep 17 00:00:00 2001 From: Paul de Wouters Date: Mon, 6 Jul 2020 11:20:27 +0100 Subject: [PATCH 3/3] Update wp-config.php --- wp-config.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-config.php b/wp-config.php index f5b87460..971543a8 100644 --- a/wp-config.php +++ b/wp-config.php @@ -10,11 +10,12 @@ * @package altis/local-server */ +/* phpcs:disable PSR1.Files.SideEffects */ if ( defined( 'PHP_SAPI' ) && PHP_SAPI === 'cli' ) { ini_set( 'display_errors', 'on' ); } if ( getenv( 'HM_ENV_ARCHITECTURE' ) === 'local-server' ) { - /* phpcs:ignore PSR1.Files.SideEffects */ define( 'HM_ENV_ARCHITECTURE', getenv( 'HM_ENV_ARCHITECTURE' ) ); } +/* phpcs:enable PSR1.Files.SideEffects */