~clint-fewbar/ubuntu/precise/php5/php5-5.4-merge

« back to all changes in this revision

Viewing changes to ext/standard/array.c

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2011-02-22 09:46:37 UTC
  • mfrom: (1.1.20) (0.3.18 sid)
  • Revision ID: package-import@ubuntu.com-20110222094637-nlu2tvb7oqgaarl0
Tags: 5.3.5-1ubuntu1
* Merge from debian/unstable. Remaining changes:
 - debian/control:
    * Dropped firebird2.1-dev, libc-client-dev, libmcrypt-dev as it is in universe.
    * Dropped libmysqlclient15-dev, build against mysql 5.1.
    * Dropped libcurl-dev not in the archive.
    * Suggest php5-suhosin rather than recommends.
    * Dropped php5-imap, php5-interbase, php5-mcrypt since we have versions 
      already in universe.
    * Dropped libonig-dev and libqgdbm since its in universe. (will be re-added in lucid+1)
    * Dropped locales-all.
  - modulelist: Drop imap, interbase, sybase, and mcrypt.
  - debian/rules:
    * Dropped building of mcrypt, imap, and interbase.
    * Install apport hook for php5.
    * stop mysql instance on clean just in case we failed in tests

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
   +----------------------------------------------------------------------+
22
22
*/
23
23
 
24
 
/* $Id: array.c 300371 2010-06-11 08:53:31Z dmitry $ */
 
24
/* $Id: array.c 305570 2010-11-19 22:06:44Z felipe $ */
25
25
 
26
26
#include "php.h"
27
27
#include "php_ini.h"
1389
1389
 
1390
1390
                        case EXTR_OVERWRITE:
1391
1391
                                /* GLOBALS protection */
1392
 
                                if (var_exists && var_name_len == sizeof("GLOBALS") && !strcmp(var_name, "GLOBALS")) {
 
1392
                                if (var_exists && var_name_len == sizeof("GLOBALS")-1 && !strcmp(var_name, "GLOBALS")) {
1393
1393
                                        break;
1394
1394
                                }
1395
 
                                if (var_exists && var_name_len == sizeof("this")  && !strcmp(var_name, "this") && EG(scope) && EG(scope)->name_length != 0) {
 
1395
                                if (var_exists && var_name_len == sizeof("this")-1  && !strcmp(var_name, "this") && EG(scope) && EG(scope)->name_length != 0) {
1396
1396
                                        break;
1397
1397
                                }
1398
1398
                                ZVAL_STRINGL(&final_name, var_name, var_name_len, 1);
3557
3557
                for (i = 1; i < arr_argc; i++) {
3558
3558
                        Bucket **ptr = ptrs[i];
3559
3559
                        if (behavior == DIFF_NORMAL) {
3560
 
                                while (*ptr && (0 < (c = diff_data_compare_func(ptrs[0], ptr TSRMLS_CC)))) {
3561
 
                                        ptr++;
 
3560
                                while (*ptrs[i] && (0 < (c = diff_data_compare_func(ptrs[0], ptrs[i] TSRMLS_CC)))) {
 
3561
                                        ptrs[i]++;
3562
3562
                                }
3563
3563
                        } else if (behavior & DIFF_ASSOC) { /* triggered also when DIFF_KEY */
3564
3564
                                while (*ptr && (0 != (c = diff_key_compare_func(ptrs[0], ptr TSRMLS_CC)))) {