r96632 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r96631‎ | r96632 | r96633 >
Date:23:42, 8 September 2011
Author:aaron
Status:ok (Comments)
Tags:
Comment:
Shut up notices:
Notice: Undefined offset: 1 in D:\www\MW_trunk\phase3\extensions\FlaggedRevs\dataclasses\FlaggedRevsLog.php on line 157
Modified paths:
  • /trunk/extensions/FlaggedRevs/dataclasses/FlaggedRevsLog.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/dataclasses/FlaggedRevsLog.php
@@ -152,6 +152,7 @@
153153 */
154154 public static function expandParams( array $pars ) {
155155 $res = array();
 156+ $pars = array_filter( $pars, 'strlen' );
156157 foreach ( $pars as $paramAndValue ) {
157158 list( $param, $value ) = explode( '=', $paramAndValue, 2 );
158159 $res[$param] = $value;

Comments

#Comment by 😂 (talk | contribs)   04:14, 9 September 2011

If the point is just to filter empty entires from the list, calling array_filter() with no callback will do the same.

Status & tagging log