Leaf \ Exceptions \ ErrorException (E_NOTICE)
Undefined variable: config_userid Leaf\Exceptions\ErrorException thrown with message "Undefined variable: config_userid" Stacktrace: #9 Leaf\Exceptions\ErrorException in /www/wwwroot/contract-miner.com/build/design/core/pageTop.php:36 #8 Leaf\Exception\Run:handleError in /www/wwwroot/contract-miner.com/build/design/core/pageTop.php:36 #7 require_once in /www/wwwroot/contract-miner.com/build/pages/service/media/overview.php:34 #6 require_once in /www/wwwroot/contract-miner.com/routes/media.php:4 #5 {closure} in /www/wwwroot/contract-miner.com/vendor/leafs/router/src/Router/Core.php:466 #4 call_user_func_array in /www/wwwroot/contract-miner.com/vendor/leafs/router/src/Router/Core.php:466 #3 Leaf\Router\Core:invoke in /www/wwwroot/contract-miner.com/vendor/leafs/router/src/Router/Core.php:450 #2 Leaf\Router\Core:handle in /www/wwwroot/contract-miner.com/vendor/leafs/router/src/Router/Core.php:381 #1 Leaf\Router\Core:run in /www/wwwroot/contract-miner.com/vendor/leafs/leaf/src/App.php:430 #0 Leaf\App:run in /www/wwwroot/contract-miner.com/index.php:308
Stack frames (10)
9
Leaf\Exceptions\ErrorException
/build/design/core/pageTop.php36
8
Leaf\Exception\Run handleError
/build/design/core/pageTop.php36
7
require_once
/build/pages/service/media/overview.php34
6
require_once
/routes/media.php4
5
{closure}
/vendor/leafs/router/src/Router/Core.php466
4
call_user_func_array
/vendor/leafs/router/src/Router/Core.php466
3
Leaf\Router\Core invoke
/vendor/leafs/router/src/Router/Core.php450
2
Leaf\Router\Core handle
/vendor/leafs/router/src/Router/Core.php381
1
Leaf\Router\Core run
/vendor/leafs/leaf/src/App.php430
0
Leaf\App run
/index.php308
/www/wwwroot/contract-miner.com/build/design/core/pageTop.php
    1 => '/build/image/icons/round-star-[pink].svg', 
    2 => '/build/image/icons/round-star-[orange].svg',
    3 => '/build/image/icons/round-star-[blue].svg'
  ];
  $veteranBadgeIcon = $veteranBadgeIcons[$cnfVeteranTier] ?? $veteranBadgeIcons[0];
}
 
function ordinal($number) {
  if ($number == 0) return "0";
  $ends = ['th','st','nd','rd','th','th','th','th','th','th'];
  return ((($number % 100) >= 11) && (($number % 100) <= 13)) ? $number.'th' : $number.$ends[$number % 10];
}
 
// Fetch profile picture
$profilePicImage = '';
$profilePicSql = $conn->prepare("SELECT mb.s_badge_id, mbc.badge_img 
FROM member_badges mb
JOIN member_badges_config mbc ON mbc.profilePicture_id = mb.s_badge_id 
WHERE mb.userid = ? AND mb.selected = 1");
$profilePicSql->execute([$config_userid]);
if($profilePicSql->rowCount() > 0) {
  $profilePic = $profilePicSql->fetch(PDO::FETCH_ASSOC);
 
  $profilePicImage = $profilePic['badge_img'];
}
 
// Enable Sale Banner
$saleActive = false;
$pEventActive = true;
?>
 
<!-- SIDEBAR -->
<aside id="logo-sidebar" class="fixed top-0 left-0 z-40 w-[200px] h-screen pt-[75px] transition-transform -translate-x-full bg-gray-950 border-r border-gray-700 lg:-translate-x-full" aria-label="Sidebar">
  <div class="h-full bg-gray-950" data-simplebar>
    <?php 
    if(isset($_SESSION['username'])) { # Display sidebar for logged in users
      ?>
      <div class="mb-4 px-2">
        <div class="flex items-center gap-4">
          <a class="no-outline" href="<?=__LINK_CONTRACTOR__ . __CONFIG_USERNAME__;?>">
/www/wwwroot/contract-miner.com/build/design/core/pageTop.php
    1 => '/build/image/icons/round-star-[pink].svg', 
    2 => '/build/image/icons/round-star-[orange].svg',
    3 => '/build/image/icons/round-star-[blue].svg'
  ];
  $veteranBadgeIcon = $veteranBadgeIcons[$cnfVeteranTier] ?? $veteranBadgeIcons[0];
}
 
