Index: wp-includes/load.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- wp-includes/load.php	(revision d11514485719f41469daff6cde3f3006bd35b58a)
+++ wp-includes/load.php	(revision )
@@ -295,7 +295,14 @@
 
 		if ( WP_DEBUG_LOG ) {
 			ini_set( 'log_errors', 1 );
-			ini_set( 'error_log', WP_CONTENT_DIR . '/debug.log' );
+
+			$debug_file = WP_CONTENT_DIR . '/debug.log';
+
+			if ( filter_var( WP_DEBUG_LOG, FILTER_VALIDATE_BOOLEAN, array( 'flags' => FILTER_NULL_ON_FAILURE ) ) === null ) {
+				$debug_file = WP_DEBUG_LOG;
+			}
+
+			ini_set( 'error_log', $debug_file );
 		}
 	} else {
 		error_reporting( E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR );
