version: Avoid referencing a null object

This commit is contained in:
Alexander Nicolaysen Sørnes
2009-01-30 22:03:12 +01:00
parent ebc492dc1f
commit 5b3bde2210

View File

@@ -1110,14 +1110,17 @@ class version {
//////////////////////////////
// show the test results table
if($oTest->iTestingId)
{
$oTest->ShowVersionsTestingTable($this->objectMakeUrl()."&iTestingId=", 5);
} else if($oTest) /* We are previewing the version */
{
$oTable = $oTest->CreateTestTable();
$oTable->AddRow($oTest->CreateTestTableRow(0, ""));
echo $oTable->GetString();
if($oTest)
{
if($oTest->iTestingId)
{
$oTest->ShowVersionsTestingTable($this->objectMakeUrl()."&iTestingId=", 5);
} else /* We are previewing the version */
{
$oTable = $oTest->CreateTestTable();
$oTable->AddRow($oTest->CreateTestTableRow(0, ""));
echo $oTable->GetString();
}
}
if($_SESSION['current']->isLoggedIn())