From:             frankpw at fw2s dot com
Operating system: Win XP Pro
PHP version:      5.2.1
PHP Bug Type:     MySQLi related
Bug description:  mysqli_connect_error() == "" on error 

Description:
------------
In my class I'm opening a connection with mysqli_connect().
mysqli_connect_error() returns description of any error except one. If one
parameter is of wrong type (i.e port as string rather than numeric). 

Reproduce code:
---------------
  public function OpenConnection($host, $user, $pass, $name = null, $port
= null, $sock = null, $chrs = null)
  {
    $this->mysqli = @mysqli_connect($host, $user, $pass, $name, $port,
$sock);
    if (empty($this->mysqli)) die ("Execution stopped! " .
mysqli_connect_error() . "<br />\n");
    if (!empty($chrs)) $this->DefaultCharacterSet($chrs);
  }


Expected result:
----------------
"Execution stopped! mysqli_connect expects parameter 5 to be long, string
given"

Actual result:
--------------
"Execution stopped!"

-- 
Edit bug report at http://bugs.php.net/?id=40588&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=40588&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=40588&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=40588&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=40588&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=40588&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=40588&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=40588&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=40588&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=40588&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=40588&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=40588&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=40588&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=40588&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=40588&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=40588&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=40588&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=40588&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=40588&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=40588&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=40588&r=mysqlcfg

Reply via email to