function ordinal($number) {
  if ($number == 0) return "0";
  $ends = ['th','st','nd','rd','th','th','th','th','th','th'];
  return ((($number % 100) >= 11) && (($number % 100) <= 13)) ? $number.'th' : $number.$ends[$number % 10];
}
 
// Fetch profile picture
$profilePicImage = '';
$profilePicSql = $conn->prepare("SELECT mb.s_badge_id, mbc.badge_img 
FROM member_badges mb
JOIN member_badges_config mbc ON mbc.profilePicture_id = mb.s_badge_id 
WHERE mb.userid = ? AND mb.selected = 1");
$profilePicSql->execute([$config_userid]);
if($profilePicSql->rowCount() > 0) {
  $profilePic = $profilePicSql->fetch(PDO::FETCH_ASSOC);
 
  $profilePicImage = $profilePic['badge_img'];
}
 
// Enable Sale Banner
$saleActive = false;
$pEventActive = true;
?>
 
<!-- SIDEBAR -->
<aside id="logo-sidebar" class="fixed top-0 left-0 z-40 w-[200px] h-screen pt-[75px] transition-transform -translate-x-full bg-gray-950 border-r border-gray-700 lg:-translate-x-full" aria-label="Sidebar">
  <div class="h-full bg-gray-950" data-simplebar>
    <?php 
    if(isset($_SESSION['username'])) { # Display sidebar for logged in users
      ?>
      <div class="mb-4 px-2">
        <div class="flex items-center gap-4">
          <a class="no-outline" href="<?=__LINK_CONTRACTOR__ . __CONFIG_USERNAME__;?>">
/www/wwwroot/contract-miner.com/build/pages/service/media/overview.php
    outline: none;
    font-size: 15px;
    transition: 0.4s;
  }

  .active, .accordionMedia:hover {
    background-color: #3E465B;
  }

  .panel {
    padding: 0 18px;
    background-color: #1d2333;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease-out;
  }
  </style>
</head>
<body class="bg-gray-900">
  <?php require_once(__BUILD_PAGE_BASE_TOP__); ?>
  <div class="px-2">
    <div class="max-w-[1200px]" style="margin:0 auto;">
      <div class="bg-gray-800 rounded-lg p-4 mb-6">
        <h2 class="text-2xl font-bold text-white mb-2">Recommended Reads</h2>
      </div>

      <?php
      $stmt = $conn->query("SELECT * FROM blog_posts");
      if($stmt->rowCount() > 0) {
        ?>
        <div class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-6 mt-6">
          <div class="bg-gray-800 rounded-lg overflow-hidden shadow-lg transition-transform duration-300 hover:transform hover:scale-105">
            <img src="<?=__BUILD_IMAGES__;?>media/gettingStarted.jpg" class="w-full h-48 object-cover">
            <div class="p-4">
              <div class="text-gray-400 text-sm mb-2 flex items-center justify-center">
                <svg xmlns="https://www.w3.org/2000/svg" class="h-4 w-4 mr-1" fill="none" viewBox="0 0 24 24" stroke="currentColor">
                  <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" />
                  <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z" />
                </svg>
              </div>
/www/wwwroot/contract-miner.com/routes/media.php
<?php
app()->match('GET|POST', '/media', function () {
  require_once(__WEBSITE_CORE_ROOT__ . '/core/common_globals.php');
  require_once(__WEBSITE_CORE_ROOT__ . '/build/pages/service/media/overview.php');
});

app()->match('GET|POST', '/news', function () {
  header('Location: /media');
  exit;
});

app()->match('GET|POST', '/blog', function () { # Blog Overview
  header('Location: /media');
  exit;
});

// CUSTOM BLOG POSTS
app()->match('GET|POST', '/blog/get-started', function () { # Blog Overview
  require_once(__WEBSITE_CORE_ROOT__ . '/core/common_globals.php');
  require_once(__WEBSITE_CORE_ROOT__ . '/build/pages/service/media/blogs/posts/guideGetStarted.php');
});

app()->match('GET|POST', '/blog/winter-spring', function () { # Blog Overview
  require_once(__WEBSITE_CORE_ROOT__ . '/core/common_globals.php');
  require_once(__WEBSITE_CORE_ROOT__ . '/build/pages/service/media/blogs/posts/eventWinterSpring.php');
});



app()->all('/news/{news_post_id}', function ($news_post_id) { # News Post
  if(!empty($news_post_id)) {
    require_once(__WEBSITE_CORE_ROOT__ . '/core/common_globals.php');

    $news_post_id = htmlspecialchars($news_post_id);

    require_once(__WEBSITE_CORE_ROOT__ . '/build/pages/service/media/news/news-post.php');
  } else { header('Location: /'); exit; }
});

app()->all('/blog/{blog_post_id}', function ($blog_post_id) { # Display Blog Post
/www/wwwroot/contract-miner.com/vendor/leafs/router/src/Router/Core.php
                }, $matches, array_keys($matches));
 
                // Call the handling function with the URL parameters if the desired input is callable
                static::invoke($route['handler'], $params);
                ++$numHandled;
 
                if ($quitAfterRun) {
                    break;
                }
            }
        }
 
        return $numHandled;
    }
 
    private static function invoke($handler, $params = [])
    {
        if (is_callable($handler)) {
            call_user_func_array(
                $handler,
                $params
            );
        }
        // If not, check the existence of special parameters
        elseif (stripos($handler, '@') !== false) {
            list($controller, $method) = explode('@', $handler);
 
            if (!class_exists($controller)) {
                trigger_error("$controller not found. Cross-check the namespace if you're sure the file exists");
            }
 
            if (!method_exists($controller, $method)) {
                trigger_error("$method method not found in $controller");
            }
 
            // First check if is a static method, directly trying to invoke it.
            // If isn't a valid static method, we will try as a normal method invocation.
            if (call_user_func_array([new $controller(), $method], $params) === false) {
                // Try to call the method as a non-static method. (the if does nothing, only avoids the notice)
                if (forward_static_call_array([$controller, $method], $params) === false);
/www/wwwroot/contract-miner.com/vendor/leafs/router/src/Router/Core.php
                }, $matches, array_keys($matches));
 
                // Call the handling function with the URL parameters if the desired input is callable
                static::invoke($route['handler'], $params);
                ++$numHandled;
 
                if ($quitAfterRun) {
                    break;
                }
            }
        }
 
        return $numHandled;
    }
 
    private static function invoke($handler, $params = [])
    {
        if (is_callable($handler)) {
            call_user_func_array(
                $handler,
                $params
            );
        }
        // If not, check the existence of special parameters
        elseif (stripos($handler, '@') !== false) {
            list($controller, $method) = explode('@', $handler);
 
            if (!class_exists($controller)) {
                trigger_error("$controller not found. Cross-check the namespace if you're sure the file exists");
            }
 
            if (!method_exists($controller, $method)) {
                trigger_error("$method method not found in $controller");
            }
 
            // First check if is a static method, directly trying to invoke it.
            // If isn't a valid static method, we will try as a normal method invocation.
            if (call_user_func_array([new $controller(), $method], $params) === false) {
                // Try to call the method as a non-static method. (the if does nothing, only avoids the notice)
                if (forward_static_call_array([$controller, $method], $params) === false);
/www/wwwroot/contract-miner.com/vendor/leafs/router/src/Router/Core.php
            $route['pattern'] = preg_replace('/\/{(.*?)}/', '/(.*?)', $route['pattern']);
 
            // we have a match!
            if (preg_match_all('#^' . $route['pattern'] . '$#', $uri, $matches, PREG_OFFSET_CAPTURE)) {
                // Rework matches to only contain the matches, not the orig string
                $matches = array_slice($matches, 1);
 
                // Extract the matched URL parameters (and only the parameters)
                $params = array_map(function ($match, $index) use ($matches) {
                    // We have a following parameter: take the substring from the current param position until the next one's position (thank you PREG_OFFSET_CAPTURE)
                    if (isset($matches[$index + 1]) && isset($matches[$index + 1][0]) && is_array($matches[$index + 1][0])) {
                        return trim(substr($match[0][0], 0, $matches[$index + 1][0][1] - $match[0][1]), '/');
                    }
 
                    // We have no following parameters: return the whole lot
                    return isset($match[0][0]) ? trim($match[0][0], '/') : null;
                }, $matches, array_keys($matches));
 
                // Call the handling function with the URL parameters if the desired input is callable
                static::invoke($route['handler'], $params);
                ++$numHandled;
 
                if ($quitAfterRun) {
                    break;
                }
            }
        }
 
        return $numHandled;
    }
 
    private static function invoke($handler, $params = [])
    {
        if (is_callable($handler)) {
            call_user_func_array(
                $handler,
                $params
            );
        }
        // If not, check the existence of special parameters
/www/wwwroot/contract-miner.com/vendor/leafs/router/src/Router/Core.php
                $middleware[0]->call();
            }
        }
 
        static::callHook('router.before.route');
 
        static::$requestedMethod = \Leaf\Http\Request::getMethod();
 
        if (isset(static::$routeSpecificMiddleware[static::$requestedMethod])) {
            static::handle(static::$routeSpecificMiddleware[static::$requestedMethod]);
        }
 
        static::callHook('router.before.dispatch');
 
        $numHandled = 0;
 
        if (isset(static::$routes[static::$requestedMethod])) {
            $numHandled = static::handle(
                static::$routes[static::$requestedMethod],
                true
            );
        }
 
        static::callHook('router.after.dispatch');
 
        if ($numHandled === 0) {
            if (!static::$notFoundHandler) {
                if (class_exists('Leaf\App')) {
                    static::$notFoundHandler = function () {
                        \Leaf\Exception\General::default404();
                    };
                } else {
                    static::$notFoundHandler = function () {
                        echo 'Route not found';
                    };
                }
            }
 
            static::invoke(static::$notFoundHandler);
        }
