projects
/
php
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
18e2594
)
don't try to fetch resource when there is 0 args
author
Antony Dovgal
<tony2001@php.net>
Wed, 7 Sep 2005 08:58:32 +0000
(08:58 +0000)
committer
Antony Dovgal
<tony2001@php.net>
Wed, 7 Sep 2005 08:58:32 +0000
(08:58 +0000)
ext/oci8/oci8_interface.c
patch
|
blob
|
history
diff --git
a/ext/oci8/oci8_interface.c
b/ext/oci8/oci8_interface.c
index 70570289469ed4e6a151e5f7e36f97d6b9906377..1659aa3f0fc72b13dc640601cfb4ae0a4292350b 100644
(file)
--- 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) {