mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-30 16:14:21 +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)
|
public function __construct($name, $duration = '1d', $replication = 1, $default = false)
|
||||||
{
|
{
|
||||||
$this->name = $name;
|
$this->name = (string) $name;
|
||||||
$this->duration = $duration;
|
$this->duration = $duration;
|
||||||
$this->replication = $replication;
|
$this->replication = (int) $replication;
|
||||||
$this->default = (bool) $default;
|
$this->default = (bool) $default;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -187,8 +187,8 @@ class Builder
|
|||||||
*/
|
*/
|
||||||
public function setTimeRange($from, $to)
|
public function setTimeRange($from, $to)
|
||||||
{
|
{
|
||||||
$fromDate = date('Y-m-d H:i:s', $from);
|
$fromDate = date('Y-m-d H:i:s', (int) $from);
|
||||||
$toDate = date('Y-m-d H:i:s', $to);
|
$toDate = date('Y-m-d H:i:s', (int) $to);
|
||||||
|
|
||||||
$this->where(array("time > '$fromDate'", "time < '$toDate'"));
|
$this->where(array("time > '$fromDate'", "time < '$toDate'"));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user