Revert "fix(sidebar): null-check en route de children para evitar TypeError en PHP 8.2"

This reverts commit ba27511414.
This commit is contained in:
Lizandro Guarnizo
2026-06-24 08:54:17 -05:00
parent ba27511414
commit 3b1b7c9333
2 changed files with 4 additions and 5 deletions
+3 -4
View File
@@ -177,7 +177,7 @@ if (class_exists('ModuleRegistry', false)) {
// Sub-acordeón para links con hijos
$subId = $catId . '-sub-' . $slug . '-' . $lnkIdx;
$hasActive = false;
foreach ($children as $ch) { if (!empty($ch['route']) && $_isActive($ch['route']) !== '') { $hasActive = true; break; } }
foreach ($children as $ch) { if ($_isActive($ch['route']) !== '') { $hasActive = true; break; } }
?>
<li class="sb-sub-header<?= $hasActive ? ' has-active' : '' ?>"
onclick="sbToggleSub('<?= $subId ?>',this,event)">
@@ -188,9 +188,8 @@ if (class_exists('ModuleRegistry', false)) {
<li class="sb-sub-group<?= $hasActive ? '' : ' collapsed' ?>" id="<?= $subId ?>">
<ul>
<?php foreach ($children as $ch):
$chRoute = $ch['route'] ?? '';
$href = $chRoute ? $_base . $chRoute : '#';
$active = $chRoute ? $_isActive($chRoute) : '';
$href = $_base . $ch['route'];
$active = $_isActive($ch['route']);
?>
<li><a href="<?= htmlspecialchars($href, ENT_QUOTES, 'UTF-8') ?>"
class="nav-link nav-link-sub<?= $active ?>">