Skip to content

Commit

Permalink
count korrigiert für php8.3
Browse files Browse the repository at this point in the history
count korrigiert für php8.3
  • Loading branch information
christian1180 committed May 5, 2024
1 parent c9a976c commit 1fcbded
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions diagramm_collect.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,17 +137,17 @@
$lines = file("cache/diagramm_change_".$states['ise_id']."_".$history[$historyZaehler].".csv");

// Sortiere alte Einträge aus
if(count($lines)>= $history[$historyZaehler])
if(count((array)$lines)>= $history[$historyZaehler])
{
$Startbei = (count($lines) - $history[$historyZaehler]);
$Startbei = (count((array)$lines) - $history[$historyZaehler]);
}
else
{
$Startbei = 0;
}
echo "<br>Starte Bereinigung , daher Werte ab: ".$Startbei." - [History -> ".$history[$historyZaehler]."]<br>";

for($i=0;$i < count($lines); $i++)
for($i=0;$i < count((array)$lines); $i++)
{
if($i >= $Startbei)
{
Expand Down Expand Up @@ -231,16 +231,16 @@
$lines = file("cache/diagramm_".$states['ise_id']."_".$history[$historyZaehler].".csv");

// Sortiere alte Einträge aus
if(count($lines)>= $history[$historyZaehler])
if(count((array)$lines)>= $history[$historyZaehler])
{
$Startbei = (count($lines) - $history[$historyZaehler]);
$Startbei = (count((array)$lines) - $history[$historyZaehler]);
}
else
{
$Startbei = 0;
}
echo "<br>Starte Bereinigung , daher Werte ab: ".$Startbei." - [History -> ".$history[$historyZaehler]."]<br>";
for($i=0;$i < count($lines); $i++)
for($i=0;$i < count((array)$lines); $i++)
{
if($i >= $Startbei)
{
Expand Down
4 changes: 2 additions & 2 deletions import.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@

// Virtuelle Fernbedienung
$device = $statesXml->xpath('//device[contains(@name, "HM-RCV-50")]');
if(count($device) > 0) {
if(count((array)$device) > 0) {
$device = $device[0];

$dummy = array(
Expand Down Expand Up @@ -114,7 +114,7 @@

// Channels Virtuelle Fernbedienung
$device = $statesXml->xpath('//device[contains(@name, "HM-RCV-50")]');
if(count($device) > 0) {
if(count((array)$device) > 0) {
$device = $device[0];

$channelXml = $statesXml->xpath('//device[@ise_id="' . strval($device['ise_id']) . '"]/channel');
Expand Down

0 comments on commit 1fcbded

Please sign in to comment.