Skip to content

Commit

Permalink
fix(config): cast config returned by getSystemValue to float as the f…
Browse files Browse the repository at this point in the history
…unction return type expects

Fixes: OCA\Sentry\Config::getSamplingRate(): Return value must be of type float, string returned

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
  • Loading branch information
tcitworld committed Nov 24, 2023
1 parent c2a0b64 commit 7f241f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Config.php
Expand Up @@ -70,7 +70,7 @@ public function getServerVersion(): string {
public function getSamplingRate(): float {
$fromConfig = $this->config->getSystemValue('sentry.sampling-rate', null);
if ($fromConfig !== null) {
return $fromConfig;
return (float) $fromConfig;
}

return match ($this->config->getSystemValueInt('loglevel', 2)) {
Expand Down

0 comments on commit 7f241f8

Please sign in to comment.