Ticket #39826: 39826.patch
File 39826.patch, 1.1 KB (added by , 4 years ago) |
---|
-
src/wp-includes/option.php
97 97 $value = wp_cache_get( $option, 'options' ); 98 98 99 99 if ( false === $value ) { 100 $row = $wpdb->get_row( $wpdb->prepare( "SELECT option_value FROM $wpdb->options WHERE option_name = %s LIMIT 1", $option ) );100 $row = $wpdb->get_row( $wpdb->prepare( "SELECT option_value FROM $wpdb->options WHERE option_name = %s", $option ) ); 101 101 102 102 // Has to be get_row() instead of get_var() because of funkiness with 0, false, null values. 103 103 if ( is_object( $row ) ) { … … 117 117 } 118 118 } else { 119 119 $suppress = $wpdb->suppress_errors(); 120 $row = $wpdb->get_row( $wpdb->prepare( "SELECT option_value FROM $wpdb->options WHERE option_name = %s LIMIT 1", $option ) );120 $row = $wpdb->get_row( $wpdb->prepare( "SELECT option_value FROM $wpdb->options WHERE option_name = %s", $option ) ); 121 121 $wpdb->suppress_errors( $suppress ); 122 122 if ( is_object( $row ) ) { 123 123 $value = $row->option_value;