Skip to content
Snippets Groups Projects
Commit 5a70856f authored by Rasmus Fuhse's avatar Rasmus Fuhse
Browse files

Resolve "PHP Warnungen im WIKI"

Closes #3967

Merge request studip/studip!2832
parent 4682fb5d
No related branches found
No related tags found
No related merge requests found
...@@ -389,7 +389,7 @@ class Course_WikiController extends AuthenticatedController ...@@ -389,7 +389,7 @@ class Course_WikiController extends AuthenticatedController
$this->redirect($this->editURL($page)); $this->redirect($this->editURL($page));
return; return;
} }
if (!$page->isEditable()) { if ($page->isNew() || !$page->isEditable()) {
throw new AccessDeniedException(); throw new AccessDeniedException();
} }
Navigation::activateItem('/course/wiki/start'); Navigation::activateItem('/course/wiki/start');
......
...@@ -69,7 +69,9 @@ ...@@ -69,7 +69,9 @@
break; break;
} }
} }
$oldcontent = $oldversion->content; if ($oldversion) {
$oldcontent = $oldversion->content;
}
$oldcontent = strip_tags(wikiReady($oldcontent)); $oldcontent = strip_tags(wikiReady($oldcontent));
$content = strip_tags(wikiReady($page->content)); $content = strip_tags(wikiReady($page->content));
......
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