<commit_before><?php
// TODO: Move file?
echo '<?xml version="1.0" encoding="UTF-8"?>'; ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
	"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<title>Inject Framework - HTTP/1.1 500 Internal Server Error</title>
	
	<style type="text/css">
		.environment .table {
			display: none;
		}
		.environment:hover .table {
			display: block;
		}
		.environment table {
			padding: 1em;
			font-size: 0.7em;
		}
		.environment td {
			padding-right: 1em;
		}
		.environment tr.odd {
			background: #eee;
		}
		.trace {
			background: #ccc;
			padding: 1em;
			-moz-border-radius-topleft: 5px;
			-webkit-border-top-left-radius: 5px;
			-moz-border-radius-topright: 5px;
			-webkit-border-top-right-radius: 5px;
			-moz-border-radius-bottomleft: 5px;
			-webkit-border-bottom-left-radius: 5px;
			-moz-border-radius-bottomright: 5px;
			-webkit-border-bottom-right-radius: 5px;
		}
		.trace h3 {
			float: left;
		}
		h3.trace_help {
			float: right;
			color: #777;
			font-weight: normal;
			font-size: 1em;
		}
		.trace .trace_header {
			color: #555;
			padding-bottom: 0.5em;
		}
		.trace .trace_header strong {
			color: #333;
			padding-left: 1em;
		}
		.trace div table {
			color: #c7bcdd;
			font: 9pt "Andale Mono", "Courier New", Courier, Lucidatypewriter, Fixed, monospace;
			background: #000;
			width: 100%;
			-moz-border-radius-topleft: 5px;
			-webkit-border-top-left-radius: 5px;
			-moz-border-radius-topright: 5px;
			-webkit-border-top-right-radius: 5px;
			-moz-border-radius-bottomleft: 5px;
			-webkit-border-bottom-left-radius: 5px;
			-moz-border-radius-bottomright: 5px;
			-webkit-border-bottom-right-radius: 5px;
		}
		.trace div table .line_no {
			background: #252225;
			width: 2.5em;
			padding-left: 5px;
		}
		.trace div table .current {
			background: #252225;
		}
		.trace div table td:first-child{
			-moz-border-radius-topleft: 5px;
			-webkit-border-top-left-radius: 5px;
		}
		.trace div table tr:last-child td{
			-moz-border-radius-bottomleft: 5px;
			-webkit-border-bottom-left-radius: 5px;
		}
		.trace .trace_header strong span.parameter {
			color: #555;
			font-weight: normal;
		}
		.trace div div.code {
			display: none;
			padding-bottom: 1em;
		}
		.trace div:hover .code {
			display: block;
		}
		.clear {
			clear: both;
		}
	</style>
	
</head>

<body>
	
	<!-- TODO: i18n -->
	
	<div id="error_container">
		<h1>Inject Framework<br />HTTP/1.1 500 Internal Server Error</h1>
		<h3>Error message:</h3>
		<p>
			<?php echo get_class($exception) .': ' . htmlspecialchars($exception->getMessage()); ?>
		</p>
		
		<p class="location">
			<strong>File: </strong> <?php echo htmlspecialchars($exception->getFile()); ?><br />
			<strong>Line: </strong> <?php echo htmlspecialchars($exception->getLine()); ?>
		</p>
		
		<div class="environment">
			<h3>Environment</h3>
		
			<table border="0" cellspacing="0" cellpadding="0">
				<tr><th>Key</th><th>Data</th></tr>
				<?php $i = 1;
					foreach($env as $key => $value): ?>
					<tr class="<?php echo $i % 2 == 0 ? 'even' : 'odd'; ?>"><td><?php echo $key; ?></td><td><?php echo is_object($value) ? (get_class($value)) : (gettype($value).': '.htmlentities(var_export($value, true))) ?></td>
				<?php $i++;
				endforeach; ?>
			</table>
		</div>
		
		<div class="trace">
			<h3>Trace</h3>
			
			<h3 class="trace_help">Hover over a line to see the source code.</h3>
			<div class="clear"></div>
<?php

$trace = array_merge(array(array(
		'file'     => $exception->getFile(),
		'line'     => $exception->getLine(),
		'args'     => array(),
		'function' => 'throw'
	)),
	$exception->getTrace());

