diff --git a/html/user/submit_rpc_handler.php b/html/user/submit_rpc_handler.php
index ad1b6c63a8..023e153de7 100644
--- a/html/user/submit_rpc_handler.php
+++ b/html/user/submit_rpc_handler.php
@@ -543,22 +543,22 @@ function n_outfiles($wu) {
// error:
function show_job_details($wu) {
- if ($wu->error_mask && WU_ERROR_COULDNT_SEND_RESULT) {
+ if ($wu->error_mask & WU_ERROR_COULDNT_SEND_RESULT) {
echo " couldnt_send_result\n";
}
- if ($wu->error_mask && WU_ERROR_TOO_MANY_ERROR_RESULTS) {
+ if ($wu->error_mask & WU_ERROR_TOO_MANY_ERROR_RESULTS) {
echo " too_many_error_results\n";
}
- if ($wu->error_mask && WU_ERROR_TOO_MANY_SUCCESS_RESULTS) {
+ if ($wu->error_mask & WU_ERROR_TOO_MANY_SUCCESS_RESULTS) {
echo " too_many_success_results\n";
}
- if ($wu->error_mask && WU_ERROR_TOO_MANY_TOTAL_RESULTS) {
+ if ($wu->error_mask & WU_ERROR_TOO_MANY_TOTAL_RESULTS) {
echo " too_many_total_results\n";
}
- if ($wu->error_mask && WU_ERROR_CANCELLED) {
+ if ($wu->error_mask & WU_ERROR_CANCELLED) {
echo " cancelled\n";
}
- if ($wu->error_mask && WU_ERROR_NO_CANONICAL_RESULT) {
+ if ($wu->error_mask & WU_ERROR_NO_CANONICAL_RESULT) {
echo " no_canonical_result\n";
}
$results = BoincResult::enum("workunitid=$wu->id");
@@ -569,7 +569,7 @@ function show_job_details($wu) {
$in_progress++;
break;
}
- if ($wu->error_mask && $r->outcome == RESULT_OUTCOME_CLIENT_ERROR) {
+ if ($wu->error_mask && ($r->outcome == RESULT_OUTCOME_CLIENT_ERROR)) {
echo " $r->exit_status\n";
}
if ($r->id == $wu->canonical_resultid) {