Changeset 500 for trunk/utils.c


Ignore:
Timestamp:
2008-01-04T15:42:36+01:00 (7 years ago)
Author:
moo
Message:

don't catch compiler error, just warnings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/utils.c

    r496 r500  
    526526    sandbox = (xc_sandbox_t *) XG(sandbox); 
    527527    assert(sandbox != NULL); 
     528    if (type != E_STRICT) { 
     529        /* give up, and user handler is not supported in this case */ 
     530        int i; 
     531        zend_uint orig_lineno = CG(zend_lineno); 
     532        zend_error_cb = sandbox->orig_zend_error_cb; 
     533 
     534        for (i = 0; i < sandbox->compilererror_cnt; i ++) { 
     535            compilererror = &sandbox->compilererrors[i]; 
     536            CG(zend_lineno) = compilererror->lineno; 
     537            zend_error(E_STRICT, "%s", compilererror->error); 
     538        } 
     539        CG(zend_lineno) = orig_lineno; 
     540        sandbox->compilererror_cnt = 0; 
     541 
     542        sandbox->orig_zend_error_cb(type, error_filename, error_lineno, format, args); 
     543        return; 
     544    } 
     545 
    528546    if (sandbox->compilererror_cnt <= sandbox->compilererror_size) { 
    529547        if (sandbox->compilererror_size) { 
     
    537555    } 
    538556    compilererror = &sandbox->compilererrors[sandbox->compilererror_cnt++]; 
    539     compilererror->type   = type; 
    540557    compilererror->lineno = error_lineno; 
    541558    compilererror->error_len = zend_vspprintf(&compilererror->error, 0, format, args); 
     
    721738        xc_compilererror_t *error = &sandbox->compilererrors[i]; 
    722739        CG(zend_lineno) = error->lineno; 
    723         zend_error(error->type, "%s", error->error); 
     740        zend_error(E_STRICT, "%s", error->error); 
    724741    } 
    725742    CG(zend_lineno) = 0; 
Note: See TracChangeset for help on using the changeset viewer.