]> granicus.if.org Git - php/commitdiff
- Hackish but working parameter parsing, no longer using
authorDavid Coallier <davidc@php.net>
Wed, 25 Jun 2008 08:56:42 +0000 (08:56 +0000)
committerDavid Coallier <davidc@php.net>
Wed, 25 Jun 2008 08:56:42 +0000 (08:56 +0000)
  zend_get* at least

ext/standard/formatted_print.c

index 8dcadfe7a624da3ec47e664ad4086939959ca8f5..54c30438fe2f810e6b236ff0bef725517457a88e 100644 (file)
@@ -760,14 +760,22 @@ PHP_FUNCTION(vfprintf)
        php_stream *stream;
        zval **arg1;
        char *result;
-       int len;
+       int num_args, len;
        
+       /**
+        * Here's the deal, I extract the first resource, it's 
+        * a ressource, then a string and then an array. In theory
+        * the parsing should be "rsa" however, if I do so, the 
+        * Argument number checking in php_formatted_print fails.
+        * I am therefore leaving this check here so I do not break
+        * php_formatted_print
+        */
        if (ZEND_NUM_ARGS() != 3) {
                WRONG_PARAM_COUNT;
        }
        
-       if (zend_get_parameters_ex(1, &arg1)==FAILURE) {
-               RETURN_FALSE;
+       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Z+", &arg1, &num_args) == FAILURE) {
+               return;
        }
        
        php_stream_from_zval(stream, arg1);