From: Tyler Anthony Romeo Date: Mon, 28 Jan 2013 04:20:57 +0000 (-0500) Subject: Changed Message::content() to pass $this to MessageContent. X-Git-Tag: 1.31.0-rc.0~20847^2 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dcompta/comptes/journal.php?a=commitdiff_plain;h=5f38cc2dbe1bcac84c46ee2fecbdbb241421b816;p=lhc%2Fweb%2Fwiklou.git Changed Message::content() to pass $this to MessageContent. MessageContent can take either a Message or a message key in the constructor. Since Message::content() is an instance method, it makes sense to pass the instance itself rather than just the key. This fixes cases where RawMessage::content() is called, since passing RawMessage's key to MessageContent will not work properly. Change-Id: Ic3b935e5ac997df07eea40b438445ebd5024e306 --- diff --git a/includes/Message.php b/includes/Message.php index 96747c9b5d..5ea0277869 100644 --- a/includes/Message.php +++ b/includes/Message.php @@ -416,7 +416,7 @@ class Message { */ public function content() { if ( !$this->content ) { - $this->content = new MessageContent( $this->key ); + $this->content = new MessageContent( $this ); } return $this->content;