Commit 3383e882 authored by Leigh Stoller's avatar Leigh Stoller

Fix warning.

parent 26f89fa3
......@@ -163,8 +163,10 @@ class Instance
# With a real user, run as that user.
#
$uid = ($creator ? $creator->uid() : "nobody");
$pid = ($creator ? $creator->FirstApprovedProject()->pid() : "nobody");
$pid = "nobody";
if ($creator && $creator->FirstApprovedProject()) {
$pid = $creator->FirstApprovedProject()->pid();
}
if (isset($_SERVER['REMOTE_ADDR'])) {
putenv("REMOTE_ADDR=" . $_SERVER['REMOTE_ADDR']);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment