On Jan 25, 2008 2:31 AM, Ilia Alshanetsky <[EMAIL PROTECTED]> wrote:
> iliaa           Fri Jan 25 01:31:11 2008 UTC
>
>   Modified files:              (Branch: PHP_5_3)
>     /php-src/ext/standard       string.c
>   Log:
>
>   Adjust new chr() param handling to address chr("") calls
>
> http://cvs.php.net/viewvc.cgi/php-src/ext/standard/string.c?r1=1.445.2.14.2.69.2.12&r2=1.445.2.14.2.69.2.13&diff_format=u
> Index: php-src/ext/standard/string.c
> diff -u php-src/ext/standard/string.c:1.445.2.14.2.69.2.12 
> php-src/ext/standard/string.c:1.445.2.14.2.69.2.13
> --- php-src/ext/standard/string.c:1.445.2.14.2.69.2.12  Tue Jan 22 01:34:24 
> 2008
> +++ php-src/ext/standard/string.c       Fri Jan 25 01:31:10 2008
> @@ -18,7 +18,7 @@
>     +----------------------------------------------------------------------+
>   */
>
> -/* $Id: string.c,v 1.445.2.14.2.69.2.12 2008/01/22 01:34:24 iliaa Exp $ */
> +/* $Id: string.c,v 1.445.2.14.2.69.2.13 2008/01/25 01:31:10 iliaa Exp $ */
>
>  /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
>
> @@ -2604,9 +2604,14 @@
>         long c;
>         char temp[2];
>
> -       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &c) == 
> FAILURE) {
> -               return;
> +       if (ZEND_NUM_ARGS() != 1) {
> +               WRONG_PARAM_COUNT;
>         }
> +
> +       if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() 
> TSRMLS_CC, "l", &c) == FAILURE) {
> +               c = 0;
> +       }

This definitely looks wrong. If I pass an object or whatever it won't
throw any errors.

-Hannes

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

Reply via email to