When using debug toolbar, make the result cleaner and more readable:
XML: <debugLog><msg>…</msg><msg>…</msg></debugLog>
JSON: "debugLog": ["…","…"]
Instead of current:
XML: <debugLog><msg xml:space="preserve">…</msg>...
JSON: "debugLog": [{"*": "…"}, {"*": "…"}]
Change-Id: Ieb9d3ab23d7654f5eaf3b79b3b69f4aab99d4680
$result->setIndexedTagName( $debugInfo, 'debuginfo' );
$result->setIndexedTagName( $debugInfo['log'], 'line' );
$result->setIndexedTagName( $debugInfo, 'debuginfo' );
$result->setIndexedTagName( $debugInfo['log'], 'line' );
- foreach ( $debugInfo['debugLog'] as $index => $debugLogText ) {
- $vals = array();
- ApiResult::setContent( $vals, $debugLogText );
- $debugInfo['debugLog'][$index] = $vals; //replace
- }
$result->setIndexedTagName( $debugInfo['debugLog'], 'msg' );
$result->setIndexedTagName( $debugInfo['queries'], 'query' );
$result->setIndexedTagName( $debugInfo['includes'], 'queries' );
$result->setIndexedTagName( $debugInfo['debugLog'], 'msg' );
$result->setIndexedTagName( $debugInfo['queries'], 'query' );
$result->setIndexedTagName( $debugInfo['includes'], 'queries' );
- $result->addValue( array(), 'debuginfo', $debugInfo );
+ $result->addValue( null, 'debuginfo', $debugInfo );