summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorGeorg Richter <georg@php.net>2004-02-26 12:24:21 +0000
committerGeorg Richter <georg@php.net>2004-02-26 12:24:21 +0000
commit700bb4dbb446f6abd1b58b5d9e164e6ee0dd96d9 (patch)
tree7069a7a1450baf30e208d1f66dc6188053c731df /ext
parent8e52a1a8a310b473620552bbfed3128a968fe8db (diff)
downloadphp-git-700bb4dbb446f6abd1b58b5d9e164e6ee0dd96d9.tar.gz
prototype fix for mysqli_ping
Diffstat (limited to 'ext')
-rw-r--r--ext/mysqli/mysqli_api.c7
1 files 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;
}
/* }}} */