浏览代码

Fixing PHP notices

Julio Montoya 12 年之前
父节点
当前提交
356c9e1f05
共有 1 个文件被更改,包括 1 次插入1 次删除
  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;