summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2024-01-14 14:16:58 +0100
committerFlorian Pritz <bluewind@xinu.at>2024-01-14 14:23:09 +0100
commit02e37bae4ecd38577703769cd51eb52287a785d2 (patch)
tree15e5d95c8d8114c89f7306a1ef98fb4a3143d85a
parent2e180234d64c34818989823d43c48cc3b99987ac (diff)
feat(PHP8.3): Fix assert_options deprecation warnings
All current asserations are only for development/debug related checks and safe to disable on production so we do not need to force any settings via the deprecate `assert_options` function here and we can just remove this code. Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rw-r--r--NEWS1
-rw-r--r--application/libraries/ExceptionHandler.php8
2 files changed, 1 insertions, 8 deletions
diff --git a/NEWS b/NEWS
index 0ac33e547..acd9ae7fa 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,7 @@ This file lists major, incompatible or otherwise important changes, you should l
NEXT
- Fix PHP 8.2 deprecation warnings
+ - Fix PHP 8.3 deprecation warnings
- Update CodeIgniter to development branch
4.0.0 2022-04-10
diff --git a/application/libraries/ExceptionHandler.php b/application/libraries/ExceptionHandler.php
index 75cbb5c66..ed7f9b8c5 100644
--- a/application/libraries/ExceptionHandler.php
+++ b/application/libraries/ExceptionHandler.php
@@ -15,8 +15,6 @@ class ExceptionHandler {
set_error_handler(array("\libraries\ExceptionHandler", "error_handler"));
set_exception_handler(array("\libraries\ExceptionHandler", 'exception_handler'));
register_shutdown_function(array("\libraries\ExceptionHandler", "check_for_fatal"));
- assert_options(ASSERT_ACTIVE, true);
- assert_options(ASSERT_CALLBACK, array("\libraries\ExceptionHandler", '_assert_failure'));
}
static function error_handler($errno, $errstr, $errfile, $errline)
@@ -145,10 +143,4 @@ class ExceptionHandler {
}
}
- static public function assert_failure($file, $line, $expr, $message = "")
- {
- self::exception_handler(new Exception("assert($expr): Assertion failed in $file at line $line".($message != "" ? " with message: '$message'" : "")));
- exit(1);
- }
-
}