From 40a473d5e7684726487dcfcd4f34ebd6508ef0d3 Mon Sep 17 00:00:00 2001 From: Adrian Greeve Date: Thu, 10 Oct 2013 10:18:36 +0800 Subject: [PATCH] MDL-42234 - Repositories: Fix undefined variable notice when no repositories are enabled. --- admin/repository.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/admin/repository.php b/admin/repository.php index 1e991e4eff3..31fd40cc0c6 100644 --- a/admin/repository.php +++ b/admin/repository.php @@ -295,9 +295,9 @@ if (($action == 'edit') || ($action == 'new')) { // Get list of used plug-ins $repositorytypes = repository::get_types(); + // Array to store plugins being used + $alreadyplugins = array(); if (!empty($repositorytypes)) { - // Array to store plugins being used - $alreadyplugins = array(); $totalrepositorytypes = count($repositorytypes); $updowncount = 1; foreach ($repositorytypes as $i) {