jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/336834 )

Change subject: Fix unconditional cloning in Lexeme
......................................................................


Fix unconditional cloning in Lexeme

Change-Id: Ida73a85360ea4ee13c0fd0be4833a1e624a98842
---
M src/DataModel/Lexeme.php
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Ladsgroup: Looks good to me, approved
  Aleksey Bekh-Ivanov (WMDE): Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/src/DataModel/Lexeme.php b/src/DataModel/Lexeme.php
index ebd1d4c..2f266df 100644
--- a/src/DataModel/Lexeme.php
+++ b/src/DataModel/Lexeme.php
@@ -206,8 +206,8 @@
         * @see http://php.net/manual/en/language.oop5.cloning.php
         */
        public function __clone() {
-               // TODO: should also clone other attributes once implemented
-               $this->statements = unserialize( serialize( $this->statements ) 
);
+               $this->lemmas = clone $this->lemmas;
+               $this->statements = clone $this->statements;
        }
 
        /**

-- 
To view, visit https://gerrit.wikimedia.org/r/336834
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ida73a85360ea4ee13c0fd0be4833a1e624a98842
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/WikibaseLexeme
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) <[email protected]>
Gerrit-Reviewer: Aleksey Bekh-Ivanov (WMDE) <[email protected]>
Gerrit-Reviewer: Daniel Kinzler <[email protected]>
Gerrit-Reviewer: Ladsgroup <[email protected]>
Gerrit-Reviewer: Thiemo Mättig (WMDE) <[email protected]>
Gerrit-Reviewer: WMDE-leszek <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to