Make WordPress Core

Ticket #6665: query_notice_ignore.patch

File query_notice_ignore.patch, 766 bytes (added by simonwheatley, 17 years ago)

Query notice ignore option

  • wp-includes/classes.php

    old new  
    105105                                        $query = preg_replace("!^.+\?!", '', $query);
    106106
    107107                                        // Substitute the substring matches into the query.
     108                                        // If we're running in debug mode, temporarily lower our error handling from an assumed level of E_ALL
     109                                        if ( defined('WP_DEBUG') && WP_DEBUG == true )
     110                                                $old_error_reporting = error_reporting( E_ALL ^ E_NOTICE );
    108111                                        eval("\$query = \"$query\";");
     112                                        // Maybe reinstate the error handling at the old level
     113                                        if ( defined( WP_DEBUG ) && WP_DEBUG == true )
     114                                                error_reporting( $old_error_level );
    109115                                        $this->matched_query = $query;
    110116
    111117                                        // Parse the query.