iliaa           Tue Jan 13 19:08:37 2009 UTC

  Modified files:              
    /php-src/ext/pgsql  pgsql.c 
  Log:
  
  MFB: Improved parameter handling
  
http://cvs.php.net/viewvc.cgi/php-src/ext/pgsql/pgsql.c?r1=1.396&r2=1.397&diff_format=u
Index: php-src/ext/pgsql/pgsql.c
diff -u php-src/ext/pgsql/pgsql.c:1.396 php-src/ext/pgsql/pgsql.c:1.397
--- php-src/ext/pgsql/pgsql.c:1.396     Wed Dec 31 11:12:34 2008
+++ php-src/ext/pgsql/pgsql.c   Tue Jan 13 19:08:37 2009
@@ -20,7 +20,7 @@
    +----------------------------------------------------------------------+
  */
  
-/* $Id: pgsql.c,v 1.396 2008/12/31 11:12:34 sebastian Exp $ */
+/* $Id: pgsql.c,v 1.397 2009/01/13 19:08:37 iliaa Exp $ */
 
 #include <stdlib.h>
 
@@ -2412,13 +2412,13 @@
        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);



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to