mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUG Error if invalid stage specified for get_by_stage
This commit is contained in:
parent
d9261af1f3
commit
02cd32acb3
@ -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