I have noticed that $php_errormsg is not populated
for all types of errors. The code below is from main/main.c.
Do you think that we can safely switch places for parts one
and two? If we do $php_errormsg will be populated before
bailing out, and this inconsistency will be sorted.
-- pt 1 --
/* Bail out if we can't recover */
switch (type) {
case E_CORE_ERROR:
if(!module_initialized) {
/* bad error in module startup - no way we can live with this */
exit(-2);
}
/* no break - intentionally */
case E_ERROR:
/*case E_PARSE: the parser would return 1 (failure), we can bail out nicely */
case E_COMPILE_ERROR:
case E_USER_ERROR:
if (module_initialized) {
zend_bailout();
return;
}
break;
}
-- pt 2 ---
/* Log if necessary */
if (PG(track_errors) && EG(active_symbol_table)) {
pval *tmp;
ALLOC_ZVAL(tmp);
INIT_PZVAL(tmp);
Z_STRVAL_P(tmp) = (char *) estrndup(buffer, buffer_len);
Z_STRLEN_P(tmp) = buffer_len;
Z_TYPE_P(tmp) = IS_STRING;
zend_hash_update(EG(active_symbol_table), "php_errormsg", sizeof("php_errormsg"), (void **) & tmp, si
}
-----------
--
Ivan Ristic, http://www.webkreator.com
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php