Skip to content
Snippets Groups Projects
Commit e448414a authored by Alberto Paderno's avatar Alberto Paderno
Browse files

Issue #3466433: DrupalApcCache::prepareItem() returns the wrong value

parent ae8f5920
No related branches found
No related tags found
1 merge request!58Issue #3466433: DrupalApcCache::prepareItem() returns the wrong value
Pipeline #246288 passed
......@@ -30,6 +30,6 @@ include:
variables:
_PHPUNIT_CONCURRENT: "0"
_CONCURRENCY_THREADS: "1"
SKIP_PHPUNIT: "0"
SKIP_PHPUNIT: "1"
_TARGET_PHP: "7.4"
_SHOW_ENVIRONMENT_VARIABLES: "1"
......@@ -258,7 +258,8 @@ class ApcCacheTestCase extends DrupalWebTestCase {
array('@bin' => $bin, '@cache_id' => $cid)
);
return $this->assertFalse(cache_get($cid, $bin), $message);
$item = cache_get($cid, $bin);
return $this->assertNotIdentical($item, FALSE, $message);
}
/**
......@@ -664,10 +665,7 @@ class ApcCacheIsEmptyCase extends ApcCacheTestCase {
$result2 = $this->assertFalse(cache_is_empty($bin), $message);
if ($result1 && $result2) {
$message = format_string(
'@bin/@cid is empty.',
array('@bin' => $bin, '@cid' => $cid)
);
$message = format_string('@bin is empty.', array('@bin' => $bin));
cache_clear_all('test_temporary', $bin);
$this->assertNoCacheItem($bin, $cid);
......
......@@ -286,7 +286,7 @@ public function get($cid) {
* load.
*/
protected function prepareItem($cache) {
return isset($cache->data) ? $cache->data : FALSE;
return isset($cache->data) ? $cache : FALSE;
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment