From 700bb4dbb446f6abd1b58b5d9e164e6ee0dd96d9 Mon Sep 17 00:00:00 2001 From: Georg Richter Date: Thu, 26 Feb 2004 12:24:21 +0000 Subject: [PATCH] prototype fix for mysqli_ping --- ext/mysqli/mysqli_api.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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; } /* }}} */ -- 2.50.1