dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0f02086
)
MWDebug: avoid double count()
author
Antoine Musso
<hashar@users.mediawiki.org>
Fri, 13 Jan 2012 23:10:21 +0000
(23:10 +0000)
committer
Antoine Musso
<hashar@users.mediawiki.org>
Fri, 13 Jan 2012 23:10:21 +0000
(23:10 +0000)
Follow r107954
includes/debug/Debug.php
patch
|
blob
|
history
diff --git
a/includes/debug/Debug.php
b/includes/debug/Debug.php
index
d56b65b
..
664b4fe
100644
(file)
--- 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;
}