mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #8160 from open-sausages/pulls/3.7/validate-by-stage
BUG Error if invalid stage specified for get_by_stage
This commit is contained in:
commit
520138f081
@ -1481,7 +1481,7 @@ class Versioned extends DataExtension implements TemplateGlobalProvider {
|
||||
*/
|
||||
public static function get_by_stage($class, $stage, $filter = '', $sort = '', $join = '', $limit = '',
|
||||
$containerClass = 'DataList') {
|
||||
|
||||
VersionedReadingMode::validateStage($stage);
|
||||
$result = DataObject::get($class, $filter, $sort, $join, $limit, $containerClass);
|
||||
return $result->setDataQueryParam(array(
|
||||
'Versioned.mode' => 'stage',
|
||||
|
Loading…
Reference in New Issue
Block a user