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..971543a8 100644 --- a/wp-config.php +++ b/wp-config.php @@ -10,6 +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' ) { define( 'HM_ENV_ARCHITECTURE', getenv( 'HM_ENV_ARCHITECTURE' ) ); } +/* phpcs:enable PSR1.Files.SideEffects */