From: Antony Dovgal Date: Wed, 7 Sep 2005 08:58:32 +0000 (+0000) Subject: don't try to fetch resource when there is 0 args X-Git-Tag: RELEASE_0_9_0~275 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ec8531cfb1cf6719561986ccfdd630928693542f;p=php don't try to fetch resource when there is 0 args --- diff --git a/ext/oci8/oci8_interface.c b/ext/oci8/oci8_interface.c index 7057028946..1659aa3f0f 100644 --- a/ext/oci8/oci8_interface.c +++ b/ext/oci8/oci8_interface.c @@ -1499,7 +1499,11 @@ PHP_FUNCTION(oci_error) text *sqltext = NULL; #endif - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|r", &arg) == SUCCESS) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|r", &arg) == FAILURE) { + return; + } + + if (ZEND_NUM_ARGS() > 0) { statement = (php_oci_statement *) zend_fetch_resource(&arg TSRMLS_CC, -1, NULL, NULL, 1, le_statement); if (statement) {