diff --git a/gulliver/system/class.g.php b/gulliver/system/class.g.php index 2a0d773ae..13d8d07d4 100755 --- a/gulliver/system/class.g.php +++ b/gulliver/system/class.g.php @@ -689,7 +689,7 @@ class G * @param string $strClass * @return void */ - public function LoadClass ($strClass) + public static function LoadClass ($strClass) { $classfile = G::ExpandPath( "classes" ) . 'class.' . $strClass . '.php'; if (! file_exists( $classfile )) { @@ -3294,7 +3294,7 @@ class G * * @author Erik A.O. */ - public function json_encode($Json) + public static function json_encode($Json) { if ( function_exists('json_encode') ) { return json_encode($Json); diff --git a/workflow/engine/controllers/pmTablesProxy.php b/workflow/engine/controllers/pmTablesProxy.php index 86905ef7f..fd2e0daa2 100755 --- a/workflow/engine/controllers/pmTablesProxy.php +++ b/workflow/engine/controllers/pmTablesProxy.php @@ -198,6 +198,7 @@ class pmTablesProxy extends HttpProxyController //require_once 'classes/model/Fields.php'; try { + $result = new stdClass(); ob_start(); $data = (array) $httpData; $data['PRO_UID'] = trim( $data['PRO_UID'] ); @@ -326,6 +327,7 @@ class pmTablesProxy extends HttpProxyController $result->success = true; $result->message = $result->msg = $buildResult; } catch (Exception $e) { + $result = new stdClass(); $buildResult = ob_get_contents(); ob_end_clean(); $result->success = false; @@ -352,6 +354,7 @@ class pmTablesProxy extends HttpProxyController */ public function delete ($httpData) { + $result = new stdClass(); $rows = G::json_decode( stripslashes( $httpData->rows ) ); $errors = ''; $count = 0; @@ -735,6 +738,7 @@ class pmTablesProxy extends HttpProxyController { require_once 'classes/model/AdditionalTables.php'; try { + $result = new stdClass(); $errors = ''; $overWrite = isset( $_POST['form']['OVERWRITE'] ) ? true : false; @@ -962,6 +966,7 @@ class pmTablesProxy extends HttpProxyController $result->message = $msg; } catch (Exception $e) { + $result = new stdClass(); $result->errorType = 'error'; $result->buildResult = ob_get_contents(); ob_end_clean(); @@ -993,6 +998,7 @@ class pmTablesProxy extends HttpProxyController $tablesToExport = G::json_decode( stripslashes( $httpData->rows ) ); try { + $result = new stdClass(); G::LoadCLass( 'net' ); $net = new NET( G::getIpAddress() ); @@ -1093,6 +1099,7 @@ class pmTablesProxy extends HttpProxyController $result->link = $link; $result->message = "Generated file: $filenameOnly, size: $size"; } catch (Exception $e) { + $result = new stdClass(); $result->success = false; $result->message = $e->getMessage(); } @@ -1225,6 +1232,7 @@ class pmTablesProxy extends HttpProxyController public function genDataReport ($httpData) { + $result = new stdClass(); G::loadClass( 'pmTable' ); require_once 'classes/model/AdditionalTables.php'; $result->message = '';