Example #1
0
 /**
  * Used to get the last error that happened
  *
  * @static should only be called statically, i.e. AutoCRUD_Error::get_last_error();
  * @return AutoCRUD_Error the last error
  */
 function &get_last_error()
 {
     $stack =& AutoCRUD_Error::stack();
     // No errors? return false
     if (count($stack) == 0) {
         $false = false;
         return $false;
     }
     $last_error =& $stack[count($stack) - 1];
     return $last_error;
 }