mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-27 00:25:06 +02:00
Cast all to (int)
This commit is contained in:
@@ -40,9 +40,9 @@ class RetentionPolicy
|
||||
*/
|
||||
public function __construct($name, $duration = '1d', $replication = 1, $default = false)
|
||||
{
|
||||
$this->name = $name;
|
||||
$this->name = (string) $name;
|
||||
$this->duration = $duration;
|
||||
$this->replication = $replication;
|
||||
$this->replication = (int) $replication;
|
||||
$this->default = (bool) $default;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -187,8 +187,8 @@ class Builder
|
||||
*/
|
||||
public function setTimeRange($from, $to)
|
||||
{
|
||||
$fromDate = date('Y-m-d H:i:s', $from);
|
||||
$toDate = date('Y-m-d H:i:s', $to);
|
||||
$fromDate = date('Y-m-d H:i:s', (int) $from);
|
||||
$toDate = date('Y-m-d H:i:s', (int) $to);
|
||||
|
||||
$this->where(array("time > '$fromDate'", "time < '$toDate'"));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user