Index: trunk/phase3/includes/logging/LogFormatter.php |
— | — | @@ -178,10 +178,12 @@ |
179 | 179 | * Fill in missing indexes with empty strings to avoid |
180 | 180 | * incorrect renumbering. |
181 | 181 | */ |
182 | | - $max = max( array_keys( $params ) ); |
183 | | - for ( $i = 4; $i < $max; $i++ ) { |
184 | | - if ( !isset( $params[$i] ) ) { |
185 | | - $params[$i] = ''; |
| 182 | + if ( count( $params ) ) { |
| 183 | + $max = max( array_keys( $params ) ); |
| 184 | + for ( $i = 4; $i < $max; $i++ ) { |
| 185 | + if ( !isset( $params[$i] ) ) { |
| 186 | + $params[$i] = ''; |
| 187 | + } |
186 | 188 | } |
187 | 189 | } |
188 | 190 | return $params; |