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
+1 -1
View File
@@ -78,7 +78,7 @@ $adminNombre = $_SESSION['admin_user']['full_name'] ?? $_SESSION['admin_user']['
<title><?= htmlspecialchars($deskNombre ?? 'Recepción') ?> — Turnero</title> <title><?= htmlspecialchars($deskNombre ?? 'Recepción') ?> — Turnero</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet"> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" rel="stylesheet"> <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
<link href="<?= BASE_URL ?>assets/css/styles.css?v=14" rel="stylesheet"> <link href="<?= BASE_URL ?>assets/css/styles.css?v=12" rel="stylesheet">
<style> <style>
/* ── Layout de dos columnas ── */ /* ── Layout de dos columnas ── */
.rec-layout { .rec-layout {
+3 -4
View File
@@ -177,7 +177,7 @@ if (class_exists('ModuleRegistry', false)) {
// Sub-acordeón para links con hijos // Sub-acordeón para links con hijos
$subId = $catId . '-sub-' . $slug . '-' . $lnkIdx; $subId = $catId . '-sub-' . $slug . '-' . $lnkIdx;
$hasActive = false; $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' : '' ?>" <li class="sb-sub-header<?= $hasActive ? ' has-active' : '' ?>"
onclick="sbToggleSub('<?= $subId ?>',this,event)"> onclick="sbToggleSub('<?= $subId ?>',this,event)">
@@ -188,9 +188,8 @@ if (class_exists('ModuleRegistry', false)) {
<li class="sb-sub-group<?= $hasActive ? '' : ' collapsed' ?>" id="<?= $subId ?>"> <li class="sb-sub-group<?= $hasActive ? '' : ' collapsed' ?>" id="<?= $subId ?>">
<ul> <ul>
<?php foreach ($children as $ch): <?php foreach ($children as $ch):
$chRoute = $ch['route'] ?? ''; $href = $_base . $ch['route'];
$href = $chRoute ? $_base . $chRoute : '#'; $active = $_isActive($ch['route']);
$active = $chRoute ? $_isActive($chRoute) : '';
?> ?>
<li><a href="<?= htmlspecialchars($href, ENT_QUOTES, 'UTF-8') ?>" <li><a href="<?= htmlspecialchars($href, ENT_QUOTES, 'UTF-8') ?>"
class="nav-link nav-link-sub<?= $active ?>"> class="nav-link nav-link-sub<?= $active ?>">