Re: cvs: php4 /ext/mysql php_mysql.c
| From: | Sterling Hughes | Date: | Thu, 26 Apr 2001 06:53:24 +0000 |
| Subject: | Re: cvs: php4 /ext/mysql php_mysql.c | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-5297@lists.php.net to get a copy of this message | ||
On Thu, 26 Apr 2001, Matt McClanahan wrote:
> On Thu, Apr 26, 2001 at 07:00:10AM -0400, Sean R. Bright wrote:
>
> > I should think that should be:
> >
> > if (ZEND_NUM_ARGS() != expected_args) {
> >
> > rather than less than.
> >
> > Sean
>
> Then mysql_fetch_object and mysql_fetch_array would require two args,
> when they're supposed to accept either one or two.
>
> I'll be the first to admit it's a lousy soluiton, but.. there it is.
>
why not:
if (ZEND_NUM_ARGS() < 1 || ZEND_NUM_ARGS() > 2) {
WRONG_PARAM_COUNT;
}
??
> > > + if (ZEND_NUM_ARGS() > expected_args) {
> > > + WRONG_PARAM_COUNT;
> > > + }
> > > +
>
> Matt
>
>