Ignore:
Timestamp:
2013-05-16T06:01:18+02:00 (16 months ago)
Author:
moo
Message:

merged [1238] from trunk: fixes #296: Multiple instances of the same software causes PHP "cannot redeclare class" errors when readonly_protection is not in use

Location:
branches/3.0
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/3.0

    • Property svn:mergeinfo changed
      /trunkmerged: 1238
  • branches/3.0/processor/processor.m4

    r1201 r1239  
    717717        zend_bool gc_arg_info = 0; 
    718718        zend_bool gc_opcodes  = 0; 
     719#ifdef ZEND_ENGINE_2_4 
     720        zend_bool gc_literals = 0; 
     721#endif 
    719722        /* really fast shallow copy */ 
    720723        memcpy(dst, src, sizeof(src[0])); 
     
    733736        dst->filename = processor->entry_php_src->filepath; 
    734737#ifdef ZEND_ENGINE_2_4 
    735         if (src->literals /* || op_array_info->literalsinfo_cnt */) { 
     738        if (src->literals) { 
    736739            gc_opcodes = 1; 
     740            if (op_array_info->literalinfo_cnt) { 
     741                gc_literals = 1; 
     742            } 
    737743        } 
    738744#else 
    739745        if (op_array_info->oplineinfo_cnt) { 
    740746            gc_opcodes = 1; 
     747        } 
     748#endif 
     749#ifdef ZEND_ENGINE_2_4 
     750        if (gc_literals) { 
     751            dnl used when copying opcodes 
     752            COPY_N_EX(last_literal, zend_literal, literals) 
    741753        } 
    742754#endif 
     
    787799            } 
    788800        } 
    789         if (gc_arg_info || gc_opcodes) { 
     801        if (gc_arg_info || gc_opcodes || gc_literals) { 
    790802            xc_gc_op_array_t gc_op_array; 
    791803#ifdef ZEND_ENGINE_2 
     
    794806#endif 
    795807            gc_op_array.opcodes  = gc_opcodes ? dst->opcodes : NULL; 
     808#ifdef ZEND_ENGINE_2_4 
     809            gc_op_array.literals = gc_literals ? dst->literals : NULL; 
     810#endif 
    796811            xc_gc_add_op_array(&gc_op_array TSRMLS_CC); 
    797812        } 
Note: See TracChangeset for help on using the changeset viewer.