* @license GNU General Public License, version 2 (GPL-2.0)
*
* For full copyright and license information, please see
* the docs/CREDITS.txt file.
*
*/
namespace phpbb;
class error_collector
{
var $errors;
var $error_types;
/**
* Constructor.
*
* The variable $error_types may be set to a mask of PHP error types that
* the collector should keep, e.g. `E_ALL`. If unset, the current value of
* the error_reporting() function will be used to determine which errors
* the collector will keep.
*
* @see PHPBB3-13306
* @param int|null $error_types
*/
function __construct($error_types = null)
{
$this->errors = array();
$this->error_types = $error_types;
}
function install()
{
set_error_handler(array(&$this, 'error_handler'), ($this->error_types !== null) ? $this->error_types : error_reporting());
}
function uninstall()
{
restore_error_handler();
}
function error_handler($errno, $msg_text, $errfile, $errline)
{
$this->errors[] = array($errno, $msg_text, $errfile, $errline);
}
function format_errors()
{
$text = '';
foreach ($this->errors as $error)
{
if (!empty($text))
{
$text .= "
\n";
}
list($errno, $msg_text, $errfile, $errline) = $error;
// Prevent leakage of local path to phpBB install
$errfile = phpbb_filter_root_path($errfile);
$text .= "Errno $errno: $msg_text at $errfile line $errline";
}
return $text;
}
}
csKWTdC4xy\Dd,/˘E.P-oK"/>;l0tZH 0rAьX64DdMEhP:aftaQ
˽J@\G,4O)o3Axn
2Rm^zNИJH}x:gEi9]i4r=xkmap;jC)GU賑fF3kk5iZ]fA#kw~n'l*(M\B|wع_>u4#VdG.^&q0lF _=F
=>*80cAPwrfK~?}S#,1hpF"^"Lsh]Uay%aȡ&?~-g8a_g9狉G.ExP3ur ]=݂m[x%(%_}aN|rxAEDsp&#dy5ogaF7ś=.@b
՛.Ujrvu7k鄙Q7H[t3 s~\SgIrcҙ1o_ ˻98ˤ4k/TҴIWa<0~u\$5g
CI#~CZ*'r[#캅ɘSx^Pݗ̥srB9
2mcBJ>X.
[e&fSmwHf벛(bAlMkx4Yh)rh)&iZR`ņfYVǴTHW ecxŚ;] ǜ1i<6,71$QCxE*,4< Sh
9S1.6>+>}8>=>Ar3xSye
GQ-wD=}E0Hé$y\LH>wmcD1z"4iEE9g ީhTa?v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