Re: Re: GMP and empty()

From: Date: Mon, 30 Dec 2013 13:45:01 +0000
Subject: Re: Re: GMP and empty()
References: 1 2 3 4 5 6  Groups: php.internals 
Request: Send a blank email to internals+get-70919@lists.php.net to get a copy of this message
On Mon, Dec 30, 2013 at 11:23 AM, Yasuo Ohgaki <yohgaki@ohgaki.net> wrote: > Hi all, > > On Mon, Dec 30, 2013 at 7:02 PM, Yasuo Ohgaki <yohgaki@ohgaki.net> wrote: > > > Apparently, we need type check and/or float support in GMP. > > > > We need error instead of type check. > Possible patch is > > [yohgaki@dev php-src]$ git diff ext/gmp/ > diff --git a/ext/gmp/gmp.c b/ext/gmp/gmp.c > index 8835f05..a64e486 100644 > --- a/ext/gmp/gmp.c > +++ b/ext/gmp/gmp.c > @@ -1036,6 +1036,7 @@ ZEND_FUNCTION(gmp_init) > > INIT_GMP_RETVAL(gmpnumber); > if (convert_to_gmp(gmpnumber, number_arg, base TSRMLS_CC) == > FAILURE) { > + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Bad number > supplied"); > zval_dtor(return_value); > RETURN_FALSE; > } > > Any comments? > I added an error check for the 5.6 branch ( http://git.php.net/?p=php-src.git;a=commitdiff;h=5408f1e5a68fead0057c95df57cfb1ff0cc3fe81). Don't know why this particular branch was was not checked previously. Nikita

« previous php.internals (#70919) next »