cvs: /php3 ChangeLog /php3/functions oracle.c
| From: | Thies C . Arntzen | Date: | Thu, 23 Sep 1999 10:24:57 +0000 |
| Subject: | cvs: /php3 ChangeLog /php3/functions oracle.c | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-11226@lists.php.net to get a copy of this message | ||
thies Thu Sep 23 06:24:57 1999 EDT
Modified files:
/php3 ChangeLog
/php3/functions oracle.c
Log:
Ora_Fetch_Into now resets the returned array in all cases
Index: php3/ChangeLog
diff -u php3/ChangeLog:1.770 php3/ChangeLog:1.771
--- php3/ChangeLog:1.770 Wed Sep 22 16:23:10 1999
+++ php3/ChangeLog Thu Sep 23 06:24:56 1999
@@ -2,6 +2,7 @@
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
???? ??, 1999, Version 3.0.13
+Ora_Fetch_Into now resets the returned array in all cases (Thies)
- Fixed SEGV in mcal make_event_object() (Andrew Skalski)
- Fixed memory leak in pdf_open_memory_image() (Uwe Steinmann)
- Added FTP support (Andrew Skalski)
Index: php3/functions/oracle.c
diff -u php3/functions/oracle.c:1.112 php3/functions/oracle.c:1.113
--- php3/functions/oracle.c:1.112 Mon Jul 12 09:27:16 1999
+++ php3/functions/oracle.c Thu Sep 23 06:24:56 1999
@@ -779,6 +779,7 @@
/* }}} */
/* {{{ proto int ora_parse(int cursor, string sql_statement [, int defer])
+
Parse an Oracle SQL statement */
void php3_Ora_Parse(INTERNAL_FUNCTION_PARAMETERS)
{
@@ -833,6 +834,7 @@
}
RETURN_TRUE;
}
+
/* }}} */
/* {{{ proto int ora_bind(int cursor, string php_variable_name, string sql_parameter_name, int
length [, int type])
@@ -1186,12 +1188,6 @@
RETURN_FALSE;
}
- if (arr->type != IS_ARRAY){
- if (array_init(arr) == FAILURE){
- php3_error(E_WARNING, "Can't convert to type Array");
- RETURN_FALSE;
- }
- }
if (ofetch(&cursor->cda)) {
if (cursor->cda.rc != NO_DATA_FOUND) {
@@ -1201,6 +1197,16 @@
RETURN_FALSE;
}
cursor->fetched++;
+
+ if (arr->type != IS_ARRAY){
+ php3tls_pval_destructor(arr);
+ if (array_init(arr) == FAILURE){
+ php3_error(E_WARNING, "Can't convert to type Array");
+ RETURN_FALSE;
+ }
+ }
+
+ _php3_hash_internal_pointer_reset(array->value.ht);
#if PHP_API_VERSION < 19990421
tmp = emalloc(sizeof(pval));