diff --git a/system/src/Grav/Common/Page/Page.php b/system/src/Grav/Common/Page/Page.php index 8868e4449..a327ea5dc 100644 --- a/system/src/Grav/Common/Page/Page.php +++ b/system/src/Grav/Common/Page/Page.php @@ -2819,7 +2819,7 @@ class Page implements PageInterface /** * Gets the action. * - * @return string The Action string. + * @return string|null The Action string. */ public function getAction() { diff --git a/system/src/Grav/Framework/Flex/FlexObject.php b/system/src/Grav/Framework/Flex/FlexObject.php index d6cf7e3bb..4a316bfeb 100644 --- a/system/src/Grav/Framework/Flex/FlexObject.php +++ b/system/src/Grav/Framework/Flex/FlexObject.php @@ -591,12 +591,17 @@ class FlexObject implements FlexObjectInterface, FlexAuthorizeInterface * @return FlexObject|FlexObjectInterface */ public function createCopy(string $key = null) + { + $this->markAsCopy(); + + return $this->create($key); + } + + protected function markAsCopy() { $meta = $this->getMetaData(); $meta['copy'] = true; $this->_meta = $meta; - - return $this->create($key); } /**