summaryrefslogtreecommitdiff
path: root/ext/pgsql/pgsql.c
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2009-01-13 19:08:08 +0000
committerIlia Alshanetsky <iliaa@php.net>2009-01-13 19:08:08 +0000
commitdfa86ccf73e70f7f6cb719ef1816fc2d2a5e5193 (patch)
treec1f4da92f57e2a0f9c181c00e5ff9ed78e7931f0 /ext/pgsql/pgsql.c
parent5ca19085bb29899042f38f84febf5b6103df3a30 (diff)
downloadphp-git-dfa86ccf73e70f7f6cb719ef1816fc2d2a5e5193.tar.gz
Improved parameter handling
Diffstat (limited to 'ext/pgsql/pgsql.c')
-rw-r--r--ext/pgsql/pgsql.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c
index dede563ae6..a4a5b0d2a9 100644
--- a/ext/pgsql/pgsql.c
+++ b/ext/pgsql/pgsql.c
@@ -2422,13 +2422,13 @@ static void php_pgsql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, long result_type,
zend_class_entry *ce = NULL;
if (into_object) {
- char *class_name;
+ char *class_name = NULL;
int class_name_len;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|z!sz", &result, &zrow, &class_name, &class_name_len, &ctor_params) == FAILURE) {
return;
- }
- if (ZEND_NUM_ARGS() < 3) {
+ }
+ if (!class_name) {
ce = zend_standard_class_def;
} else {
ce = zend_fetch_class(class_name, class_name_len, ZEND_FETCH_CLASS_AUTO TSRMLS_CC);