The numeric id is only available before the storage entry is deleted, so
get it at that time.
*/
public static function remove($storageId) {
$storageId = self::adjustStorageId($storageId);
+ $numericId = self::getNumericStorageId($storageId);
$sql = 'DELETE FROM `*PREFIX*storages` WHERE `id` = ?';
\OC_DB::executeAudited($sql, array($storageId));
- $numericId = self::getNumericStorageId($storageId);
if (!is_null($numericId)) {
$sql = 'DELETE FROM `*PREFIX*filecache` WHERE `storage` = ?';
\OC_DB::executeAudited($sql, array($numericId));