]> granicus.if.org Git - php/commitdiff
prototype fix for mysqli_ping
authorGeorg Richter <georg@php.net>
Thu, 26 Feb 2004 12:24:21 +0000 (12:24 +0000)
committerGeorg Richter <georg@php.net>
Thu, 26 Feb 2004 12:24:21 +0000 (12:24 +0000)
ext/mysqli/mysqli_api.c

index e928171c20d0bd8942f766a199d7a5351ae8dbf0..57d7e8094319e25a058ea7398412d93b39265f11 100644 (file)
@@ -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;
 }
 /* }}} */