/www/wwwroot/contract-miner.com/vendor/leafs/leaf/src/App.php
        if (class_exists('Leaf\Http\Cors')) {
            Http\Cors::config($options);
        } else {
            trigger_error('Cors module not found! Run `composer require leafs/cors` to install the CORS module. This is required to configure CORS.');
        }
    }
 
    /**
     * @inheritdoc
     */
    public static function run(?callable $callback = null)
    {
        if (class_exists('Leaf\Eien\Server')) {
            server()
                ->wrap(function () use ($callback) {
                    parent::run($callback);
                })
                ->listen();
        } else {
            return parent::run($callback);
        }
    }
}
 
/www/wwwroot/contract-miner.com/index.php
 
/***** EVENTS ROUTER *****/
require_once(__WEBSITE_CORE_ROOT__ . '/routes/events.php'); # Events Router
 
 
require_once(__WEBSITE_CORE_ROOT__ . '/routes/userAuth.php'); # User Auth Route
 
 
require_once(__WEBSITE_CORE_ROOT__ . '/routes/user.php'); # User pages (Public Profile / Leaderboards)
 
 
/***** MEDIA ROUTER - BLOGS // NEWS *****/
require_once(__WEBSITE_CORE_ROOT__ . '/routes/media.php');
 
 
/***** SERVICE PAGES *****/
require_once(__WEBSITE_CORE_ROOT__ . '/routes/service.php');
 
 
app()->run(); # Run the router

