<commit_before><?php
/**
 * Error handler
 *
 * Handles errors, mails them to whoever.
 *
 * @package %%PACKAGE%%
 * @author <NAME> <<EMAIL>>
 * @author <NAME> <<EMAIL>>
 * @version $Id$
 */

function error_handler ($errno, $errstr, $errfile = '', $errline = '', $errcontext = array()) {
	// Suppress warnings already supressed by @<function>();
	if (error_reporting() == 0) {
		return;
	}

	static $exec_id = 0;

	if ($exec_id == 0) {
		$exec_id = rand();
	}

	$msg = '';
	$die = false;

	$date = date("Y-m-d H:i:s (T)");
	$errortype = array (
				E_ERROR				=> 'Error',
				E_WARNING			=> 'Warning',
				E_PARSE				=> 'Parsing Error',
				E_NOTICE			=> 'Notice',
				E_CORE_ERROR		=> 'Core Error',
				E_CORE_WARNING		=> 'Core Warning',
				E_COMPILE_ERROR		=> 'Compile Error',
				E_COMPILE_WARNING	=> 'Compile Warning',
				E_USER_ERROR		=> 'User Error',
				E_USER_WARNING		=> 'User Warning',
				E_USER_NOTICE		=> 'User Notice',
				E_STRICT			=> 'Runtime Notice',
				E_DEPRECATED		=> 'Deprecated'
			);

	switch ($errno) {
		case E_ERROR:
		case E_CORE_ERROR:
		case E_USER_ERROR:
			$die = true;
			break;<commit_msg>E_DEPRECATED not defined in PHP5.2<commit_after><?php
/**
 * Error handler
 *
 * Handles errors, mails them to whoever.
 *
 * @package %%PACKAGE%%
 * @author <NAME> <<EMAIL>>
 * @author <NAME> <<EMAIL>>
 * @version $Id$
 */

function error_handler ($errno, $errstr, $errfile = '', $errline = '', $errcontext = array()) {
	// Suppress warnings already supressed by @<function>();
	if (error_reporting() == 0) {
		return;
	}

	static $exec_id = 0;

	if ($exec_id == 0) {
		$exec_id = rand();
	}

	$msg = '';
	$die = false;

	/**
	 * Backwards compatibility for PHP5.2
	 */
	if (!defined('E_DEPRECATED')) {
		define('E_DEPRECATED', 8192);
	}

	$date = date("Y-m-d H:i:s (T)");
	$errortype = array (
				E_ERROR				=> 'Error',
				E_WARNING			=> 'Warning',
				E_PARSE				=> 'Parsing Error',
				E_NOTICE			=> 'Notice',
				E_CORE_ERROR		=> 'Core Error',
				E_CORE_WARNING		=> 'Core Warning',
				E_COMPILE_ERROR		=> 'Compile Error',
				E_COMPILE_WARNING	=> 'Compile Warning',
				E_USER_ERROR		=> 'User Error',
				E_USER_WARNING		=> 'User Warning',
				E_USER_NOTICE		=> 'User Notice',
				E_STRICT			=> 'Runtime Notice',
				E_DEPRECATED		=> 'Deprecated'
			);

	switch ($errno) {
		case E_ERROR:
		case E_CORE_ERROR:
		case E_USER_ERROR:
			$die = true;
			break;
{'fraction_non_alphanumeric': 0.17356754496026766, 'fraction_numerical': 0.005855290673358427, 'mean_word_length': 3.1964912280701756, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 43, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2236130', 'n_tokens_mistral': 1072, 'n_tokens_neox': 923, 'n_words': 211}