Changeset 7269
- Timestamp:
- 03/12/2008 10:41:43 PM (17 years ago)
- Location:
- trunk/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/functions.php
r7134 r7269 958 958 return true; 959 959 960 $s how = $wpdb->hide_errors();960 $suppress = $wpdb->suppress_errors(); 961 961 $installed = $wpdb->get_var( "SELECT option_value FROM $wpdb->options WHERE option_name = 'siteurl'" ); 962 $wpdb->s how_errors($show);962 $wpdb->suppress_errors($suppress); 963 963 964 964 $installed = !empty( $installed ) ? true : false; -
trunk/wp-includes/wp-db.php
r7037 r7269 18 18 19 19 var $show_errors = false; 20 var $suppress_errors = false; 20 21 var $num_queries = 0; 21 22 var $last_query; … … 178 179 function print_error($str = '') { 179 180 global $EZSQL_ERROR; 181 180 182 if (!$str) $str = mysql_error($this->dbh); 181 183 $EZSQL_ERROR[] = 182 184 array ('query' => $this->last_query, 'error_str' => $str); 183 185 186 if ( $this->suppress_errors ) 187 return false; 188 184 189 $error_str = "WordPress database error $str for query $this->last_query"; 185 190 if ( $caller = $this->get_caller() ) 186 191 $error_str .= " made by $caller"; 192 187 193 @error_log($error_str, 0); 188 194 … … 214 220 $this->show_errors = false; 215 221 return $show; 222 } 223 224 function suppress_errors( $suppress = true ) { 225 $errors = $this->suppress_errors; 226 $this->suppress_errors = $suppress; 227 return $errors; 216 228 } 217 229
Note: See TracChangeset
for help on using the changeset viewer.