diff --git a/code/Controllers/CMSPageHistoryController.php b/code/Controllers/CMSPageHistoryController.php
index 923c192c..eba00f31 100644
--- a/code/Controllers/CMSPageHistoryController.php
+++ b/code/Controllers/CMSPageHistoryController.php
@@ -396,11 +396,11 @@ class CMSPageHistoryController extends CMSMain
$toVersionRecord = Versioned::get_version(SiteTree::class, $id, $toVersion);
if (!$fromVersionRecord) {
- user_error("Can't find version $fromVersion of page $id", E_USER_ERROR);
+ throw new \Exception("Can't find version $fromVersion of page $id");
}
if (!$toVersionRecord) {
- user_error("Can't find version $toVersion of page $id", E_USER_ERROR);
+ throw new \Exception("Can't find version $toVersion of page $id");
}
if (!$record) {
diff --git a/code/Tasks/RemoveOrphanedPagesTask.php b/code/Tasks/RemoveOrphanedPagesTask.php
index 2c19e02e..c422e747 100644
--- a/code/Tasks/RemoveOrphanedPagesTask.php
+++ b/code/Tasks/RemoveOrphanedPagesTask.php
@@ -96,7 +96,7 @@ in the other stage:
$fields->push(new HeaderField(
'Header',
- _t('SilverStripe\\CMS\\Tasks\\RemoveOrphanedPagesTask.HEADER', 'Remove all orphaned pages task')
+ _t(__CLASS__ . '.HEADER', 'Remove all orphaned pages task')
));
$fields->push(new LiteralField(
'Description',
@@ -134,14 +134,14 @@ in the other stage:
'SelectAllLiteral',
sprintf(
'
%s ', - _t('SilverStripe\\CMS\\Tasks\\RemoveOrphanedPagesTask.SELECTALL', 'select all') + _t(__CLASS__ . '.SELECTALL', 'select all') ) )); $fields->push(new LiteralField( 'UnselectAllLiteral', sprintf( '%s
', - _t('SilverStripe\\CMS\\Tasks\\RemoveOrphanedPagesTask.UNSELECTALL', 'unselect all') + _t(__CLASS__ . '.UNSELECTALL', 'unselect all') ) )); $fields->push(new OptionsetField( @@ -149,13 +149,13 @@ in the other stage: