fix deprecated errors

This commit is contained in:
Tim Bendt
2025-11-25 15:28:51 -05:00
parent 5b6f7ec3ed
commit 169e60a4ec
3 changed files with 11 additions and 9 deletions

View File

@@ -57,7 +57,8 @@ class CI_Exceptions {
E_USER_ERROR => 'User Error', E_USER_ERROR => 'User Error',
E_USER_WARNING => 'User Warning', E_USER_WARNING => 'User Warning',
E_USER_NOTICE => 'User Notice', E_USER_NOTICE => 'User Notice',
E_STRICT => 'Runtime Notice' 2048 => 'Runtime Notice'
); );

View File

@@ -42,7 +42,7 @@ class Pancake_Exceptions extends CI_Exceptions {
E_PARSE => 'Parse Error', E_PARSE => 'Parse Error',
E_WARNING => 'Warning', E_WARNING => 'Warning',
E_USER_WARNING => 'User Warning', E_USER_WARNING => 'User Warning',
E_STRICT => 'Strict', 2048 => 'Strict',
E_NOTICE => 'Notice', E_NOTICE => 'Notice',
E_RECOVERABLE_ERROR => 'Recoverable Error', E_RECOVERABLE_ERROR => 'Recoverable Error',
E_DEPRECATED => 'Deprecation Notice', E_DEPRECATED => 'Deprecation Notice',
@@ -66,7 +66,7 @@ class Pancake_Exceptions extends CI_Exceptions {
E_USER_ERROR => 'User Error', E_USER_ERROR => 'User Error',
E_USER_WARNING => 'User Warning', E_USER_WARNING => 'User Warning',
E_USER_NOTICE => 'User Notice', E_USER_NOTICE => 'User Notice',
E_STRICT => 'Runtime Notice', 2048 => 'Runtime Notice',
E_DEPRECATED => 'Deprecation Notice', E_DEPRECATED => 'Deprecation Notice',
); );
@@ -79,7 +79,7 @@ class Pancake_Exceptions extends CI_Exceptions {
public static $non_reportable_levels = array( public static $non_reportable_levels = array(
E_NOTICE, E_NOTICE,
E_USER_NOTICE, E_USER_NOTICE,
E_STRICT, 2048,
E_DEPRECATED, E_DEPRECATED,
); );
@@ -802,7 +802,7 @@ END;
* *
* @return string * @return string
*/ */
public static function trace(array $trace = null) { public static function trace(?array $trace = null) {
if ($trace === null) { if ($trace === null) {
// Start a new trace // Start a new trace
$trace = debug_backtrace(); $trace = debug_backtrace();

View File

@@ -194,7 +194,8 @@ try {
# @ is used here to prevent errors with some of the stricter hosts who disable ini_set. # @ is used here to prevent errors with some of the stricter hosts who disable ini_set.
@ini_set('display_errors', true); @ini_set('display_errors', true);
error_reporting(-1); // Hide deprecation notices from legacy/vendor code on modern PHP.
error_reporting(E_ALL & ~E_DEPRECATED & ~E_USER_DEPRECATED);
$system_path = FCPATH . "system/codeigniter"; $system_path = FCPATH . "system/codeigniter";
$application_folder = FCPATH . "system/pancake"; $application_folder = FCPATH . "system/pancake";