From b64b2ae1ea60748abd34777c8046b2d0c2e86057 Mon Sep 17 00:00:00 2001 From: Manigandan Gopalakrishnan Date: Fri, 5 Dec 2025 20:36:31 +0530 Subject: [PATCH] RDKBACCL-1223,RDKBACCL-1224: "Local IP Network" and "Port forwarding add" from WebUI results in "500 Internal Server Error" Reason for change: Avoiding 500 error in Non-IPv6 environment Test procedure: Able to load both pages in WebUI Risks: Low Signed-off-by: Manigandan Gopalakrishnan --- source/Styles/xb3/jst/local_ip_configuration.jst | 8 +++++++- source/Styles/xb3/jst/port_forwarding_add.jst | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/source/Styles/xb3/jst/local_ip_configuration.jst b/source/Styles/xb3/jst/local_ip_configuration.jst index db5cf5c..f3469a9 100644 --- a/source/Styles/xb3/jst/local_ip_configuration.jst +++ b/source/Styles/xb3/jst/local_ip_configuration.jst @@ -1323,7 +1323,13 @@ $('#restore_ipv6').click(function(e) { //2040::/64, 2040:1::/64, 2040:1:2::/64 and 2040:1:2:3::/64 $prefix_arr = explode('::/', getStr("Device.IP.Interface.1.IPv6Prefix.1.Prefix")); $ipv6_prefix_arr = explode(':', $prefix_arr[0]); - $ipa_size = count($ipv6_prefix_arr); + if($ipv6_prefix_arr == undefined) + { + $ipa_size = 0; + $ipv6_prefix_arr = 0; + } + else + $ipa_size = count($ipv6_prefix_arr); $v6_begin_addr = $dhcpv6_value["v6_begin_addr"]; $v6_beg_add_arr = explode(':', $v6_begin_addr); ?> diff --git a/source/Styles/xb3/jst/port_forwarding_add.jst b/source/Styles/xb3/jst/port_forwarding_add.jst index 023f899..6457bc0 100644 --- a/source/Styles/xb3/jst/port_forwarding_add.jst +++ b/source/Styles/xb3/jst/port_forwarding_add.jst @@ -483,7 +483,13 @@ $('#device').click(function(){