Merged in paulis/processmaker/HOR-871 (pull request #4156)

HOR-871
This commit is contained in:
Julio Cesar Laura Avendaño
2016-04-26 17:34:13 -04:00
2 changed files with 13 additions and 5 deletions

View File

@@ -45,19 +45,24 @@ class actionsByEmailCoreClass extends PMPlugin
throw new Exception('The parameter $data->USR_UID is null.');
}
if ($data->TAS_UID == '') {
if ($data->TAS_UID === '') {
throw new Exception('The parameter $data->TAS_UID is empty.');
}
if ($data->APP_UID == '') {
if ($data->APP_UID === '') {
throw new Exception('The parameter $data->APP_UID is empty.');
}
if ($data->DEL_INDEX == '') {
if ($data->DEL_INDEX === '') {
throw new Exception('The parameter $data->DEL_INDEX is empty.');
}
if ($data->USR_UID == '') {
if ($data->DEL_INDEX === 1) {
error_log('The parameter $data->DEL_INDEX is 1, you can not use ActionsByEmail in the initial task', 0);
return;
}
if ($data->USR_UID === '') {
error_log('The parameter $data->USR_UID is empty, the routed task may be a self-service type, actions by email does not work with self-service task types.', 0);
}
} catch(Exception $e) {

View File

@@ -27,7 +27,7 @@ class pmDynaform
$this->getDynaforms();
$this->synchronizeSubDynaform();
$this->getCredentials();
if (!isset($this->fields["APP_UID"])) {
if (is_array($this->fields) && !isset($this->fields["APP_UID"])) {
$this->fields["APP_UID"] = null;
}
if (isset($this->fields["APP_DATA"]["DYN_CONTENT_HISTORY"])) {
@@ -148,6 +148,9 @@ class pmDynaform
public function jsonr(&$json)
{
if(empty($json)){
return;
}
foreach ($json as $key => &$value) {
$sw1 = is_array($value);
$sw2 = is_object($value);