Merge pull request #204 from creative-commoners/pulls/2.0/cast-number-as-int

FIX Cast shortcode document ID as int
This commit is contained in:
Robbie Averill 2017-12-07 23:58:22 +13:00 committed by GitHub
commit 96bac3fdc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -39,10 +39,12 @@ class ShortCodeRelationFinder
} }
/** /**
* @param int $number
* @return DataList * @return DataList
*/ */
public function getList($number) public function getList($number)
{ {
$number = (int) $number;
$list = DataList::create('SiteTree'); $list = DataList::create('SiteTree');
$where = array(); $where = array();
$fields = $this->getShortCodeFields('SiteTree'); $fields = $this->getShortCodeFields('SiteTree');