BUG 10156 Cron execution stop if an error is found in any event SOLVED
- To run cron was stopped in one case in the function PMFGetUserEmailAddress for a nonexistent user id. - was add validation to nonexistent user
This commit is contained in:
@@ -2394,9 +2394,11 @@ function PMFGetUserEmailAddress ($id, $APP_UID = null, $prefix = 'usr')
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$oUserRow = UsersPeer::retrieveByPK( $sID );
|
$oUserRow = UsersPeer::retrieveByPK( $sID );
|
||||||
$sID = $oUserRow->getUsrEmail();
|
if ($oUserRow != null) {
|
||||||
if (G::emailAddress( $sID )) {
|
$sID = $oUserRow->getUsrEmail();
|
||||||
array_push( $aRecipient, $sID );
|
if (G::emailAddress( $sID )) {
|
||||||
|
array_push( $aRecipient, $sID );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -578,8 +578,8 @@ class spoolRun
|
|||||||
$sFrom = $row["APP_MSG_FROM"];
|
$sFrom = $row["APP_MSG_FROM"];
|
||||||
$hasEmailFrom = preg_match('/(.+)@(.+)\.(.+)/', $row["APP_MSG_FROM"], $match);
|
$hasEmailFrom = preg_match('/(.+)@(.+)\.(.+)/', $row["APP_MSG_FROM"], $match);
|
||||||
|
|
||||||
if (! $hasEmailFrom || strpos( $row["APP_MSG_FROM"], $setup['MESS_ACCOUNT'] ) === false) {
|
if (! $hasEmailFrom || strpos( $row["APP_MSG_FROM"], $aConfiguration['MESS_ACCOUNT'] ) === false) {
|
||||||
$sFrom = '"' . stripslashes( $row["APP_MSG_FROM"] ) . '" <' . $setup['MESS_ACCOUNT'] . ">";
|
$sFrom = '"' . stripslashes( $row["APP_MSG_FROM"] ) . '" <' . $aConfiguration['MESS_ACCOUNT'] . ">";
|
||||||
}
|
}
|
||||||
$this->setData( $row["APP_MSG_UID"], $row["APP_MSG_SUBJECT"], $sFrom, $row["APP_MSG_TO"], $row["APP_MSG_BODY"], date( "Y-m-d H:i:s" ), $row["APP_MSG_CC"], $row["APP_MSG_BCC"], $row["APP_MSG_TEMPLATE"], $row["APP_MSG_ATTACH"] );
|
$this->setData( $row["APP_MSG_UID"], $row["APP_MSG_SUBJECT"], $sFrom, $row["APP_MSG_TO"], $row["APP_MSG_BODY"], date( "Y-m-d H:i:s" ), $row["APP_MSG_CC"], $row["APP_MSG_BCC"], $row["APP_MSG_TEMPLATE"], $row["APP_MSG_ATTACH"] );
|
||||||
|
|
||||||
|
|||||||
@@ -330,6 +330,7 @@ class AppEvent extends BaseAppEvent
|
|||||||
$log[] = ' - The trigger ' . $aRow['TRI_UID'] . ' throw some errors!';
|
$log[] = ' - The trigger ' . $aRow['TRI_UID'] . ' throw some errors!';
|
||||||
println( " - The trigger {$aRow['TRI_UID']} throw some errors!" );
|
println( " - The trigger {$aRow['TRI_UID']} throw some errors!" );
|
||||||
print_r( $_SESSION['TRIGGER_DEBUG']['ERRORS'] );
|
print_r( $_SESSION['TRIGGER_DEBUG']['ERRORS'] );
|
||||||
|
$_SESSION['TRIGGER_DEBUG']['ERRORS'] = array();
|
||||||
}
|
}
|
||||||
if ($oAppEvent->getAppEvnAttempts() > 0) {
|
if ($oAppEvent->getAppEvnAttempts() > 0) {
|
||||||
$oAppEvent->setAppEvnAttempts( $oAppEvent->getAppEvnAttempts() - 1 );
|
$oAppEvent->setAppEvnAttempts( $oAppEvent->getAppEvnAttempts() - 1 );
|
||||||
|
|||||||
Reference in New Issue
Block a user