From a9f7302208ccc5d9350e17347d4476aeb54f562c Mon Sep 17 00:00:00 2001 From: jpawlowski Date: Sun, 6 Apr 2014 21:05:01 +0000 Subject: [PATCH] ONKYO_AVR: fix video-in/out parser warning git-svn-id: https://svn.fhem.de/fhem/trunk@5463 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/70_ONKYO_AVR.pm | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/fhem/FHEM/70_ONKYO_AVR.pm b/fhem/FHEM/70_ONKYO_AVR.pm index f1863e69c..cb11c0498 100644 --- a/fhem/FHEM/70_ONKYO_AVR.pm +++ b/fhem/FHEM/70_ONKYO_AVR.pm @@ -24,7 +24,7 @@ # along with fhem. If not, see . # # -# Version: 1.0.3 +# Version: 1.0.4 # # Major Version History: # - 1.0.0 - 2013-12-16 @@ -432,7 +432,10 @@ sub ONKYO_AVR_GetStatus($;$) { # Video-in resolution my @vidin_res_string = split( / +/, $video_split[1] ); my $vidin_res; - if ( uc( $vidin_res_string[0] ) ne "UNKNOWN" + if ( defined( $vidin_res_string[0] ) + && defined( $vidin_res_string[2] ) + && defined( $vidin_res_string[3] ) + && uc( $vidin_res_string[0] ) ne "UNKNOWN" && uc( $vidin_res_string[2] ) ne "UNKNOWN" && uc( $vidin_res_string[3] ) ne "UNKNOWN" ) { @@ -448,7 +451,10 @@ sub ONKYO_AVR_GetStatus($;$) { # Video-out resolution my @vidout_res_string = split( / +/, $video_split[5] ); my $vidout_res; - if ( uc( $vidout_res_string[0] ) ne "UNKNOWN" + if ( defined( $vidout_res_string[0] ) + && defined( $vidout_res_string[2] ) + && defined( $vidout_res_string[3] ) + && uc( $vidout_res_string[0] ) ne "UNKNOWN" && uc( $vidout_res_string[2] ) ne "UNKNOWN" && uc( $vidout_res_string[3] ) ne "UNKNOWN" ) {