Req #67637 [NEW]: mysqli::ping() should not send E_NOTICE
| From: | php dot net at dzubak dot sk | Date: | Thu, 17 Jul 2014 07:39:17 +0000 |
| Subject: | Req #67637 [NEW]: mysqli::ping() should not send E_NOTICE | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-186684@lists.php.net to get a copy of this message | ||
From: php dot net at dzubak dot sk
Operating system: Linux
PHP version: 5.5.14
Package: MySQLi related
Bug Type: Feature/Change Request
Bug description:mysqli::ping() should not send E_NOTICE
Description:
------------
I use mysqli::ping() to test whether MySQL connection is still alive
(scripts waits long before using MySQL again).
On FALSE, it also sends E_NOTICE which is not (IMO) appropriate, since
function returns TRUE/FALSE on success/failure.
Expected result:
----------------
I expect mysqli::ping() just to return TRUE/FALSE.
When I use $variable without initialisation, I get E_NOTICE and so if I
want to avoid getting E_NOTICE, I use isset($variable) before using
$variable itself.
I expected same behaviour from mysqli::ping() - just let me know if
connection is dead or alive and do not mess with my logs too, it is
redundant without advantage.
Actual result:
--------------
mysqli::ping() returns TRUE/FALSE, but it also sends E_NOTICE
"mysqli::ping(): send of 5 bytes failed with errno=32 Broken pipe".
--
Edit bug report at https://bugs.php.net/bug.php?id=67637&edit=1
--