From 02cd32acb3db7b8e3ec5b3617ce6fb5c84fca9d8 Mon Sep 17 00:00:00 2001 From: Damian Mooyman Date: Mon, 11 Jun 2018 15:04:43 +1200 Subject: [PATCH] BUG Error if invalid stage specified for get_by_stage --- model/Versioned.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/Versioned.php b/model/Versioned.php index ff0209389..f9445f6a4 100644 --- a/model/Versioned.php +++ b/model/Versioned.php @@ -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',