r46748 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r46747‎ | r46748 | r46749 >
Date:00:06, 3 February 2009
Author:demon
Status:ok (Comments)
Tags:
Comment:
(bug 17330) Fix minor warning if $titles is null, which it can be.
Modified paths:
  • /trunk/phase3/includes/Title.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Title.php
@@ -315,7 +315,7 @@
316316 */
317317 public static function newFromRedirectRecurse( $text ) {
318318 $titles = self::newFromRedirectArray( $text );
319 - return array_pop( $titles );
 319+ return $titles ? array_pop( $titles ) : null;
320320 }
321321
322322 /**

Comments

#Comment by Grondin (talk | contribs)   10:37, 3 February 2009

The bug is now fixed, the warning message disappeared.

Status & tagging log