Pman.php
[Pman.Base] / Pman.php
index 881a51e..eb3a667 100644 (file)
--- a/Pman.php
+++ b/Pman.php
@@ -397,6 +397,8 @@ class Pman extends HTML_FlexyFramework_Page
         require_once 'Services/JSON.php';
         $json = new Services_JSON();
         
+        $this->addEvent("ERROR", false, $str);
+        
         if (!empty($_REQUEST['returnHTML']) || 
             (isset($_SERVER['CONTENT_TYPE']) && preg_match('#multipart/form-data#i', $_SERVER['CONTENT_TYPE']))
         ) {
@@ -405,7 +407,7 @@ class Pman extends HTML_FlexyFramework_Page
             echo  $json->encodeUnsafe(array(
                     'success'=> false, 
                     'errorMsg' => $str,
-                     'message' => $str, // compate with exeption / loadexception.
+                    'message' => $str, // compate with exeption / loadexception.
 
                     'errors' => $errors ? $errors : true, // used by forms to flag errors.
                     'authFailure' => !empty($errors['authFailure']),
@@ -413,7 +415,7 @@ class Pman extends HTML_FlexyFramework_Page
             echo "</BODY></HTML>";
             exit;
         }
-       
+        
         echo $json->encode(array(
             'success'=> false, 
             'data'=> array(),