From 6fdbefa5211a1907af41cd8be891b3e0afd62c26 Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Fri, 13 Jan 2012 23:10:21 +0000 Subject: [PATCH] MWDebug: avoid double count() Follow r107954 --- includes/debug/Debug.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/includes/debug/Debug.php b/includes/debug/Debug.php index d56b65bc23..664b4feabd 100644 --- a/includes/debug/Debug.php +++ b/includes/debug/Debug.php @@ -113,8 +113,9 @@ class MWDebug { // Check to see if there was already a deprecation notice, so not to // get a duplicate warning - if ( count( self::$log ) ) { - $lastLog = self::$log[ count( self::$log ) - 1 ]; + $logCount = count( self::$log ); + if ( $logCount ) { + $lastLog = self::$log[ $logCount - 1 ]; if ( $lastLog['type'] == 'deprecated' && $lastLog['caller'] == wfGetCaller( $callerOffset + 1 ) ) { return; } -- 2.20.1