Fixes improper return from Xcache::clear();

Adds test
see #6110

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8046 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
TommyO 2009-02-18 18:07:06 +00:00
parent 0beda262d1
commit 96e84c2e60
2 changed files with 20 additions and 3 deletions

View file

@ -107,12 +107,12 @@ class XcacheEngine extends CacheEngine {
*/
function clear() {
$this->__auth();
for ($i = 0, $max = xcache_count(XC_TYPE_VAR); $i < $max; $i++) {
$max = xcache_count(XC_TYPE_VAR);
for ($i = 0; $i < $max; $i++) {
xcache_clear_cache(XC_TYPE_VAR, $i);
}
$result = xcache_count(XC_TYPE_VAR) == 0;
$this->__auth(true);
return $result;
return true;
}
/**
* Populates and reverses $_SERVER authentication values