diff --git a/html/inc/submit.inc b/html/inc/submit.inc
index 70f0277d8c..10b8e454c7 100644
--- a/html/inc/submit.inc
+++ b/html/inc/submit.inc
@@ -39,10 +39,11 @@ function req_to_xml($req, $op) {
$req->app_name
$req->batch_name
";
- if ($req->result_template_file) {
+ if ((isset($req->result_template_file)) && ($req->result_template_file)) {
$x .= " $req->result_template_file
";
- if ($req->workunit_template_file) {
+ }
+ if ((isset($req->workunit_template_file)) && ($req->workunit_template_file)) {
$x .= " $req->workunit_template_file
";
}
@@ -165,7 +166,7 @@ function boinc_estimate_batch($req) {
$name = $reply->getName();
if ($name == 'estimate') {
return array((string)$reply->seconds, null);
- } else if ($name = 'error') {
+ } else if ($name == 'error') {
return array(null, (string)$reply->message);
} else {
return array(null, "Bad reply message");