]> granicus.if.org Git - php/commitdiff
Merge branch 'PHP-5.6'
authorLior Kaplan <kaplanlior@gmail.com>
Sun, 17 Aug 2014 18:37:22 +0000 (21:37 +0300)
committerLior Kaplan <kaplanlior@gmail.com>
Sun, 17 Aug 2014 18:37:22 +0000 (21:37 +0300)
* PHP-5.6:
  Correct typo in comments: 'initialized'

Conflicts:
ext/dom/php_dom.c
ext/spl/php_spl.c

1  2 
ext/mbstring/mb_gpc.c
ext/spl/php_spl.c

Simple merge
index 20911c8df6085403237263f9b257ecedc4216256,44611e61585d0645971908566bace6e37a799fbb..f9a642410fc639c40b8eedfc94d1da5ef816f382
@@@ -315,24 -326,19 +315,24 @@@ PHP_FUNCTION(spl_autoload
                RETURN_FALSE;
        }
  
-       if (file_exts == NULL) { /* autoload_extensions is not initialzed, set to defaults */
+       if (file_exts == NULL) { /* autoload_extensions is not initialized, set to defaults */
 -              copy = pos1 = estrndup(SPL_DEFAULT_FILE_EXTENSIONS, sizeof(SPL_DEFAULT_FILE_EXTENSIONS)-1);
 +              pos = SPL_DEFAULT_FILE_EXTENSIONS;
 +              pos_len = sizeof(SPL_DEFAULT_FILE_EXTENSIONS) - 1;
        } else {
 -              copy = pos1 = estrndup(file_exts, file_exts_len);
 -      }
 -      lc_name = zend_str_tolower_dup(class_name, class_name_len);
 -      while(pos1 && *pos1 && !EG(exception)) {
 -              EG(return_value_ptr_ptr) = original_return_value;
 -              EG(opline_ptr) = original_opline_ptr;
 -              EG(active_op_array) = original_active_op_array;
 -              pos2 = strchr(pos1, ',');
 -              if (pos2) *pos2 = '\0';
 -              if (spl_autoload(class_name, lc_name, class_name_len, pos1 TSRMLS_CC)) {
 +              pos = file_exts->val;
 +              pos_len = file_exts->len;
 +      }
 +
 +      lc_name = STR_ALLOC(class_name->len, 0);
 +      zend_str_tolower_copy(lc_name->val, class_name->val, class_name->len);
 +      while (pos && *pos && !EG(exception)) {
 +              pos1 = strchr(pos, ',');
 +              if (pos1) { 
 +                      pos1_len = pos1 - pos;
 +              } else {
 +                      pos1_len = pos_len;
 +              }
 +              if (spl_autoload(class_name, lc_name, pos, pos1_len TSRMLS_CC)) {
                        found = 1;
                        break; /* loaded */
                }