diff --git a/src/controllers/EntriesController.php b/src/controllers/EntriesController.php index e39c8cd05b8..685fec9fedf 100644 --- a/src/controllers/EntriesController.php +++ b/src/controllers/EntriesController.php @@ -770,7 +770,7 @@ private function _prepEditEntryVariables(array &$variables) } if ($variables['entry']->id) { - $versions = Craft::$app->getEntryRevisions()->getVersionsByEntryId($variables['entryId'], $site->id, 1, true); + $versions = Craft::$app->getEntryRevisions()->getVersionsByEntryId($variables['entry']->id, $site->id, 1, true); /** @var EntryVersion $currentVersion */ $currentVersion = reset($versions);