foreach($trace as $data)
{<commit_msg>Middleware\ShowException: Made the environment data table show when hovering the environment header<commit_after><?php
// TODO: Move file?
echo '<?xml version="1.0" encoding="UTF-8"?>'; ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
	"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<title>Inject Framework - HTTP/1.1 500 Internal Server Error</title>
	
	<style type="text/css">
		.environment h3 span {
			font-size: 0.7em;
			padding-left: 2em;
			color: #ccc;
		}
		.environment table {
			display: none;
		}
		.environment:hover table {
			display: block;
		}
		.environment:hover h3 span {
			display: inline;
		}
		.environment table {
			padding: 1em;
		}
		.environment td {
			padding: 0.2em 1em 0.2em 1em;
			font-size: 0.7em;
		}
		.environment tr.odd {
			background: #eee;
		}
		.trace {
			background: #ccc;
			padding: 1em;
			-moz-border-radius-topleft: 5px;
			-webkit-border-top-left-radius: 5px;
			-moz-border-radius-topright: 5px;
			-webkit-border-top-right-radius: 5px;
			-moz-border-radius-bottomleft: 5px;
			-webkit-border-bottom-left-radius: 5px;
			-moz-border-radius-bottomright: 5px;
			-webkit-border-bottom-right-radius: 5px;
		}
		.trace h3 {
			float: left;
		}
		h3.trace_help {
			float: right;
			color: #777;
			font-weight: normal;
			font-size: 1em;
		}
		.trace .trace_header {
			color: #555;
			padding-bottom: 0.5em;
		}
		.trace .trace_header strong {
			color: #333;
			padding-left: 1em;
		}
		.trace div table {
			color: #c7bcdd;
			font: 9pt "Andale Mono", "Courier New", Courier, Lucidatypewriter, Fixed, monospace;
			background: #000;
			width: 100%;
			-moz-border-radius-topleft: 5px;
			-webkit-border-top-left-radius: 5px;
			-moz-border-radius-topright: 5px;
			-webkit-border-top-right-radius: 5px;
			-moz-border-radius-bottomleft: 5px;
			-webkit-border-bottom-left-radius: 5px;
			-moz-border-radius-bottomright: 5px;
			-webkit-border-bottom-right-radius: 5px;
		}
		.trace div table .line_no {
			background: #252225;
			width: 2.5em;
			padding-left: 5px;
		}
		.trace div table .current {
			background: #252225;
		}
		.trace div table td:first-child{
			-moz-border-radius-topleft: 5px;
			-webkit-border-top-left-radius: 5px;
		}
		.trace div table tr:last-child td{
			-moz-border-radius-bottomleft: 5px;
			-webkit-border-bottom-left-radius: 5px;
		}
		.trace .trace_header strong span.parameter {
			color: #555;
			font-weight: normal;
		}
		.trace div div.code {
			display: none;
			padding-bottom: 1em;
		}
		.trace div:hover .code {
			display: block;
		}
		.clear {
			clear: both;
		}
	</style>
	
</head>

<body>
	
	<!-- TODO: i18n -->
	
	<div id="error_container">
		<h1>Inject Framework<br />HTTP/1.1 500 Internal Server Error</h1>
		<h3>Error message:</h3>
		<p>
			<?php echo get_class($exception) .': ' . htmlspecialchars($exception->getMessage()); ?>
		</p>
		
		<p class="location">
			<strong>File: </strong> <?php echo htmlspecialchars($exception->getFile()); ?><br />
			<strong>Line: </strong> <?php echo htmlspecialchars($exception->getLine()); ?>
		</p>
		
		<div class="environment">
			<h3>Environment <span>(hover to show)</span></h3>
		
			<table border="0" cellspacing="0" cellpadding="0">
				<tr><th>Key</th><th>Data</th></tr>
				<?php $i = 1;
					foreach($env as $key => $value): ?>
					<tr class="<?php echo $i % 2 == 0 ? 'even' : 'odd'; ?>"><td><?php echo $key; ?></td><td><?php echo is_object($value) ? (get_class($value)) : (gettype($value).': '.htmlentities(var_export($value, true))) ?></td>
				<?php $i++;
				endforeach; ?>
			</table>
		</div>
		
		<div class="trace">
			<h3>Trace</h3>
			
			<h3 class="trace_help">Hover over a line to see the source code.</h3>
			<div class="clear"></div>
<?php

$trace = array_merge(array(array(
		'file'     => $exception->getFile(),
		'line'     => $exception->getLine(),
		'args'     => array(),
		'function' => 'throw'
	)),
	$exception->getTrace());

foreach($trace as $data)
{
{'fraction_non_alphanumeric': 0.1853526220614828, 'fraction_numerical': 0.029966416946525444, 'mean_word_length': 3.0881731784582893, 'pattern_counts': {'":': 0, '<': 125, '<?xml version=': 2, '>': 145, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 6}, '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': '251389', 'n_tokens_mistral': 3550, 'n_tokens_neox': 2935, 'n_words': 617}