Explorar o código

Fixing PHP notices

Julio Montoya %!s(int64=12) %!d(string=hai) anos
pai
achega
356c9e1f05
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      main/coursecopy/classes/Resource.class.php

+ 1 - 1
main/coursecopy/classes/Resource.class.php

@@ -100,7 +100,7 @@ class Resource {
      * Checks if this resource links to a given resource
      */
     function links_to(& $resource) {
-        if (is_array($this->linked_resources[$resource->get_type()])) {
+        if (isset($this->linked_resources[$resource->get_type()]) && is_array($this->linked_resources[$resource->get_type()])) {
             return in_array($resource->get_id(), $this->linked_resources[$resource->get_type()]);
         }
         return false;