In the 10 whitespaces els if statement, there should be a check for $k2. If it doesn't exist, an undefined variable error is returned:
if ($k2) { if($hdr) { $pro->{$typ}->{$hdr}->{$k2}->{$k3} = $v3; } else { $pro->{$typ}->{$k2}->{$k3} = $v3; } } else { if ($hdr) { $pro->{$typ}->{$hdr}->{$k3} = $v3; } else { $pro->{$typ}->{$k3} = $v3; } }
I have also modified the code in order to enable automatic calculation of the whitespaces, instead of declaring by hand the four cases (4, 6, 8, 10 whitespaces).
Andreas
In the 10 whitespaces els if statement, there should be a check for $k2. If it doesn't exist, an undefined variable error is returned:
if ($k2) {
$pro-> {$typ}- >{$hdr} ->{$k2} ->{$k3} = $v3;
$pro-> {$typ}- >{$k2}- >{$k3} = $v3;
$pro- >{$typ} ->{$hdr} ->{$k3} = $v3;
$pro->{ $typ}-> {$k3} = $v3;
if($hdr) {
} else {
}
} else {
if ($hdr) {
} else {
}
}
I have also modified the code in order to enable automatic calculation of the whitespaces, instead of declaring by hand the four cases (4, 6, 8, 10 whitespaces).
Andreas