Skip to content

Commit

Permalink
MINOR Type checks in Forum->show(). Common error caused by crawlers n…
Browse files Browse the repository at this point in the history
…ot resolving <base> urls correctly
  • Loading branch information
chillu committed Apr 3, 2012
1 parent 0265089 commit 0363b82
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/Forum.php
Expand Up @@ -985,7 +985,7 @@ function show() {
else {
// if redirecting post ids to thread id is enabled then we need
// to check to see if this matches a post and if it does redirect
if(Forum::$redirect_post_urls_to_thread && isset($this->urlParams['ID'])) {
if(Forum::$redirect_post_urls_to_thread && isset($this->urlParams['ID']) && is_numeric($this->urlParams['ID'])) {
if($post = DataObject::get_by_id('Post', $this->urlParams['ID'])) {
return $this->redirect($post->Link(), 301);
}
Expand Down

0 comments on commit 0363b82

Please sign in to comment.