[wp-trac] [WordPress Trac] #21870: @ error control operator hides fatal error on mysql_fetch_object

WordPress Trac wp-trac at lists.automattic.com
Thu Sep 13 04:00:29 UTC 2012


#21870: @ error control operator hides fatal error on mysql_fetch_object
--------------------------+------------------
 Reporter:  ericlewis     |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  3.5
Component:  Database      |     Version:  1.5
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |
--------------------------+------------------

Comment (by ericlewis):

 Replying to [comment:6 ericlewis]:
 > Not to veer to much in the direction of #9158, but what about the @
 operator on the mysql_query call a bit earlier in the function?
 >
 > {{{
 > $this->result = @mysql_query( $query, $this->dbh );
 > }}}
 >
 > This seems related and perhaps ripe for removal as well, as any error
 raised by this call is probably developer error.

 Since we'll be taking care of support for PDO and the mysqli_* class in
 #21663, I'm gonna retract what I said about perhaps removing the error
 construct for mysql_query(), because that could open up a can of worms
 that really doesn't need to be opened at all.

 Thumbs up on nacin's patch.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/21870#comment:7>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list