mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-14 18:45:12 +00:00
0cc1ddeccb
I tried many things, but wasn't able to reproduce the error described in T283755. What probably happens goes like this: * Somehow $this->refs[$group] is initialized, but $this->groupRefSequence[$group] is not. * There are not many places in the code where this can happen. There are a few suspicious lines in rollbackRef(), but they are all guarded. The only problematic place is in appendText(). * This problematic line is only called for <ref> in <references>. * Somehow a <ref> is valid enough to make it to appendText(), but not valid enough to make it to pushRef(). * The next time another <ref> is added to the same group, it appears like the group already exists ($this->refs[$group] is set), but $this->groupRefSequence[$group] is missing. I was unable to find a wikitext example that would behave like this. This patch just makes sure the initialization is done but doesn't care why it was missing. The following code is fine with an existing ref that contains nothing but text (which is how appendText() leaves it behind). Bug: T283755 Change-Id: I36ac56ef6ed98676a3e8f430a796826351a5f4e9 |
||
---|---|---|
.. | ||
Hooks | ||
ResourceLoader | ||
AnchorFormatter.php | ||
Cite.php | ||
ErrorReporter.php | ||
FootnoteMarkFormatter.php | ||
ReferenceMessageLocalizer.php | ||
ReferencesFormatter.php | ||
ReferenceStack.php |