Skip to content
Snippets Groups Projects
Commit d425f02d authored by David Siegfried's avatar David Siegfried Committed by Jan-Hendrik Willms
Browse files

prevent php-warnings, closes #3939

Closes #3939

Merge request studip/studip!2798
parent f0405b97
No related branches found
No related tags found
No related merge requests found
...@@ -12,16 +12,20 @@ class Course_MessengerController extends AuthenticatedController ...@@ -12,16 +12,20 @@ class Course_MessengerController extends AuthenticatedController
public function course_action($thread_id = null) public function course_action($thread_id = null)
{ {
if (Context::get()) { $context = Context::get();
PageLayout::setTitle(Context::get()->getFullName() . ' - ' . _('Blubber'));
if (!$context) {
throw new CheckObjectException(_('Sie haben kein Objekt gewählt.'));
} }
if (Navigation::hasItem('/course/blubber')) { if (Navigation::hasItem('/course/blubber')) {
Navigation::activateItem('/course/blubber'); Navigation::activateItem('/course/blubber');
} }
PageLayout::setTitle($context->getFullName() . ' - ' . _('Blubber'));
$this->search = ''; $this->search = '';
$this->threads = BlubberThread::findByContext(Context::get()->id, true, Context::getType()); $this->threads = BlubberThread::findByContext($context->id, true, Context::getType());
$this->thread = null; $this->thread = null;
$this->threads_more_down = 0; $this->threads_more_down = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment