From ac66666ed6f3bc24fb0f4e8d466e8b559e1f8c33 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sun, 5 May 2013 01:26:17 -0700 Subject: [PATCH] fix PHP warnings --- tools/boinc_submit | 2 +- tools/update_versions | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/boinc_submit b/tools/boinc_submit index c6cb65f550..d917b5b666 100755 --- a/tools/boinc_submit +++ b/tools/boinc_submit @@ -46,7 +46,7 @@ ini_set('error_reporting', E_ALL); // Job parameters. Edit as needed // (should eventually make them cmdline args) -$job_params = null; +$job_params = new StdClass; $job_params->rsc_fpops_est = 3600e9; // estimate: 1 GFLOPS-hour $job_params->rsc_fpops_bound = 86400e9; // limit: 1 GFLOPS-day $job_params->rsc_memory_bound = 5e8; // mem bound: 500MB diff --git a/tools/update_versions b/tools/update_versions index 3eced9dbc1..86a89c8627 100755 --- a/tools/update_versions +++ b/tools/update_versions @@ -226,7 +226,7 @@ function process_file($a, $v, $p, $name, $fds) { global $key_dir; $fd = lookup_file($fds, $name); if (!$fd) { - $fd = null; + $fd = new StdClass; $fd->physical_name = $name; $fd->logical_name = null; $fd->url = array(); @@ -370,7 +370,7 @@ function convert_simplexml($x) { $fxs = $x->xpath('file'); foreach ($fxs as $fx) { //echo "fx: "; print_r($fx); - $fd = null; + $fd = new StdClass; $fd->present = false; $fd->physical_name = trim((string) $fx->physical_name); @@ -385,7 +385,7 @@ function convert_simplexml($x) { $fds[] = $fd; } - $v = null; + $v = new StdClass; $v->files = $fds; $v->dont_throttle = get_bool($x, "dont_throttle"); $v->needs_network = get_bool($x, "needs_network"); @@ -409,7 +409,7 @@ function process_version($a, $v, $p) { } $vers = convert_simplexml($x); } else { - $vers = null; + $vers = new StdClass; $vers->files = array(); $vers->dont_throttle = false; $vers->needs_network = false;