summaryrefslogtreecommitdiff
path: root/ext/standard/array.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/standard/array.c')
-rw-r--r--ext/standard/array.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/standard/array.c b/ext/standard/array.c
index dd3ed25d9..b477b8747 100644
--- a/ext/standard/array.c
+++ b/ext/standard/array.c
@@ -21,7 +21,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: array.c 300371 2010-06-11 08:53:31Z dmitry $ */
+/* $Id: array.c 305570 2010-11-19 22:06:44Z felipe $ */
#include "php.h"
#include "php_ini.h"
@@ -1389,10 +1389,10 @@ PHP_FUNCTION(extract)
case EXTR_OVERWRITE:
/* GLOBALS protection */
- if (var_exists && var_name_len == sizeof("GLOBALS") && !strcmp(var_name, "GLOBALS")) {
+ if (var_exists && var_name_len == sizeof("GLOBALS")-1 && !strcmp(var_name, "GLOBALS")) {
break;
}
- if (var_exists && var_name_len == sizeof("this") && !strcmp(var_name, "this") && EG(scope) && EG(scope)->name_length != 0) {
+ if (var_exists && var_name_len == sizeof("this")-1 && !strcmp(var_name, "this") && EG(scope) && EG(scope)->name_length != 0) {
break;
}
ZVAL_STRINGL(&final_name, var_name, var_name_len, 1);
@@ -3557,8 +3557,8 @@ static void php_array_diff(INTERNAL_FUNCTION_PARAMETERS, int behavior, int data_
for (i = 1; i < arr_argc; i++) {
Bucket **ptr = ptrs[i];
if (behavior == DIFF_NORMAL) {
- while (*ptr && (0 < (c = diff_data_compare_func(ptrs[0], ptr TSRMLS_CC)))) {
- ptr++;
+ while (*ptrs[i] && (0 < (c = diff_data_compare_func(ptrs[0], ptrs[i] TSRMLS_CC)))) {
+ ptrs[i]++;
}
} else if (behavior & DIFF_ASSOC) { /* triggered also when DIFF_KEY */
while (*ptr && (0 != (c = diff_key_compare_func(ptrs[0], ptr TSRMLS_CC)))) {