Skip to content

Commit

Permalink
Update v3.5.20221020 (fix warning)
Browse files Browse the repository at this point in the history
  • Loading branch information
Wilkware committed Oct 30, 2022
1 parent eb82a7c commit a57535e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 15 deletions.
6 changes: 2 additions & 4 deletions Abfall_IO/module.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class Abfall_IO extends IPSModule
use EventHelper;
use DebugHelper;
use ServiceHelper;
use VariableHelper;

// Service Provider
private const SERVICE_PROVIDER = 'abpio';
Expand Down Expand Up @@ -512,10 +513,7 @@ public function Update()

// write data to variable
foreach ($vars as $key => $var) {
$varId = @$this->GetIDForIdent($var['ident']);
if ($varId != 0) {
SetValueString($varId, $var['date']);
}
$this->SetValueString((string)$var['ident'], $var['date']);
}

// execute Script
Expand Down
6 changes: 2 additions & 4 deletions Awido/module.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class Awido extends IPSModule
use EventHelper;
use DebugHelper;
use ServiceHelper;
use VariableHelper;

// Service Provider
private const SERVICE_PROVIDER = 'awido';
Expand Down Expand Up @@ -257,11 +258,8 @@ public function Update()
// write data to variable
foreach ($array as $line) {
if ($line['exist'] == true) {
$varId = @$this->GetIDForIdent($line['ident']);
// falls haendich geloescht, dann eben nicht!
if ($varId != 0) {
SetValueString($varId, $line['value']);
}
$this->SetValueString((string)$line['ident'], $line['value']);
}
}

Expand Down
6 changes: 2 additions & 4 deletions MyMuell/module.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class MyMuell extends IPSModule
use EventHelper;
use DebugHelper;
use ServiceHelper;
use VariableHelper;

// Service Provider
private const SERVICE_PROVIDER = 'mymde';
Expand Down Expand Up @@ -188,10 +189,7 @@ public function Update()

// write data to variable
foreach ($waste as $key => $var) {
$varId = @$this->GetIDForIdent($key);
if ($varId != 0) {
SetValueString($varId, date('d.m.Y', $var['date']));
}
$this->SetValueString((string)$key, date('d.m.Y', $var['date']));
}

// execute Script
Expand Down
6 changes: 3 additions & 3 deletions libs/VariableHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ trait VariableHelper
*/
protected function SetValueBoolean(string $ident, bool $value)
{
$id = $this->GetIDForIdent($ident);
$id = @$this->GetIDForIdent($ident);
if ($id !== false) {
SetValueBoolean($id, $value);
}
Expand All @@ -41,7 +41,7 @@ protected function SetValueBoolean(string $ident, bool $value)
*/
protected function SetValueString(string $ident, string $value)
{
$id = $this->GetIDForIdent($ident);
$id = @$this->GetIDForIdent($ident);
if ($id !== false) {
SetValueString($id, $value);
}
Expand All @@ -55,7 +55,7 @@ protected function SetValueString(string $ident, string $value)
*/
protected function SetValueInteger(string $ident, int $value)
{
$id = $this->GetIDForIdent($ident);
$id = @$this->GetIDForIdent($ident);
if ($id !== false) {
SetValueInteger($id, $value);
}
Expand Down

0 comments on commit a57535e

Please sign in to comment.