https://bugzilla.wikimedia.org/show_bug.cgi?id=61306
Web browser: --- Bug ID: 61306 Summary: Empty reversed diffs Product: MediaWiki Version: unspecified Hardware: All OS: All Status: UNCONFIRMED Severity: normal Priority: Unprioritized Component: History/Diffs Assignee: wikibugs-l@lists.wikimedia.org Reporter: denisovde...@me.com Mobile Platform: --- When I try use $diffs->reverse(). I'm getting the empty $editors. function reverse() { $rev = $this; $rev->edits = array(); foreach ( $this->edits as $edit ) { $rev->edits[] = $edit->reverse(); } return $rev; } I suppose that the problem in rewriting $rev->edits by empty array. $rev = $this; $rev->edits = array(); My solution: function reverse() { $edits = array(); foreach ( $this->edits as $edit ) { $edits[] = $edit->reverse(); } $this->edits = $edits; return $this->edits; } -- You are receiving this mail because: You are the assignee for the bug. You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l