Time Conditions [Class]: Updates for PHP 8.1
This commit is contained in:
parent
a8adf18fcf
commit
85314b3a23
|
|
@ -79,7 +79,7 @@
|
||||||
|
|
||||||
//build the delete array
|
//build the delete array
|
||||||
foreach ($records as $x => $record) {
|
foreach ($records as $x => $record) {
|
||||||
if ($record['checked'] == 'true' && is_uuid($record['uuid'])) {
|
if (!empty($record['checked']) && $record['checked'] == 'true' && is_uuid($record['uuid'])) {
|
||||||
|
|
||||||
//build delete array
|
//build delete array
|
||||||
$array[$this->table][$x][$this->uuid_prefix.'uuid'] = $record['uuid'];
|
$array[$this->table][$x][$this->uuid_prefix.'uuid'] = $record['uuid'];
|
||||||
|
|
@ -161,7 +161,7 @@
|
||||||
|
|
||||||
//get current toggle state
|
//get current toggle state
|
||||||
foreach($records as $x => $record) {
|
foreach($records as $x => $record) {
|
||||||
if ($record['checked'] == 'true' && is_uuid($record['uuid'])) {
|
if (!empty($record['checked']) && $record['checked'] == 'true' && is_uuid($record['uuid'])) {
|
||||||
$uuids[] = "'".$record['uuid']."'";
|
$uuids[] = "'".$record['uuid']."'";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -252,7 +252,7 @@
|
||||||
|
|
||||||
//get checked records
|
//get checked records
|
||||||
foreach($records as $x => $record) {
|
foreach($records as $x => $record) {
|
||||||
if ($record['checked'] == 'true' && is_uuid($record['uuid'])) {
|
if (!empty($record['checked']) && $record['checked'] == 'true' && is_uuid($record['uuid'])) {
|
||||||
$uuids[] = "'".$record['uuid']."'";
|
$uuids[] = "'".$record['uuid']."'";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -264,7 +264,7 @@
|
||||||
$sql = "select * from v_".$this->table." ";
|
$sql = "select * from v_".$this->table." ";
|
||||||
$sql .= "where ".$this->uuid_prefix."uuid in (".implode(', ', $uuids).") ";
|
$sql .= "where ".$this->uuid_prefix."uuid in (".implode(', ', $uuids).") ";
|
||||||
$database = new database;
|
$database = new database;
|
||||||
$rows = $database->select($sql, $parameters, 'all');
|
$rows = $database->select($sql, $parameters ?? null, 'all');
|
||||||
if (is_array($rows) && @sizeof($rows) != 0) {
|
if (is_array($rows) && @sizeof($rows) != 0) {
|
||||||
$y = 0;
|
$y = 0;
|
||||||
foreach ($rows as $x => $row) {
|
foreach ($rows as $x => $row) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue