diff options
Diffstat (limited to 'ext/pgsql/pgsql.c')
-rw-r--r-- | ext/pgsql/pgsql.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index 16a84ffcd8..4ae0ae63ea 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -1343,12 +1343,12 @@ static void php_pgsql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) if (PGG(max_links) != -1 && PGG(num_links) >= PGG(max_links)) { php_error_docref(NULL, E_WARNING, - "Cannot create new link. Too many open links (%pd)", PGG(num_links)); + "Cannot create new link. Too many open links (" ZEND_LONG_FMT ")", PGG(num_links)); goto err; } if (PGG(max_persistent) != -1 && PGG(num_persistent) >= PGG(max_persistent)) { php_error_docref(NULL, E_WARNING, - "Cannot create new link. Too many open persistent links (%pd)", PGG(num_persistent)); + "Cannot create new link. Too many open persistent links (" ZEND_LONG_FMT ")", PGG(num_persistent)); goto err; } @@ -1441,7 +1441,7 @@ static void php_pgsql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) } } if (PGG(max_links) != -1 && PGG(num_links) >= PGG(max_links)) { - php_error_docref(NULL, E_WARNING, "Cannot create new link. Too many open links (%pd)", PGG(num_links)); + php_error_docref(NULL, E_WARNING, "Cannot create new link. Too many open links (" ZEND_LONG_FMT ")", PGG(num_links)); goto err; } @@ -2681,7 +2681,7 @@ PHP_FUNCTION(pg_fetch_result) } } else { if (row < 0 || row >= PQntuples(pgsql_result)) { - php_error_docref(NULL, E_WARNING, "Unable to jump to row %pd on PostgreSQL result index %pd", + 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)); RETURN_FALSE; } @@ -2772,7 +2772,7 @@ static void php_pgsql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, zend_long result_ if (use_row) { if (row < 0 || row >= PQntuples(pgsql_result)) { - php_error_docref(NULL, E_WARNING, "Unable to jump to row %pd on PostgreSQL result index %pd", + 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)); RETURN_FALSE; } @@ -2858,7 +2858,7 @@ static void php_pgsql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, zend_long result_ fcc.object = Z_OBJ_P(return_value); if (zend_call_function(&fci, &fcc) == FAILURE) { - zend_throw_exception_ex(zend_ce_exception, 0, "Could not execute %s::%s()", ce->name, ce->constructor->common.function_name); + zend_throw_exception_ex(zend_ce_exception, 0, "Could not execute %s::%s()", ZSTR_VAL(ce->name), ZSTR_VAL(ce->constructor->common.function_name)); } else { zval_ptr_dtor(&retval); } @@ -2866,7 +2866,7 @@ static void php_pgsql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, zend_long result_ efree(fci.params); } } else if (ctor_params) { - zend_throw_exception_ex(zend_ce_exception, 0, "Class %s does not have a constructor hence you cannot use ctor_params", ce->name); + zend_throw_exception_ex(zend_ce_exception, 0, "Class %s does not have a constructor hence you cannot use ctor_params", ZSTR_VAL(ce->name)); } } } @@ -2964,7 +2964,7 @@ PHP_FUNCTION(pg_fetch_all_columns) num_fields = PQnfields(pgsql_result); if (colno >= (zend_long)num_fields || colno < 0) { - php_error_docref(NULL, E_WARNING, "Invalid column number '%pd'", colno); + php_error_docref(NULL, E_WARNING, "Invalid column number '" ZEND_LONG_FMT "'", colno); RETURN_FALSE; } @@ -3048,7 +3048,7 @@ static void php_pgsql_data_info(INTERNAL_FUNCTION_PARAMETERS, int entry_type) } } else { if (row < 0 || row >= PQntuples(pgsql_result)) { - php_error_docref(NULL, E_WARNING, "Unable to jump to row %pd on PostgreSQL result index %pd", + 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)); RETURN_FALSE; } @@ -3333,7 +3333,7 @@ PHP_FUNCTION(pg_lo_unlink) } else if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, argc, "rl", &pgsql_link, &oid_long) == SUCCESS) { - if (oid_long <= InvalidOid) { + if (oid_long <= (zend_long)InvalidOid) { php_error_docref(NULL, E_NOTICE, "Invalid OID specified"); RETURN_FALSE; } @@ -3353,7 +3353,7 @@ PHP_FUNCTION(pg_lo_unlink) } else if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, argc, "l", &oid_long) == SUCCESS) { - if (oid_long <= InvalidOid) { + if (oid_long <= (zend_long)InvalidOid) { php_error_docref(NULL, E_NOTICE, "Invalid OID is specified"); RETURN_FALSE; } @@ -3407,7 +3407,7 @@ PHP_FUNCTION(pg_lo_open) } else if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, argc, "rls", &pgsql_link, &oid_long, &mode_string, &mode_strlen) == SUCCESS) { - if (oid_long <= InvalidOid) { + if (oid_long <= (zend_long)InvalidOid) { php_error_docref(NULL, E_NOTICE, "Invalid OID specified"); RETURN_FALSE; } @@ -3427,7 +3427,7 @@ PHP_FUNCTION(pg_lo_open) } else if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, argc, "ls", &oid_long, &mode_string, &mode_strlen) == SUCCESS) { - if (oid_long <= InvalidOid) { + if (oid_long <= (zend_long)InvalidOid) { php_error_docref(NULL, E_NOTICE, "Invalid OID specified"); RETURN_FALSE; } @@ -3582,11 +3582,11 @@ PHP_FUNCTION(pg_lo_write) if (argc > 2) { if (z_len > (zend_long)str_len) { - php_error_docref(NULL, E_WARNING, "Cannot write more than buffer size %d. Tried to write %pd", str_len, z_len); + php_error_docref(NULL, E_WARNING, "Cannot write more than buffer size %d. Tried to write " ZEND_LONG_FMT, str_len, z_len); RETURN_FALSE; } if (z_len < 0) { - php_error_docref(NULL, E_WARNING, "Buffer size must be larger than 0, but %pd was specified", z_len); + php_error_docref(NULL, E_WARNING, "Buffer size must be larger than 0, but " ZEND_LONG_FMT " was specified", z_len); RETURN_FALSE; } len = z_len; @@ -3599,7 +3599,7 @@ PHP_FUNCTION(pg_lo_write) RETURN_FALSE; } - if ((nbytes = lo_write((PGconn *)pgsql->conn, pgsql->lofd, str, len)) == -1) { + if ((nbytes = lo_write((PGconn *)pgsql->conn, pgsql->lofd, str, len)) == (size_t)-1) { RETURN_FALSE; } @@ -3738,7 +3738,7 @@ PHP_FUNCTION(pg_lo_export) /* allow string to handle large OID value correctly */ if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, argc, "rlp", &pgsql_link, &oid_long, &file_out, &name_len) == SUCCESS) { - if (oid_long <= InvalidOid) { + if (oid_long <= (zend_long)InvalidOid) { php_error_docref(NULL, E_NOTICE, "Invalid OID specified"); RETURN_FALSE; } @@ -3757,7 +3757,7 @@ PHP_FUNCTION(pg_lo_export) } else if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, argc, "lp", &oid_long, &file_out, &name_len) == SUCCESS) { - if (oid_long <= InvalidOid) { + if (oid_long <= (zend_long)InvalidOid) { php_error_docref(NULL, E_NOTICE, "Invalid OID specified"); RETURN_FALSE; } @@ -3789,7 +3789,7 @@ PHP_FUNCTION(pg_lo_export) else if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, argc, "lpr", &oid_long, &file_out, &name_len, &pgsql_link) == SUCCESS) { php_error_docref(NULL, E_NOTICE, "Old API is used"); - if (oid_long <= InvalidOid) { + if (oid_long <= (zend_long)InvalidOid) { php_error_docref(NULL, E_NOTICE, "Invalid OID specified"); RETURN_FALSE; } @@ -6528,7 +6528,7 @@ PHP_FUNCTION(pg_convert) } /* }}} */ -static int do_exec(smart_str *querystr, int expect, PGconn *pg_link, zend_ulong opt) /* {{{ */ +static int do_exec(smart_str *querystr, ExecStatusType expect, PGconn *pg_link, zend_ulong opt) /* {{{ */ { if (opt & PGSQL_DML_ASYNC) { if (PQsendQuery(pg_link, ZSTR_VAL(querystr->s))) { |