diff --git a/repository/lib.php b/repository/lib.php
index <HASH>..<HASH> 100644
--- a/repository/lib.php
+++ b/repository/lib.php
@@ -1153,14 +1153,6 @@ abstract class repository implements cacheable_object {
             return false;
         }
 
-        $pname = null;
-        if (is_object($plugin) || is_array($plugin)) {
-            $plugin = (object)$plugin;
-            $pname = $plugin->name;
-        } else {
-            $pname = $plugin;
-        }
-
         $args = func_get_args();
         if (count($args) <= 2) {
             $args = array();
MDL-<I> Repository: $pname, get rid of all the useless code

More details in the Tracker.