Re: cvs: php4 /ext/standard array.c (fwd)

From: Date: Fri, 05 Oct 2001 20:31:49 +0000
Subject: Re: cvs: php4 /ext/standard array.c (fwd)
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-7668@lists.php.net to get a copy of this message
---------- Forwarded message ---------- Date: Fri, 5 Oct 2001 22:26:49 +0200 From: Edin Kadribasic <edink@proventum.net> To: Jeroen van Wolffelaar <jeroen@A-Eskwadraat.nl> Subject: Re: [PHP-CVS] cvs: php4 /ext/standard array.c Hi Jeroen, Why does this: $a=array(1=>'a', 2=>'b'); $c=array_search ('b', $a); $d=in_array ('b', $a); var_dump($c); var_dump($d); prints: bool(false) bool(true) Edin ----- Original Message ----- From: "Jeroen van Wolffelaar" <jeroen@A-Eskwadraat.nl> To: <php-cvs@lists.php.net> Sent: Friday, October 05, 2001 10:14 PM Subject: [PHP-CVS] cvs: php4 /ext/standard array.c > jeroen Fri Oct 5 16:14:33 2001 EDT > > Modified files: > /php4/ext/standard array.c > Log: > Fix bug 13567 and don't depend on a boolean int-value to be either 1 or 0 > > > Index: php4/ext/standard/array.c > diff -u php4/ext/standard/array.c:1.138 php4/ext/standard/array.c:1.139 > --- php4/ext/standard/array.c:1.138 Fri Oct 5 14:38:51 2001 > +++ php4/ext/standard/array.c Fri Oct 5 16:14:33 2001 > @@ -21,7 +21,7 @@ > +----------------------------------------------------------------------+ > */ > > -/* $Id: array.c,v 1.138 2001/10/05 18:38:51 edink Exp $ */ > +/* $Id: array.c,v 1.139 2001/10/05 20:14:33 jeroen Exp $ */ > > #include "php.h" > #include "php_ini.h" > @@ -1071,7 +1071,7 @@ > zend_hash_internal_pointer_reset_ex(target_hash, &pos); > while(zend_hash_get_current_data_ex(target_hash, (void **)&entry, &pos) == SUCCESS) { > compare_func(&res, *value, *entry TSRMLS_CC); > - if (Z_LVAL(res) == 1) { > + if (Z_LVAL(res)) { > if (behavior==0) { > RETURN_TRUE; > } else { > @@ -1090,11 +1090,7 @@ > zend_hash_move_forward_ex(target_hash, &pos); > } > > - if (behavior == 0) { > - RETURN_FALSE; > - } else { > - return; > - } > + RETURN_FALSE; > } > > > > > > -- > PHP CVS Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-cvs-unsubscribe@lists.php.net > For additional commands, e-mail: php-cvs-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > >

« previous php.cvs (#7668) next »