Commit 87d6dc2e authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Fix for when the profile an instance was created from, has been

deleted. I guess we should not allow users to do this, eh?
parent f6538c5f
<?php
#
# Copyright (c) 2000-2015 University of Utah and the Flux Group.
# Copyright (c) 2000-2016 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -147,8 +147,10 @@ if ($cansnapshot && !$embedded) {
$instance = Instance::Lookup($row["uuid"]);
$profile = Profile::Lookup($instance->profile_id(),
$instance->profile_version());
$instance_array[] =
array("uuid" => $instance->uuid(), "name" => $profile->name());
if ($instance && $profile) {
$instance_array[] =
array("uuid" => $instance->uuid(), "name" => $profile->name());
}
}
echo "<script type='text/plain' id='instances-json'>\n";
echo htmlentities(json_encode($instance_array));
......
Supports Markdown
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