<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?>

<div style="border:1px solid #dd4814;padding-left:20px;margin:10px 0;">

	<h4>A PHP Error was encountered</h4>

	<p>Severity: <?= htmlspecialchars($severity) ?></p>
	<p>Message:  <?= htmlspecialchars($message) ?></p>
	<p>Filename: <?= htmlspecialchars($filepath) ?></p>
	<p>Line Number: <?= htmlspecialchars($line) ?></p>

	<?php if (defined('SHOW_DEBUG_BACKTRACE') && SHOW_DEBUG_BACKTRACE === TRUE): ?>

		<p>Backtrace:</p>
		<?php foreach (debug_backtrace() as $error): ?>

			<?php if (isset($error['file']) && strpos($error['file'], realpath(BASEPATH)) !== 0): ?>

				<p style="margin-left:10px">
				File: <?= htmlspecialchars($error['file']) ?><br />
				Line: <?= htmlspecialchars($error['line']) ?><br />
				Function: <?= htmlspecialchars($error['function']) ?>
				</p>

			<?php endif ?>

		<?php endforeach ?>

	<?php endif ?>

</div>
