Mysqli: PHP errors when database connection fails

Bart Jansens - January 13, 2008 - 13:23
Project:Drupal
Version:5.x-dev
Component:base system
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

When the database connection fails for any reason, database.mysqli.inc uses mysqli_error() to retrieve the error message, which results in PHP warnings because mysqli_error() can't be used this way. The correct function to use is mysqli_connect_error() as done in HEAD.

Patch attached.

AttachmentSize
20080113.core-mysqli-connect-error.patch2.04 KB

#1

drumm - February 11, 2008 - 06:28
Status:patch (code needs review)» fixed

Committed to 5.x.

#2

Anonymous (not verified) - February 25, 2008 - 06:31
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.