Skip to content

Commit

Permalink
Update src/M6Web/Component/Statsd/MessageEntity.php
Browse files Browse the repository at this point in the history
Co-authored-by: Oliver THEBAULT <[email protected]>
  • Loading branch information
mihai-amihailesei and Oliboy50 authored Sep 19, 2023
1 parent 1d91b15 commit 5bb7c09
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/M6Web/Component/Statsd/MessageEntity.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ protected function checkConstructor()
throw new Exception('node and unit have to be a string');
}

if (!is_int(intval($this->value))) {
throw new Exception('value has to be an integer');
if (!is_int($this->value) || !is_string($this->value)) {
throw new Exception('value has to be an integer or a string');
}

if (!is_float($this->sampleRate) or ($this->sampleRate <= 0)) {
Expand Down

0 comments on commit 5bb7c09

Please sign in to comment.