Skip to content

Commit

Permalink
Fix cs
Browse files Browse the repository at this point in the history
  • Loading branch information
euromark committed Dec 12, 2014
1 parent 317e6aa commit 753fe28
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Model/CronTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,10 @@ public function markJobDone($id) {
* @return bool Success
*/
public function markJobFailed($id, $failureMessage = null) {
$db = $this->getDataSource();
$fields = array(
'failed' => "failed + 1",
'failure_message' => $failureMessage
'failure_message' => $db->value($failureMessage)
);
$conditions = array(
'id' => $id
Expand Down
2 changes: 1 addition & 1 deletion Model/QueuedTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ public function markJobFailed($id, $failureMessage = null) {
$this->alias . '.failure_message' => $db->value($failureMessage),
);
$conditions = array(
$this->alias . '.id' => (integer) $id
$this->alias . '.id' => $id
);
return $this->updateAll($fields, $conditions);
}
Expand Down

0 comments on commit 753fe28

Please sign in to comment.