Update lib/files/cache/legacy.php

Fixing a bug that occurs when trying to update a non-existent 'fscache' table in the database - if unfixed upgrading does not succeed.

Unfortunately I could not get a call to PEAR::isError working. That is why I check for the existence of a property present in class MDB2_Error.
This commit is contained in:
irgsmirx 2013-02-11 20:28:36 +01:00
parent ca99ff31dc
commit 062befd1fc
1 changed files with 6 additions and 0 deletions

View File

@ -51,6 +51,12 @@ class Legacy {
$this->cacheHasItems = false;
return false;
}
if ($result === false || property_exists($result, 'error_message_prefix')) {
$this->cacheHasItems = false;
return false;
}
$this->cacheHasItems = (bool)$result->fetchRow();
return $this->cacheHasItems;
}