cvs: php4 /ext/oci8 oci8.c
| From: | Andy Sautins | Date: | Tue, 11 Sep 2001 23:15:23 +0000 |
| Subject: | cvs: php4 /ext/oci8 oci8.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-7408@lists.php.net to get a copy of this message | ||
asautins Tue Sep 11 19:15:23 2001 EDT
Modified files:
/php4/ext/oci8 oci8.c
Log:
Collection fix. Fix core dump when accessing an element that is
not in the collection.
Index: php4/ext/oci8/oci8.c
diff -u php4/ext/oci8/oci8.c:1.152 php4/ext/oci8/oci8.c:1.153
--- php4/ext/oci8/oci8.c:1.152 Tue Sep 11 17:03:58 2001
+++ php4/ext/oci8/oci8.c Tue Sep 11 19:15:18 2001
@@ -20,7 +20,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: oci8.c,v 1.152 2001/09/11 21:03:58 asautins Exp $ */
+/* $Id: oci8.c,v 1.153 2001/09/11 23:15:18 asautins Exp $ */
/* TODO list:
*
@@ -620,7 +620,7 @@
php_info_print_table_start();
php_info_print_table_row(2, "OCI8 Support", "enabled");
- php_info_print_table_row(2, "Revision", "$Revision: 1.152 $");
+ php_info_print_table_row(2, "Revision", "$Revision: 1.153 $");
#ifndef PHP_WIN32
php_info_print_table_row(2, "Oracle Version", PHP_OCI8_VERSION );
php_info_print_table_row(2, "Compile-time ORACLE_HOME", PHP_OCI8_DIR );
@@ -4636,6 +4636,11 @@
if (connection->error) {
oci_error(connection->pError, "OCICollGetElem", connection->error);
+ RETURN_FALSE;
+ }
+
+ // Return false if value does not exist at that location
+ if(exists == 0) {
RETURN_FALSE;
}