mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
Merge pull request #540 from dhensby/pulls/2.4/fix-multibyte-urlfilter
FIX Make sure `setAllowMultibyte` is on when looking up by URLSegment
This commit is contained in:
commit
a4efb3409c
@ -709,6 +709,7 @@ class Blog_Controller extends Page_Controller
|
||||
|
||||
if ($urlSegment) {
|
||||
$filter = URLSegmentFilter::create();
|
||||
$filter->setAllowMultibyte(true);
|
||||
|
||||
return Member::get()
|
||||
->filter('URLSegment', $filter->filter($urlSegment))
|
||||
|
@ -53,7 +53,9 @@ class BlogArchiveWidgetTest extends SapphireTest
|
||||
array('Title' => 'August 2017'),
|
||||
), $archive);
|
||||
|
||||
Versioned::reading_stage($original);
|
||||
if ($original) {
|
||||
Versioned::reading_stage($original);
|
||||
}
|
||||
}
|
||||
|
||||
public function testArchiveYearly()
|
||||
@ -91,6 +93,8 @@ class BlogArchiveWidgetTest extends SapphireTest
|
||||
|
||||
$this->assertCount(4, $archive, 'Four months are shown in the blog archive list after new post added');
|
||||
|
||||
Versioned::reading_stage($original);
|
||||
if ($original) {
|
||||
Versioned::reading_stage($original);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user