Make WordPress Core

Ticket #18391: 18391.patch

File 18391.patch, 887 bytes (added by sebastian.pisula, 8 years ago)
  • wp-includes/load.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    295295
    296296                if ( WP_DEBUG_LOG ) {
    297297                        ini_set( 'log_errors', 1 );
    298                         ini_set( 'error_log', WP_CONTENT_DIR . '/debug.log' );
     298
     299                        $debug_file = WP_CONTENT_DIR . '/debug.log';
     300
     301                        if ( filter_var( WP_DEBUG_LOG, FILTER_VALIDATE_BOOLEAN, array( 'flags' => FILTER_NULL_ON_FAILURE ) ) === null ) {
     302                                $debug_file = WP_DEBUG_LOG;
     303                        }
     304
     305                        ini_set( 'error_log', $debug_file );
    299306                }
    300307        } else {
    301308                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 );