1
0
mirror of https://github.com/danog/ext-pq.git synced 2025-01-22 13:51:20 +01:00

remove superfluous error text in pgres errors

This commit is contained in:
Michael Wallner 2013-01-21 18:10:59 +01:00
parent a009113642
commit f96bf1b561

View File

@ -799,7 +799,11 @@ static PHP_METHOD(pqconn, poll) {
if (obj->conn) {
if (obj->poller) {
RETURN_LONG(obj->poller(obj->conn));
if (obj->poller == PQconsumeInput) {
RETURN_LONG(obj->poller(obj->conn) * PGRES_POLLING_OK);
} else {
RETURN_LONG(obj->poller(obj->conn));
}
} else {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "No asynchronous operation active");
}
@ -816,7 +820,7 @@ static STATUS php_pqres_success(PGresult *res TSRMLS_DC)
case PGRES_BAD_RESPONSE:
case PGRES_NONFATAL_ERROR:
case PGRES_FATAL_ERROR:
php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s: %s", PQresStatus(PQresultStatus(res)), PQresultErrorMessage(res));
php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", PQresultErrorMessage(res));
return FAILURE;
default:
return SUCCESS;