summaryrefslogtreecommitdiffstats
path: root/lib/class/error.class.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/class/error.class.php')
-rw-r--r--lib/class/error.class.php16
1 files changed, 14 insertions, 2 deletions
diff --git a/lib/class/error.class.php b/lib/class/error.class.php
index 13f96882..2c4679ec 100644
--- a/lib/class/error.class.php
+++ b/lib/class/error.class.php
@@ -27,8 +27,8 @@
*/
class Error {
- public static $state = false; // set to one when an error occurs
- public static $errors = array(); // Errors array key'd array with errors that have occured
+ private static $state = false; // set to one when an error occurs
+ private static $errors = array(); // Errors array key'd array with errors that have occured
/**
* __constructor
@@ -81,6 +81,18 @@ class Error {
} // add
+ /**
+ * occurred
+ * This returns true / false if an error has occured anywhere
+ */
+ public static function occurred() {
+
+ if (self::$state == '1') { return true; }
+
+ return false;
+
+ } // occurred
+
/**
* get
* This returns an error by name