Steps to replicate the issue (include links if applicable):
- Define a custom Content and ContentHandler; make the custom Content subclass return something from getNativeData that's not a string.
- Create a page using the custom content model.
- Try to export the page or generate a wiki-wide XML dump via dumpBackup.php
What happens?:
TypeError: strlen(): Argument #1 ($string) must be of type string, array given Backtrace: from includes/export/XmlDumpWriter.php(569) #0 includes/export/XmlDumpWriter.php(569): strlen(array) #1 includes/export/XmlDumpWriter.php(503): XmlDumpWriter->writeText(Fandom\InteractiveMaps\Content\InteractiveMapContent, array, string) #2 includes/export/XmlDumpWriter.php(389): XmlDumpWriter->writeSlot(MediaWiki\Revision\SlotRecord, integer) #3 includes/export/WikiExporter.php(555): XmlDumpWriter->writeRevision(stdClass, array) #4 includes/export/WikiExporter.php(493): WikiExporter->outputPageStreamBatch(Wikimedia\Rdbms\MysqliResultWrapper, stdClass) #5 includes/export/WikiExporter.php(315): WikiExporter->dumpPages(string, boolean) #6 includes/export/WikiExporter.php(175): WikiExporter->dumpFrom(string) #7 maintenance/includes/BackupDumper.php(363): WikiExporter->allPages() #8 maintenance/dumpBackup.php(84): BackupDumper->dump(integer, integer) #9 maintenance/includes/MaintenanceRunner.php(309): DumpBackup->execute() #10 maintenance/doMaintenance.php(85): MediaWiki\Maintenance\MaintenanceRunner->run() #11 maintenance/dumpBackup.php(144): require_once(string) #12 {main}
What should have happened instead?:
The export / dump should have generated successfully.
Software version : MW 1.37