diff options
author | Thies C. Arntzen <thies@php.net> | 1999-09-23 10:23:12 +0000 |
---|---|---|
committer | Thies C. Arntzen <thies@php.net> | 1999-09-23 10:23:12 +0000 |
commit | 820adaddf192e744c52230cc7ca8386bf833aab4 (patch) | |
tree | ea941dfdae9226567899324427c293d41b06d75f /ext/oracle | |
parent | ed731497fe14fa8ad71093f4e998f6cf3d937fe9 (diff) | |
download | php-git-820adaddf192e744c52230cc7ca8386bf833aab4.tar.gz |
Ora_Fetch_Into now resets the returned array in all cases
Diffstat (limited to 'ext/oracle')
-rw-r--r-- | ext/oracle/oracle.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/ext/oracle/oracle.c b/ext/oracle/oracle.c index 982baabdbd..0efdc278f2 100644 --- a/ext/oracle/oracle.c +++ b/ext/oracle/oracle.c @@ -1125,22 +1125,23 @@ PHP_FUNCTION(ora_fetch_into) RETURN_FALSE; } - if (arr->type != IS_ARRAY){ - if (array_init(arr) == FAILURE){ - php_error(E_WARNING, "Can't convert to type Array"); - RETURN_FALSE; - } - } - if (ofetch(&cursor->cda)) { if (cursor->cda.rc != NO_DATA_FOUND) { - php_error(E_WARNING, "Ora_Fetch_Into failed (%s)", - ora_error(&cursor->cda)); + php_error(E_WARNING, "Ora_Fetch_Into failed (%s)",ora_error(&cursor->cda)); } RETURN_FALSE; } cursor->fetched++; + if (arr->type != IS_ARRAY){ + pval_destructor(arr); + if (array_init(arr) == FAILURE){ + php_error(E_WARNING, "Can't convert to type Array"); + RETURN_FALSE; + } + } + zend_hash_internal_pointer_reset(arr->value.ht); + for (i = 0; i < cursor->ncols; i++) { if (cursor->columns[i].col_retcode == 1405) { |