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:
5ecb003
)
DifferenceEngine: Allow cache hits for empty diffs
author
Brad Jorsch
<bjorsch@wikimedia.org>
Tue, 19 Feb 2019 20:54:33 +0000
(15:54 -0500)
committer
Brad Jorsch
<bjorsch@wikimedia.org>
Tue, 19 Feb 2019 20:55:44 +0000
(15:55 -0500)
PHP considers the empty string as falsey, so check for a string
result instead.
Bug: T216554
Change-Id: I3b7d1199acbfede8a95761c5cb1c797b9a3d64cb
includes/diff/DifferenceEngine.php
patch
|
blob
|
history
diff --git
a/includes/diff/DifferenceEngine.php
b/includes/diff/DifferenceEngine.php
index
43bc6e4
..
87863a4
100644
(file)
--- a/
includes/diff/DifferenceEngine.php
+++ b/
includes/diff/DifferenceEngine.php
@@
-1033,7
+1033,7
@@
class DifferenceEngine extends ContextSource {
// Try cache
if ( !$this->mRefreshCache ) {
$difftext = $cache->get( $key );
- if (
$difftext
) {
+ if (
is_string( $difftext )
) {
wfIncrStats( 'diff_cache.hit' );
$difftext = $this->localiseDiff( $difftext );
$difftext .= "\n<!-- diff cache key $key -->\n";