Req #67637 [Opn->Nab]: mysqli::ping() should not send E_NOTICE

From: Date: Wed, 26 Apr 2017 11:15:29 +0000
Subject: Req #67637 [Opn->Nab]: mysqli::ping() should not send E_NOTICE
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-208804@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=67637&edit=1 ID: 67637 Updated by: fjanisze@php.net Reported by: php dot net at dzubak dot sk Summary: mysqli::ping() should not send E_NOTICE -Status: Open +Status: Not a bug Type: Feature/Change Request Package: MySQLi related Operating System: Linux PHP Version: 5.5.14 Block user comment: N Private report: N New Comment: Thank you for taking the time to report a problem with PHP. Unfortunately you are not using a current version of PHP -- the problem might already be fixed. Please download a new PHP version from http://www.php.net/downloads.php If you are able to reproduce the bug with one of the latest versions of PHP, please change the PHP version on this bug report to the version you tested and change the status back to "Open". Again, thank you for your continued support of PHP. Previous Comments: ------------------------------------------------------------------------ [2014-07-17 07:39:15] php dot net at dzubak dot sk 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 this bug report at https://bugs.php.net/bug.php?id=67637&edit=1

« previous php.bugs (#208804) next »