From 82d02d655f3817c46c96998789923a16b24c04d8 Mon Sep 17 00:00:00 2001 From: Chris Morgan Date: Mon, 27 Aug 2007 03:46:03 +0000 Subject: [PATCH] Skip deleting a distributions test results if there are no test results for the distribution --- include/distribution.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/include/distribution.php b/include/distribution.php index e7a7392..ab0d25d 100644 --- a/include/distribution.php +++ b/include/distribution.php @@ -157,10 +157,13 @@ class distribution { return FALSE; // delete any test results this distribution has - foreach($this->aTestingIds as $iTestId) + if($this->aTestingIds) { - $oTestData = new TestData($iTestId); - $oTestData->delete(); + foreach($this->aTestingIds as $iTestId) + { + $oTestData = new TestData($iTestId); + $oTestData->delete(); + } } // now delete the Distribution