Bug 4449: Mediawiki export does not produce table header row; also fix related PHP warnings