diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index 2eb2d6b306e7..a391a3753aee 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -1923,8 +1923,7 @@ PHP_FUNCTION(pg_fetch_result) RETURN_THROWS(); } if (row >= PQntuples(pgsql_result)) { - php_error_docref(NULL, E_WARNING, "Unable to jump to row " ZEND_LONG_FMT " on PostgreSQL result index " ZEND_LONG_FMT, - row, Z_LVAL_P(result)); + php_error_docref(NULL, E_WARNING, "Unable to jump to row " ZEND_LONG_FMT, row); RETURN_FALSE; } pgsql_row = (int)row; @@ -1972,8 +1971,7 @@ static bool php_pgsql_fetch_hash(zval *return_value, const zval *result, zend_lo if (!row_is_null) { if (row >= PQntuples(pgsql_result)) { - php_error_docref(NULL, E_WARNING, "Unable to jump to row " ZEND_LONG_FMT " on PostgreSQL result index " ZEND_LONG_FMT, - row, Z_LVAL_P(result)); + php_error_docref(NULL, E_WARNING, "Unable to jump to row " ZEND_LONG_FMT, row); return false; } pgsql_row = (int)row; @@ -2312,8 +2310,7 @@ static void php_pgsql_data_info(INTERNAL_FUNCTION_PARAMETERS, int entry_type, bo RETURN_THROWS(); } if (row >= PQntuples(pgsql_result)) { - php_error_docref(NULL, E_WARNING, "Unable to jump to row " ZEND_LONG_FMT " on PostgreSQL result index " ZEND_LONG_FMT, - row, Z_LVAL_P(result)); + php_error_docref(NULL, E_WARNING, "Unable to jump to row " ZEND_LONG_FMT, row); RETURN_FALSE; } pgsql_row = (int)row; diff --git a/ext/pgsql/tests/pg_error_message_text.phpt b/ext/pgsql/tests/pg_error_message_text.phpt new file mode 100644 index 000000000000..99f31349c007 --- /dev/null +++ b/ext/pgsql/tests/pg_error_message_text.phpt @@ -0,0 +1,39 @@ +--TEST-- +The row diagnostics print no object address +--EXTENSIONS-- +pgsql +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Warning: pg_fetch_result(): Unable to jump to row 99 in %s on line %d +bool(false) + +Warning: pg_fetch_row(): Unable to jump to row 99 in %s on line %d +bool(false) + +Warning: pg_field_prtlen(): Unable to jump to row 99 in %s on line %d +bool(false) + +Warning: pg_field_is_null(): Unable to jump to row 99 in %s on line %d +bool(false)