diff --git a/core/components/quip/model/quip/quipcomment.class.php b/core/components/quip/model/quip/quipcomment.class.php index fe00b77..23ebf92 100644 --- a/core/components/quip/model/quip/quipcomment.class.php +++ b/core/components/quip/model/quip/quipcomment.class.php @@ -108,6 +108,7 @@ public function makeUrl($resource = 0,$params = array(),$options = array(),$addA $options['context_key'] = $this->get('context_key'); if (empty($options['context_key'])) { $modresource = $this->xpdo->getObject('modResource', $resource); + if (!$modresource) return "Javascript: alert('Commeted object is lost! You can delete this comment.')"; $options['context_key'] = $modresource->get('context_key'); } } @@ -512,4 +513,4 @@ public function prepare(array $properties = array(),$idx) { } return $commentArray; } -} \ No newline at end of file +}