cvs: php4 /ext/standard array.c
| From: | Jeroen van Wolffelaar | Date: | Fri, 05 Oct 2001 20:14:33 +0000 |
| Subject: | cvs: php4 /ext/standard array.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-7666@lists.php.net to get a copy of this message | ||
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;
}