summaryrefslogtreecommitdiff
path: root/ext/pgsql/pgsql.c
diff options
context:
space:
mode:
authorAndrey Hristov <andrey@php.net>2003-08-28 21:00:24 +0000
committerAndrey Hristov <andrey@php.net>2003-08-28 21:00:24 +0000
commitb2eb454171b8d8050f7e68c6fb342ae29cf29819 (patch)
tree2305814179a570a884b504a04f09a9ba5d9e02af /ext/pgsql/pgsql.c
parentacb65b7c0a2a9c3c5e6ce60bd0e509a643180227 (diff)
downloadphp-git-b2eb454171b8d8050f7e68c6fb342ae29cf29819.tar.gz
format string fixes
Diffstat (limited to 'ext/pgsql/pgsql.c')
-rw-r--r--ext/pgsql/pgsql.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c
index 9d0f57e704..58737b99cb 100644
--- a/ext/pgsql/pgsql.c
+++ b/ext/pgsql/pgsql.c
@@ -1364,7 +1364,8 @@ PHP_FUNCTION(pg_fetch_result)
convert_to_long_ex(row);
pgsql_row = Z_LVAL_PP(row);
if (pgsql_row < 0 || pgsql_row >= PQntuples(pgsql_result)) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to jump to row %d on PostgreSQL result index %d", Z_LVAL_PP(row), Z_LVAL_PP(result));
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to jump to row %ld on PostgreSQL result index %ld",
+ Z_LVAL_PP(row), Z_LVAL_PP(result));
RETURN_FALSE;
}
}
@@ -1447,7 +1448,8 @@ static void php_pgsql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type)
pgsql_row = Z_LVAL_PP(row);
pg_result->row = pgsql_row;
if (pgsql_row < 0 || pgsql_row >= PQntuples(pgsql_result)) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to jump to row %d on PostgreSQL result index %d", Z_LVAL_PP(row), Z_LVAL_PP(result));
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to jump to row %ld on PostgreSQL result index %ld",
+ Z_LVAL_PP(row), Z_LVAL_PP(result));
RETURN_FALSE;
}
} else {
@@ -1623,7 +1625,8 @@ static void php_pgsql_data_info(INTERNAL_FUNCTION_PARAMETERS, int entry_type)
convert_to_long_ex(row);
pgsql_row = Z_LVAL_PP(row);
if (pgsql_row < 0 || pgsql_row >= PQntuples(pgsql_result)) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to jump to row %d on PostgreSQL result index %d", Z_LVAL_PP(row), Z_LVAL_PP(result));
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to jump to row %ld on PostgreSQL result index %ld",
+ Z_LVAL_PP(row), Z_LVAL_PP(result));
RETURN_FALSE;
}
}
@@ -2139,11 +2142,12 @@ PHP_FUNCTION(pg_lo_write)
if (argc > 2) {
convert_to_long_ex(z_len);
if (Z_LVAL_PP(z_len) > Z_STRLEN_PP(str)) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot write more than buffer size %d. Tried to write %d", Z_LVAL_PP(str), Z_LVAL_PP(z_len));
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot write more than buffer size %d. Tried to write %ld",
+ Z_STRLEN_PP(str), Z_LVAL_PP(z_len));
RETURN_FALSE;
}
if (Z_LVAL_PP(z_len) < 0) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Buffer size must be larger than 0, but %d was specified", Z_LVAL_PP(str), Z_LVAL_PP(z_len));
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Buffer size must be larger than 0, but %d was specified", Z_STRLEN_PP(str));
RETURN_FALSE;
}
len = Z_LVAL_PP(z_len);