Added this earlier but apparently I didn't properly comment the code:
Debug Log:
Code:
text/plain myDEBUG-20260208-184645-064063-warning.log ( ASCII text )
[08-Feb-2026 18:46:45 UTC] Request URI: /dev-2026/, IP address: 46.110.82.133, Language id 1
#0 /home/samad616/public_html/dev-2026/includes/templates/soldiers_custom/common/tpl_header.php(45): zen_debug_error_handler()
#1 /home/samad616/public_html/dev-2026/includes/templates/template_default/common/tpl_main_page.php(93): require('/home/samad616/...')
#2 /home/samad616/public_html/dev-2026/index.php(94): require('/home/samad616/...')
--> PHP Warning: Undefined variable $detect in /home/samad616/public_html/dev-2026/includes/templates/soldiers_custom/common/tpl_header.php on line 45.
[08-Feb-2026 18:46:45 UTC] PHP Fatal error: Uncaught Error: Call to a member function isMobile() on null in /home/samad616/public_html/dev-2026/includes/templates/soldiers_custom/common/tpl_header.php:45
Stack trace:
#0 /home/samad616/public_html/dev-2026/includes/templates/template_default/common/tpl_main_page.php(93): require()
#1 /home/samad616/public_html/dev-2026/index.php(94): require('/home/samad616/...')
#2 {main}
thrown in /home/samad616/public_html/dev-2026/includes/templates/soldiers_custom/common/tpl_header.php on line 45
[08-Feb-2026 18:46:45 UTC] Request URI: /dev-2026/, IP address: 46.110.82.133
--> PHP Fatal error: Uncaught Error: Call to a member function isMobile() on null in /home/samad616/public_html/dev-2026/includes/templates/soldiers_custom/common/tpl_header.php:45
Stack trace:
#0 /home/samad616/public_html/dev-2026/includes/templates/template_default/common/tpl_main_page.php(93): require()
#1 /home/samad616/public_html/dev-2026/index.php(94): require('/home/samad616/...')
#2 {main}
thrown in /home/samad616/public_html/dev-2026/includes/templates/soldiers_custom/common/tpl_header.php on line 45.
[08-Feb-2026 18:46:45 UTC] Request URI: /dev-2026/, IP address: 46.110.82.133
--> PHP Fatal error: Uncaught Error: Call to a member function isMobile() on null in /home/samad616/public_html/dev-2026/includes/templates/soldiers_custom/common/tpl_header.php:45
Stack trace:
#0 /home/samad616/public_html/dev-2026/includes/templates/template_default/common/tpl_main_page.php(93): require()
#1 /home/samad616/public_html/dev-2026/index.php(94): require('/home/samad616/...')
#2 {main}
thrown in /home/samad616/public_html/dev-2026/includes/templates/soldiers_custom/common/tpl_header.php on line 45.
tpl_header.php starting at line 44:
PHP Code:
<?php
if ( $detect->isMobile() && !$detect->isTablet() || $_SESSION['layoutType'] == 'mobile' ) {
echo '<div class="header Fixed"><a href="#menu" title="Menu"><i class="fa-solid fa-bars"></i></a></div>';
} else if ( $detect->isTablet() || $_SESSION['layoutType'] == 'tablet' ){
echo '<div class="header Fixed"><a href="#menu" title="Menu"><i class="fa-solid fa-bars"></i></a></div>';
} else {
//
}