From 90b9198e16db53599bbe7820db0bb2cd34971ce5 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Tue, 11 May 2010 08:55:41 +0000 Subject: [PATCH] MINOR Defensive coding in MigrateSiteTreeLinkingTask git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@104594 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- tasks/MigrateSiteTreeLinkingTask.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/MigrateSiteTreeLinkingTask.php b/tasks/MigrateSiteTreeLinkingTask.php index 91fbedca1..dbbf9dc3c 100755 --- a/tasks/MigrateSiteTreeLinkingTask.php +++ b/tasks/MigrateSiteTreeLinkingTask.php @@ -24,7 +24,7 @@ class MigrateSiteTreeLinkingTask extends BuildTask { // Databases like MSSQL will give duplicate results - remove them // This would normally be fixed by using SELECT DISTINCT, but DataObject::get() doesn't support it - $linkedPages->removeDuplicates(); + if($linkedPages) $linkedPages->removeDuplicates(); if($linkedPages) foreach($linkedPages as $page) { $tracking = DB::query(sprintf (