Page MenuHomePhabricator

D19569.id46781.diff
No OneTemporary

D19569.id46781.diff

diff --git a/src/applications/cache/spec/PhabricatorDataCacheSpec.php b/src/applications/cache/spec/PhabricatorDataCacheSpec.php
--- a/src/applications/cache/spec/PhabricatorDataCacheSpec.php
+++ b/src/applications/cache/spec/PhabricatorDataCacheSpec.php
@@ -106,8 +106,21 @@
$cache = $info['cache_list'];
$state = array();
foreach ($cache as $item) {
- $info = idx($item, 'info', '<unknown-key>');
- $key = self::getKeyPattern($info);
+ // Some older versions of APCu report the cachekey as "key", while
+ // newer APCu and APC report it as "info". Just check both indexes
+ // for commpatibility. See T13164 for details.
+
+ $info = idx($item, 'info');
+ if ($info === null) {
+ $info = idx($item, 'key');
+ }
+
+ if ($info === null) {
+ $key = '<unknown-key>';
+ } else {
+ $key = self::getKeyPattern($info);
+ }
+
if (empty($state[$key])) {
$state[$key] = array(
'max' => 0,

File Metadata

Mime Type
text/plain
Expires
Sat, Oct 26, 11:28 AM (7 h, 4 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6737467
Default Alt Text
D19569.id46781.diff (1 KB)

Event Timeline