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