Autor Thema: Use of uninitialized value in concatenation (.) or string at ./FHEM/10_IT.pm  (Gelesen 936 mal)

Offline vbs

  • Hero Member
  • *****
  • Beiträge: 2295
Hi Ihr,

ich hab hier regelmäßig diese Warning:

2019.04.12 22:13:10.883 1: PERL WARNING: Use of uninitialized value $evcode in concatenation (.) or string at ./FHEM/10_IT.pm line 775.
2019.04.12 22:13:10.883 1: stacktrace:
2019.04.12 22:13:10.883 1:     main::__ANON__                      called by ./FHEM/10_IT.pm (775)
2019.04.12 22:13:10.883 1:     main::IT_Define                     called by fhem.pl (3704)
2019.04.12 22:13:10.883 1:     main::CallFn                        called by fhem.pl (2063)
2019.04.12 22:13:10.883 1:     main::CommandDefine                 called by fhem.pl (1229)
2019.04.12 22:13:10.883 1:     main::AnalyzeCommand                called by fhem.pl (1082)
2019.04.12 22:13:10.884 1:     main::AnalyzeCommandChain           called by fhem.pl (1370)
2019.04.12 22:13:10.884 1:     main::CommandInclude                called by fhem.pl (599)

Lösung ist wohl hier in dem Code:
    #Log3 $hash,2,"ITdefine 1527: $name a3=" . $a[3];
    $housecode = $a[2];
    if (substr($housecode,0,4) eq '1527') {
      my $evcode;

Das
      my $evcode;
in
      my $evcode = "";
zu ändern.

Ähnliches Muster wie hier mMn:
https://forum.fhem.de/index.php/topic,95217.0.html
Zustimmung Zustimmung x 1 Liste anzeigen

Offline vbs

  • Hero Member
  • *****
  • Beiträge: 2295
Jetzt um eine Zeile verschoben:
2019.07.08 13:53:59.127 1: PERL WARNING: Use of uninitialized value $evcode in concatenation (.) or string at ./FHEM/10_IT.pm line 776.
2019.07.08 13:53:59.127 1: stacktrace:
2019.07.08 13:53:59.127 1:     main::__ANON__                      called by ./FHEM/10_IT.pm (776)
2019.07.08 13:53:59.127 1:     main::IT_Define                     called by fhem.pl (3754)
2019.07.08 13:53:59.127 1:     main::CallFn                        called by fhem.pl (2075)
2019.07.08 13:53:59.127 1:     main::CommandDefine                 called by fhem.pl (1236)
2019.07.08 13:53:59.127 1:     main::AnalyzeCommand                called by fhem.pl (1089)
2019.07.08 13:53:59.127 1:     main::AnalyzeCommandChain           called by fhem.pl (1377)
2019.07.08 13:53:59.127 1:     main::CommandInclude                called by fhem.pl (601)
Zustimmung Zustimmung x 1 Liste anzeigen

Offline vbs

  • Hero Member
  • *****
  • Beiträge: 2295
Wenn ich darf, würde ich den Fix einfach selbst einchecken?  :-X

Offline mahowi

  • Developer
  • Hero Member
  • ****
  • Beiträge: 1071
Kann ich bestätigen, die Meldung habe ich auch ständig im Log.
CUBe (MAX): HT, FK | CUBe (SlowRF): ESA2000WZ
JeeLink: LaCrosse | nanoCUL433: Smartwares SHS-51001-EU, EM1000GZ
ZME_UZB1: GreenWave PowerNode, Popp Thermostat | SIGNALDuino: HE877, X10 MS14A, Revolt NC-5462,  IT Steckdosen + PIR
tado° | Milight | HUE, Lightify | SmarterCoffee