mirror of
https://github.com/wilr/silverstripe-googlesitemaps.git
synced 2024-10-22 11:05:48 +02:00
Merge pull request #189 from tiller1010/hotfix/2.2.2/other-id-type-check
This commit is contained in:
commit
7370c85dae
@ -70,6 +70,12 @@ class GoogleSitemapController extends Controller
|
|||||||
$class = $this->unsanitiseClassName($this->request->param('ID'));
|
$class = $this->unsanitiseClassName($this->request->param('ID'));
|
||||||
$page = intval($this->request->param('OtherID'));
|
$page = intval($this->request->param('OtherID'));
|
||||||
|
|
||||||
|
if ($page) {
|
||||||
|
if (!is_numeric($page)) {
|
||||||
|
return new HTTPResponse('Page not found', 404);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (GoogleSitemap::enabled()
|
if (GoogleSitemap::enabled()
|
||||||
&& $class
|
&& $class
|
||||||
&& ($page > 0)
|
&& ($page > 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user