From: Liangent Date: Mon, 26 Mar 2012 13:36:24 +0000 (+0800) Subject: Was causing Notice: Array to string conversion in .../includes/api/ApiBase.php on... X-Git-Tag: 1.31.0-rc.0~24125 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/password.php?a=commitdiff_plain;h=fc072f2dfcc92095e9f9e558327e001208a70f35;p=lhc%2Fweb%2Fwiklou.git Was causing Notice: Array to string conversion in .../includes/api/ApiBase.php on line 285 and examples of list=allimages are not displayed properly Change-Id: I4fde14245ac19716957beb634a274c3a6042d776 --- diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php index a8c3cc7f87..607c47af92 100644 --- a/includes/api/ApiBase.php +++ b/includes/api/ApiBase.php @@ -282,12 +282,12 @@ abstract class ApiBase extends ContextSource { if ( is_numeric( $k ) ) { $msg .= " $v\n"; } else { - $v .= ":"; if ( is_array( $v ) ) { $msgExample = implode( "\n", array_map( array( $this, 'indentExampleText' ), $v ) ); } else { $msgExample = " $v"; } + $msgExample .= ":"; $msg .= wordwrap( $msgExample, 100, "\n" ) . "\n $k\n"; } }