diff options
| -rw-r--r-- | ext/mysqli/mysqli_api.c | 7 |
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; } /* }}} */ |
