Thiemo Mättig (WMDE) has uploaded a new change for review. (
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(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikibaseLexeme
refs/changes/34/336834/1
diff --git a/src/DataModel/Lexeme.php b/src/DataModel/Lexeme.php
index 5233a1d..f27b730 100644
--- a/src/DataModel/Lexeme.php
+++ b/src/DataModel/Lexeme.php
@@ -210,8 +210,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: newchange
Gerrit-Change-Id: Ida73a85360ea4ee13c0fd0be4833a1e624a98842
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikibaseLexeme
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits