From: Georg Richter Date: Thu, 26 Feb 2004 12:24:21 +0000 (+0000) Subject: prototype fix for mysqli_ping X-Git-Tag: RELEASE_0_2_0~147 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=700bb4dbb446f6abd1b58b5d9e164e6ee0dd96d9;p=php prototype fix for mysqli_ping --- diff --git a/ext/mysqli/mysqli_api.c b/ext/mysqli/mysqli_api.c index e928171c20..57d7e80943 100644 --- a/ext/mysqli/mysqli_api.c +++ b/ext/mysqli/mysqli_api.c @@ -1142,7 +1142,7 @@ PHP_FUNCTION(mysqli_param_count) } /* }}} */ -/* {{{ proto int mysqli_ping(object link) +/* {{{ proto bool mysqli_ping(object link) Ping a server connection or reconnect if there is no connection */ PHP_FUNCTION(mysqli_ping) { @@ -1156,7 +1156,10 @@ PHP_FUNCTION(mysqli_ping) MYSQLI_FETCH_RESOURCE(mysql, MYSQL *, &mysql_link, "mysqli_link"); rc = mysql_ping(mysql); MYSQLI_REPORT_MYSQL_ERROR(mysql); - RETURN_LONG(rc); + if (rc) { + RETURN_FALSE; + } + RETURN_TRUE; } /* }}} */