diff options
author | cflip <36554078+cflip@users.noreply.github.com> | 2021-06-23 15:21:12 -0600 |
---|---|---|
committer | cflip <36554078+cflip@users.noreply.github.com> | 2021-06-23 15:21:12 -0600 |
commit | f5e972c030675f46cda543e13da1b787457e070b (patch) | |
tree | 7c0d2bb4138fe60060ff73b61e15881765ba5412 /includes/error.php | |
parent | fd0c3a283153d6f2d759e5e14888e40e65dc61b7 (diff) |
Add the rest of the changes
Diffstat (limited to 'includes/error.php')
-rwxr-xr-x[-rw-r--r--] | includes/error.php | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/includes/error.php b/includes/error.php index 5e33212..1450a28 100644..100755 --- a/includes/error.php +++ b/includes/error.php @@ -1,25 +1,25 @@ -<?php -function user_notice($message) { - echo '<p class="error">'. $message .'</p>'; -} - -function handle_error($errno, $errstr, $errfile, $errline) { - if (!(error_reporting() & $errno)) { - // This error code is not included in error_reporting, so let it fall - // through to the standard PHP error handler - return false; - } - - switch ($errno) { - // See https://www.php.net/manual/en/errorfunc.constants.php - case E_USER_NOTICE: - user_notice($errstr); - break; - default: - return false; - } - return true; -} - -$old_error_handler = set_error_handler('handle_error'); -?> +<?php
+function user_notice($message) {
+ echo '<p class="error">'. $message .'</p>';
+}
+
+function handle_error($errno, $errstr, $errfile, $errline) {
+ if (!(error_reporting() & $errno)) {
+ // This error code is not included in error_reporting, so let it fall
+ // through to the standard PHP error handler
+ return false;
+ }
+
+ switch ($errno) {
+ // See https://www.php.net/manual/en/errorfunc.constants.php
+ case E_USER_NOTICE:
+ user_notice($errstr);
+ break;
+ default:
+ return false;
+ }
+ return true;
+}
+
+$old_error_handler = set_error_handler('handle_error');
+?>
|