those logs are restricted, will generate a warning, since it removes first entry of
array, but doesn't re-index the array, and subsequent code makes assumptions of the
form if ( count( $this->types ) $singleType = $this->types[0] (which doesn't work, as
first index is 1).
Thus cause array to be re-indexed if a $wgLogRestriction causes a log type to be removed.
Steps to reproduce the issue is make deletion log restricted, then view a (non-existent) user page.
Personally I think its kind of weird/wrong that if someone restricts both the move and delete log,
then viewing a non-existent will give "This page has been deleted, here's delete log:" followed by an
entry from *any* public log.
* (bug 32414) Empty page get a empty bytes attribute in Export/Dump.
* (bug 33101) Viewing a User or User talk of username resembling IP ending
with .xxx causes Internal error
+* Warning about undefined index in certain situations when $wgLogRestrictions
+ causes the first log type requested to be removed but not the others
=== API changes in 1.19 ===
* (bug 19838) siprop=interwikimap can now use the interwiki cache.
// If $types is not an array, make it an array
$types = ($types === '') ? array() : (array)$types;
// Don't even show header for private logs; don't recognize it...
+ $needReindex = false;
foreach ( $types as $type ) {
if( isset( $wgLogRestrictions[$type] )
&& !$this->getUser()->isAllowed($wgLogRestrictions[$type])
) {
+ $needReindex = true;
$types = array_diff( $types, array( $type ) );
}
}
+ if ( $needReindex ) {
+ // Lots of this code makes assumptions that
+ // the first entry in the array is $types[0].
+ $types = array_values( $types );
+ }
$this->types = $types;
// Don't show private logs to unprivileged users.
// Also, only show them upon specific request to avoid suprises.