#29057 [Opn->Bgs]: PHP doesn't generate a warning on mysql_select_db failure
| From: | derick@php.net | Date: | Thu, 08 Jul 2004 07:03:03 +0000 |
| Subject: | #29057 [Opn->Bgs]: PHP doesn't generate a warning on mysql_select_db failure | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-61884@lists.php.net to get a copy of this message | ||
ID: 29057
Updated by: derick@php.net
Reported By: johnfivealive at hotmail dot com
-Status: Open
+Status: Bogus
Bug Type: MySQL related
Operating System: Fedora Core 2
PHP Version: 5.0.0RC3
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
If it returns false, you can much more easily check for it without
having to obfucsicate the functioncall with the shut-up operator (@).
No way this is going to be changed.
Previous Comments:
------------------------------------------------------------------------
[2004-07-08 05:17:18] johnfivealive at hotmail dot com
Description:
------------
whenever mysql_select_db returns false PHP should output a warning
message to the browser if php is configured to do so. As it stands now
when mysql_select_db fails, PHP generates no warning on failure. This
is not consistent with other PHP mysql_* functions.
Reproduce code:
---------------
Make sure all warnings are enabled in php.ini
psuedo code:
$connection = mysql_connect( "host", "user", "pass" );
mysql_select_db( "some non existent DB", $connection );
mysql_select_db should return false, but no warning is generated
Expected result:
----------------
a warning should be outputed to the browser
Actual result:
--------------
function returns correctly, but no warning is outputted
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=29057&edit=1