Environment & details:

empty
empty
empty
Key Value
PHPSESSID csqsuo4n8jd0sgahi85ajutjv3
empty
Key Value
USER www
HOME /home/www
HTTP_COOKIE PHPSESSID=csqsuo4n8jd0sgahi85ajutjv3
HTTP_CF_IPCOUNTRY US
HTTP_CF_CONNECTING_IP 18.221.72.117
HTTP_CDN_LOOP cloudflare; loops=1
HTTP_X_FORWARDED_PROTO https
HTTP_X_FORWARDED_FOR 18.221.72.117
HTTP_ACCEPT_ENCODING gzip, br
HTTP_CF_RAY 93d05f821af9e80e-ORD
HTTP_REFERER https://www.contract-miner.com/blog
HTTP_USER_AGENT Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; [email protected])
HTTP_ACCEPT */*
HTTP_CF_VISITOR {"scheme":"https"}
HTTP_HOST www.contract-miner.com
PATH_INFO
REDIRECT_STATUS 200
SERVER_NAME contract-miner.com
SERVER_PORT 443
SERVER_ADDR 167.86.93.111
REMOTE_PORT 50048
REMOTE_ADDR 172.71.255.41
SERVER_SOFTWARE nginx/1.19.8
GATEWAY_INTERFACE CGI/1.1
HTTPS on
REQUEST_SCHEME https
SERVER_PROTOCOL HTTP/2.0
DOCUMENT_ROOT /www/wwwroot/contract-miner.com
DOCUMENT_URI /index.php
REQUEST_URI /media
SCRIPT_NAME /index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD GET
QUERY_STRING
SCRIPT_FILENAME /www/wwwroot/contract-miner.com/index.php
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1746785070.4683
REQUEST_TIME 1746785070
empty
0. Leaf\Exception\Handler\PrettyPageHandler