|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-03-18 22:37 UTC] serge dot dominici at e-sd dot org
[2007-03-19 09:28 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 02:00:01 2025 UTC |
Description: ------------ When creating the mysqli object, it don't return FALSE as said in the documentation, if the connection failed. Reproduce code: --------------- try { $this->mysqli = @new mysqli('localhost', 'bad_user', 'password', 'db'); if ($this->mysqli == FALSE) { throw new Exception("Connection failed !"); } var_dump($this->mysqli); var_export($this->mysqli); } catch (Exception $e) { $e->showStackTrace(); } Expected result: ---------------- object(mysqli)#5 (0) { } mysqli::__set_state(array( )) Actual result: -------------- Connection failed !