Hi,

On Mon, 2010-04-12 at 08:25 +0000, Pierre Joye wrote:
> -     switch (ZEND_NUM_ARGS()) {
> -     case 2:
> -             if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", 
> &arg1, &arg2) == FAILURE) {
> -                     RETURN_FALSE;
> -             }
> -             break;
> -     default:
> -             WRONG_PARAM_COUNT;
> -             /* NOTREACHED */
> -             break;
> +     if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &arg1, 
> &arg2) == FAILURE) {
> +             RETURN_FALSE;
>       }

This is a small change to the behavior: With the old code it would have
returned NULL on wrong param count and FALSE in case the parsing failed,
with the new code it returns FALSE in both cases.

I'd prefer NULL in both cases as that's how we react usually (see
<http://php.net/functions.internal>)

Doubt it makes any difference in real life though.


Other than that: No test case possible for this new function?

johannes


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

Reply via email to