--- a/src/config/application.php Mon Dec 02 13:34:27 2019 +0100
+++ b/src/config/application.php Fri Mar 05 02:12:27 2021 +0100
@@ -9,6 +9,7 @@
*/
use Roots\WPConfig\Config;
+use function Env\env;
/** @var string Directory containing all of the site's files */
$root_dir = dirname(__DIR__);
@@ -17,14 +18,9 @@
$webroot_dir = $root_dir . '/web';
/**
- * Expose global env() function from oscarotero/env
- */
-Env::init();
-
-/**
* Use Dotenv to set required environment variables and load .env file in root
*/
-$dotenv = Dotenv\Dotenv::create($root_dir);
+$dotenv = Dotenv\Dotenv::createUnsafeImmutable($root_dir);
if (file_exists($root_dir . '/.env')) {
$dotenv->load();
$dotenv->required(['WP_HOME', 'WP_SITEURL']);
@@ -33,6 +29,7 @@
}
}
+
/**
* Set up our global environment constant and load its config first
* Default: production
@@ -98,6 +95,7 @@
* Debugging Settings
*/
Config::define('WP_DEBUG_DISPLAY', false);
+Config::define('WP_DEBUG_LOG', env('WP_DEBUG_LOG') ?? false);
Config::define('SCRIPT_DEBUG', false);
ini_set('display_errors', 0);