From: Andy Sautins Date: Tue, 11 Sep 2001 23:15:18 +0000 (+0000) Subject: Collection fix. Fix core dump when accessing an element that is X-Git-Tag: PRE_SUBST_Z_MACROS~112 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5abba5ee0ebcba55450f5106902a584c98e76258;p=php Collection fix. Fix core dump when accessing an element that is not in the collection. --- diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c index 747a02625b..c2dbc1d2ee 100644 --- a/ext/oci8/oci8.c +++ b/ext/oci8/oci8.c @@ -4638,6 +4638,11 @@ PHP_FUNCTION(ocicollgetelem) oci_error(connection->pError, "OCICollGetElem", connection->error); RETURN_FALSE; } + + // Return false if value does not exist at that location + if(exists == 0) { + RETURN_FALSE; + } switch (coll->element_typecode) { case OCI_TYPECODE_DATE: