tony2001 Wed Sep 7 04:58:35 2005 EDT
Modified files:
/php-src/ext/oci8 oci8_interface.c
Log:
don't try to fetch resource when there is 0 args
http://cvs.php.net/diff.php/php-src/ext/oci8/oci8_interface.c?r1=1.3&r2=1.4&ty=u
Index: php-src/ext/oci8/oci8_interface.c
diff -u php-src/ext/oci8/oci8_interface.c:1.3
php-src/ext/oci8/oci8_interface.c:1.4
--- php-src/ext/oci8/oci8_interface.c:1.3 Tue Sep 6 17:42:26 2005
+++ php-src/ext/oci8/oci8_interface.c Wed Sep 7 04:58:32 2005
@@ -25,7 +25,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: oci8_interface.c,v 1.3 2005/09/06 21:42:26 tony2001 Exp $ */
+/* $Id: oci8_interface.c,v 1.4 2005/09/07 08:58:32 tony2001 Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -1499,7 +1499,11 @@
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) {
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php