Skip to content

Commit 347a04b

Browse files
dmz86Geolim4
authored andcommitted
ssdb-server 1.9.7 (#699)
* ssdb-server 1.9.7 On this version the server return 0 or 1 * ssdb-server 1.9.7 In version 1.9.7 of ssdb, it replies with an integer instead of a Bolean generating the following error: "Return value of Phpfastcache Drivers SSdb Driver :: driverDelete () must be of the type boolean, integer returned" and "Return value of Phpfastcache Drivers SSdb Driver :: driverClear () must be of the type boolean, integer returned"
1 parent 5f12dab commit 347a04b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/Phpfastcache/Drivers/Ssdb/Driver.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ protected function driverWrite(CacheItemInterface $item): bool
100100
* Check for Cross-Driver type confusion
101101
*/
102102
if ($item instanceof Item) {
103-
return $this->instance->setx($item->getEncodedKey(), $this->encode($this->driverPreWrap($item)), $item->getTtl());
103+
return (bool) $this->instance->setx($item->getEncodedKey(), $this->encode($this->driverPreWrap($item)), $item->getTtl());
104104
}
105105

106106
throw new PhpfastcacheInvalidArgumentException('Cross-Driver type confusion detected');
@@ -117,7 +117,7 @@ protected function driverDelete(CacheItemInterface $item): bool
117117
* Check for Cross-Driver type confusion
118118
*/
119119
if ($item instanceof Item) {
120-
return $this->instance->del($item->getEncodedKey());
120+
return (bool) $this->instance->del($item->getEncodedKey());
121121
}
122122

123123
throw new PhpfastcacheInvalidArgumentException('Cross-Driver type confusion detected');
@@ -128,7 +128,7 @@ protected function driverDelete(CacheItemInterface $item): bool
128128
*/
129129
protected function driverClear(): bool
130130
{
131-
return $this->instance->flushdb('kv');
131+
return (bool) $this->instance->flushdb('kv');
132132
}
133133

134134
/********************
@@ -156,4 +156,4 @@ public function getStats(): DriverStatistic
156156

157157
return $stat;
158158
}
159-
}
159+
}

0 commit comments

Comments
 (0)