diff options
author | Anatol Belski <ab@php.net> | 2015-07-21 12:27:50 +0200 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2015-07-21 12:27:50 +0200 |
commit | b148ef44965651fcbe93e8ee35a14edc087ef17c (patch) | |
tree | f5c53fb3d448d0174610d077e0bf3c8bd76834b2 /ext/pgsql/pgsql.c | |
parent | ad8a73dd55c087de465ad80e8715611693bb1460 (diff) | |
parent | 6065b29fe41f09e01dd06ba21980e0344f13230c (diff) | |
download | php-git-b148ef44965651fcbe93e8ee35a14edc087ef17c.tar.gz |
Merge branch 'master' into PHP-7.0.0
* master: (204 commits)
Reverted ad4533fdbabcc3e545277e30023b2fdce16297a0
update UPGRADING
updated NEWS
fix comment
libwebp support for linux
Replaced libvpx by libwebp (first draft; Windows only)
update news with bug #70022
Change E_ERROR and some E_WARNING to E_RECOVERABLE_ERROR.
Add tests for json_last_error()/json_last_error_msg() failures
updated NEWS
updated NEWS
Exclude opcache from a few opcode related tests
updated NEWS
updated NEWS
Fix #66387: Stack overflow with imagefilltoborder
Fix various Windows issues (e.g. dir separators)
Remove bogus exception_save() from FETCH_CLASS
Fix readline/libedit build
Do not use readline when not having a tty This is important for e.g. run-tests.php
Add show_unexecuted option to phpdbg_end_oplog()
...
Conflicts:
Zend/tests/temporary_cleaning_001.phpt
Zend/tests/temporary_cleaning_003.phpt
Zend/tests/temporary_cleaning_004.phpt
Zend/tests/temporary_cleaning_005.phpt
Zend/zend_compile.c
Zend/zend_compile.h
sapi/phpdbg/phpdbg_opcode.c
Diffstat (limited to 'ext/pgsql/pgsql.c')
-rw-r--r-- | ext/pgsql/pgsql.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index 9282d48364..1172682bbc 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -5803,7 +5803,6 @@ static int php_pgsql_add_quotes(zval *src, zend_bool should_free) PHP_PGSQL_API int php_pgsql_convert(PGconn *pg_link, const char *table_name, const zval *values, zval *result, zend_ulong opt) { zend_string *field = NULL; - zend_ulong num_idx = -1; zval meta, *def, *type, *not_null, *has_default, *is_enum, *val, new_val; int err = 0, skip_field; php_pgsql_data_type data_type; @@ -5824,7 +5823,7 @@ PHP_PGSQL_API int php_pgsql_convert(PGconn *pg_link, const char *table_name, con return FAILURE; } - ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(values), num_idx, field, val) { + ZEND_HASH_FOREACH_STR_KEY_VAL(Z_ARRVAL_P(values), field, val) { skip_field = 0; ZVAL_NULL(&new_val); @@ -6550,7 +6549,6 @@ PHP_PGSQL_API int php_pgsql_insert(PGconn *pg_link, const char *table, zval *var char *tmp; smart_str querystr = {0}; int ret = FAILURE; - zend_ulong num_idx; zend_string *fld; assert(pg_link != NULL); @@ -6579,7 +6577,7 @@ PHP_PGSQL_API int php_pgsql_insert(PGconn *pg_link, const char *table, zval *var build_tablename(&querystr, pg_link, table); smart_str_appends(&querystr, " ("); - ZEND_HASH_FOREACH_KEY(Z_ARRVAL_P(var_array), num_idx, fld) { + ZEND_HASH_FOREACH_STR_KEY(Z_ARRVAL_P(var_array), fld) { if (fld == NULL) { php_error_docref(NULL, E_NOTICE, "Expects associative array for values to be inserted"); goto cleanup; @@ -6748,11 +6746,10 @@ static inline int build_assignment_string(PGconn *pg_link, smart_str *querystr, { char *tmp; char buf[256]; - zend_ulong num_idx; zend_string *fld; zval *val; - ZEND_HASH_FOREACH_KEY_VAL(ht, num_idx, fld, val) { + ZEND_HASH_FOREACH_STR_KEY_VAL(ht, fld, val) { if (fld == NULL) { php_error_docref(NULL, E_NOTICE, "Expects associative array for values to be inserted"); return -1; |