Skip to content
This repository was archived by the owner on Nov 18, 2025. It is now read-only.

Commit b20e104

Browse files
committed
✨ add an optional error handler
Signed-off-by: otengkwame <[email protected]>
1 parent 1f50ea9 commit b20e104

File tree

2 files changed

+586
-3
lines changed

2 files changed

+586
-3
lines changed

framework/core/CodeIgniter.php

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,15 @@
134134
set_exception_handler('_exception_handler');
135135
register_shutdown_function('_shutdown_handler');
136136

137+
if (config_item('beautiful_error_handler')) {
138+
139+
// Require Beautiful ErrorHandler
140+
require_once "ErrorHandler.php";
141+
142+
// Use Beautiful Error Handler
143+
new ErrorHandler;
144+
}
145+
137146
/*
138147
* ------------------------------------------------------
139148
* Set the subclass_prefix
@@ -246,10 +255,10 @@
246255
ini_set('default_charset', $charset);
247256

248257
if (extension_loaded('mbstring')) {
249-
define('MB_ENABLED', true);
258+
define('MB_ENABLED', TRUE);
250259
// mbstring.internal_encoding is deprecated starting with PHP 5.6
251260
// and it's usage triggers E_DEPRECATED messages.
252-
@ini_set('mbstring.internal_encoding', $charset);
261+
// @ini_set('mbstring.internal_encoding', $charset); // commented out by developer kwame
253262
// This is required for mb_convert_encoding() to strip invalid characters.
254263
// That's utilized by CI_Utf8, but it's also done for consistency with iconv.
255264
mb_substitute_character('none');
@@ -263,7 +272,7 @@
263272
define('ICONV_ENABLED', true);
264273
// iconv.internal_encoding is deprecated starting with PHP 5.6
265274
// and it's usage triggers E_DEPRECATED messages.
266-
@ini_set('iconv.internal_encoding', $charset);
275+
// @ini_set('iconv.internal_encoding', $charset); // commented out by developer kwame
267276
} else {
268277
define('ICONV_ENABLED', false);
269278
}

0 commit comments

Comments
 (0)