' . $page['texte']);
// error catching 5.2<=PHP<7
if ($res === false
and function_exists('error_get_last')
and ($erreur = error_get_last()) ) {
$code = $page['texte'];
$GLOBALS['numero_ligne_php'] = 1;
if (!function_exists('numerote_ligne_php')){
function numerote_ligne_php($match){
$GLOBALS['numero_ligne_php']++;
return "\n/*".str_pad($GLOBALS['numero_ligne_php'],3,"0",STR_PAD_LEFT)."*/";
}
}
$code = "/*001*/".preg_replace_callback(",\n,","numerote_ligne_php",$code);
$code = trim(highlight_string($code,true));
erreur_squelette("L".$erreur['line'].": ".$erreur['message']."
".$code,array($page['source'],'',$erreur['file'],'',$GLOBALS['spip_lang']));
$page['texte'] = "";
}
else {
$page['texte'] = ob_get_contents();
}
}
catch (Exception $e){
$code = $page['texte'];
$GLOBALS['numero_ligne_php'] = 1;
if (!function_exists('numerote_ligne_php')){
function numerote_ligne_php($match){
$GLOBALS['numero_ligne_php']++;
return "\n/*".str_pad($GLOBALS['numero_ligne_php'],3,"0",STR_PAD_LEFT)."*/";
}
}
$code = "/*001*/".preg_replace_callback(",\n,","numerote_ligne_php",$code);
$code = trim(highlight_string($code,true));
erreur_squelette("L".$e->getLine().": ".$e->getMessage()."
".$code,array($page['source'],'',$e->getFile(),'',$GLOBALS['spip_lang']));
$page['texte'] = "";
}
ob_end_clean();
$page['process_ins'] = 'html';
if (strpos($page['texte'], '?xml') !== false) {
$page['texte'] = str_replace("<\1?xml", '<' . '?xml', $page['texte']);
}
}
page_base_href($page['texte']);