- Issue created by @miguelbraga
- 🇵🇹Portugal miguelbraga
Im proposing this fix, if it makes any sense, I'm not a developer:
if ( isset($data['link']['href'], $router_item['tab_root_href'], $_GET['q']) && // Check if the variables are set is_array($data['link']['href']) && // Check if $data['link']['href'] is an array is_array($router_item['tab_root_href']) && // Check if $router_item['tab_root_href'] is an array is_array($_GET['q']) && // Check if $_GET['q'] is an array $data['link']['href'] == $router_item['tab_root_href'] && // Perform the comparison $data['link']['href'] != $_GET['q'] ) { $data['link']['localized_options']['attributes']['class'][] = 'active'; }
- Status changed to Needs review
over 1 year ago 6:52am 21 August 2023 - 🇮🇳India dineshkumarbollu
Hi miguelbraga
I am providing patch for this issue in D7, added isset() checks to ensure the existence of the required keys and used is_array() and is_string() functions to validate the data types,which helps to prevent the "array offset on value of type bool" error. - Status changed to RTBC
over 1 year ago 12:15pm 17 September 2023 - 🇮🇳India shubham_jain
@dineshkumarbollu, I review that this implies and moving it to the RTBC.