I have checked log file exc.log
[2020-01-06 11:20:35] main.CRITICAL: Notice: Undefined offset: 2 in /var/www/vhosts/exmp.com/httpdocs/app/design/frontend/Smartwave/porto/Magento_Catalog/templates/category/subcategory.phtml on line 5 {"exception":"[object] (Exception(code: Notice: Undefined offset: 2 in /var/www/vhosts/exmp.com/httpdocs/app/design/frontend/Smartwave/porto/Magento_Catalog//category/subcategory.phtml on line 5 at /var/www/vhosts/exmp.com/httpdocs/vendor/magento/framework/App/ ErrorHandler.php:61)"} []
subcategory.phtml File Code
<?php
$curr_url = $_SERVER['REQUEST_URI'];
$exp_url = explode('/', $curr_url);
//print_r($exp_url);
if($exp_url[2] == 'xyz.html' || $exp_url[2] == 'xyz'){
$classType='xyz';
}else if($exp_url[2] == 'abc.html' || $exp_url[2] == 'abc'){
$classType='abc xyz;
}else{
$classType='tool-another';
}
?>