Can be duplicated by installing blogThis, (?> is not put on its own line) browsing to some other page, then turning on SavedSearches which doesn't see the ?> and adds extra code to the bottom of the file.
Now that I'm having trouble duplicating this again, I'm making a list of extensions that have manifested this: BlogThis Attachments Vanilla Voting Moo Tools UserAward Saved Searches Discussion Tags
I just looked at AppendToConfigurationFile() and it rely on the file finishing by a line only contain '?>' . It seems weak to me.
We could rewrite the class and functions that deal with appending setting files so that they first lock the file;
Then reformat the content so that it should start by <?\n and then only contains comment or single line of php code with or without comment but it should never contains ?>; A php file doesn't require to end with it.