15. Whoops\Exception\ErrorException
…/­views/­2022/­course.php8
14. Whoops\Run handleError
…/­views/­2022/­course.php8
13. include
…/­vendor/­league/­plates/­src/­Template/­Template.php169
12. League\Plates\Template\Template League\Plates\Template\{closure}
…/­vendor/­league/­plates/­src/­Template/­Template.php170
11. League\Plates\Template\Template render
…/­vendor/­league/­plates/­src/­Engine.php304
10. League\Plates\Engine render
…/­src/­App/­Application.php131
9. App\Application newRender
…/­index.php196
8. {closure}
<#unknown>0
7. call_user_func_array
…/­vendor/­league/­route/­src/­Strategy/­RequestResponseStrategy.php17
6. League\Route\Strategy\RequestResponseStrategy dispatch
…/­vendor/­league/­route/­src/­Route.php92
5. League\Route\Route dispatch
<#unknown>0
4. call_user_func_array
…/­vendor/­league/­route/­src/­Dispatcher.php62
3. League\Route\Dispatcher handleFound
…/­vendor/­league/­route/­src/­Dispatcher.php43
2. League\Route\Dispatcher handle
…/­vendor/­league/­route/­src/­RouteCollection.php118
1. League\Route\RouteCollection dispatch
…/­src/­App/­Application.php80
0. App\Application run
…/­index.php2718

Whoops \ Exception \ ErrorException (E_NOTICE)

Callstack information; navigate with mouse or keyboard using Ctrl+↑ or Ctrl+↓
Copy-to-clipboard button
Exception message and its type
Code snippet where the error was thrown
Server state information
Application provided context information
Whoops\Exception\ErrorException thrown with message "Trying to get property 'id' of non-object" Stacktrace: #15 Whoops\Exception\ErrorException in /home/kotech/web/btl3d.c12.kotechwb.com/public_html/views/2022/course.php:8 #14 Whoops\Run:handleError in /home/kotech/web/btl3d.c12.kotechwb.com/public_html/views/2022/course.php:8 #13 include in /home/kotech/web/btl3d.c12.kotechwb.com/public_html/vendor/league/plates/src/Template/Template.php:169 #12 League\Plates\Template\Template:League\Plates\Template\{closure} in /home/kotech/web/btl3d.c12.kotechwb.com/public_html/vendor/league/plates/src/Template/Template.php:170 #11 League\Plates\Template\Template:render in /home/kotech/web/btl3d.c12.kotechwb.com/public_html/vendor/league/plates/src/Engine.php:304 #10 League\Plates\Engine:render in /home/kotech/web/btl3d.c12.kotechwb.com/public_html/src/App/Application.php:131 #9 App\Application:newRender in /home/kotech/web/btl3d.c12.kotechwb.com/public_html/index.php:196 #8 {closure} in <#unknown>:0 #7 call_user_func_array in /home/kotech/web/btl3d.c12.kotechwb.com/public_html/vendor/league/route/src/Strategy/RequestResponseStrategy.php:17 #6 League\Route\Strategy\RequestResponseStrategy:dispatch in /home/kotech/web/btl3d.c12.kotechwb.com/public_html/vendor/league/route/src/Route.php:92 #5 League\Route\Route:dispatch in <#unknown>:0 #4 call_user_func_array in /home/kotech/web/btl3d.c12.kotechwb.com/public_html/vendor/league/route/src/Dispatcher.php:62 #3 League\Route\Dispatcher:handleFound in /home/kotech/web/btl3d.c12.kotechwb.com/public_html/vendor/league/route/src/Dispatcher.php:43 #2 League\Route\Dispatcher:handle in /home/kotech/web/btl3d.c12.kotechwb.com/public_html/vendor/league/route/src/RouteCollection.php:118 #1 League\Route\RouteCollection:dispatch in /home/kotech/web/btl3d.c12.kotechwb.com/public_html/src/App/Application.php:80 #0 App\Application:run in /home/kotech/web/btl3d.c12.kotechwb.com/public_html/index.php:2718

Trying to get property 'id' of non-object

/home/kotech/web/btl3d.c12.kotechwb.com/public_html/views/2022/course.php
<?php
use Kotech\Model\Course;
 
$this->layout('2022/website_layout');
 
$course_obj = new Course();
$course = $course_obj->getCourse($slug);
$others = $course_obj->getRelated($course->id);
?>
 
/home/kotech/web/btl3d.c12.kotechwb.com/public_html/views/2022/course.php
<?php
use Kotech\Model\Course;
 
$this->layout('2022/website_layout');
 
$course_obj = new Course();
$course = $course_obj->getCourse($slug);
$others = $course_obj->getRelated($course->id);
?>
 
/home/kotech/web/btl3d.c12.kotechwb.com/public_html/vendor/league/plates/src/Template/Template.php
 
        try {
            $level = ob_get_level();
            ob_start();
 
            (function() {
                extract($this->data);
                include func_get_arg(0);
            })($path);
 
/home/kotech/web/btl3d.c12.kotechwb.com/public_html/vendor/league/plates/src/Template/Template.php
        try {
            $level = ob_get_level();
            ob_start();
 
            (function() {
                extract($this->data);
                include func_get_arg(0);
            })($path);
 
            $content = ob_get_clean();
/home/kotech/web/btl3d.c12.kotechwb.com/public_html/vendor/league/plates/src/Engine.php
     * Create a new template and render it.
     * @param  string $name
     * @param  array  $data
     * @return string
     */
    public function render($name, array $data = array())
    {
        return $this->make($name)->render($data);
    }
}
/home/kotech/web/btl3d.c12.kotechwb.com/public_html/src/App/Application.php
    }

    public function renderPDF($name, $data = []) {
        return $this->plates->render('pdf/' . $name, $data);
    }

    public function newRender($name, $data = []) {
        return $this->plates->render('2022/' . $name, $data);
    }

/home/kotech/web/btl3d.c12.kotechwb.com/public_html/index.php
        $app->plates->addData([
            "share_title" => $course->share_title,
            "share_image" => $course->share_image,
            "share_desc" => $course->share_desc
        ]);
    }

    $html = $app->newRender("course" , ['slug' => $args['slug']]);
    $response->getBody()->write($html);
    return $response;
<#unknown>
/home/kotech/web/btl3d.c12.kotechwb.com/public_html/vendor/league/route/src/Strategy/RequestResponseStrategy.php
     * {@inheritdoc}
     */
    public function dispatch(callable $controller, array $vars, Route $route = null)
    {
        $response = call_user_func_array($controller, [
            $this->getRequest(),
            $this->getResponse(),
            $vars
        ]);
 
/home/kotech/web/btl3d.c12.kotechwb.com/public_html/vendor/league/route/src/Route.php
            $strategy->setRequest($request);
        }
 
        if ($strategy instanceof ResponseAwareInterface) {
            $strategy->setResponse($response);
        }
 
        return $strategy->dispatch($callable, $vars, $this);
    }
 
<#unknown>
/home/kotech/web/btl3d.c12.kotechwb.com/public_html/vendor/league/route/src/Dispatcher.php
     */
    protected function handleFound(
        callable               $route,
        ServerRequestInterface $request,
        ResponseInterface      $response,
        array                  $vars
    ) {
        return call_user_func_array($route, [$request, $response, $vars]);
    }
 
/home/kotech/web/btl3d.c12.kotechwb.com/public_html/vendor/league/route/src/Dispatcher.php
        }
 
        if ($match[0] === FastRoute::METHOD_NOT_ALLOWED) {
            $allowed = (array) $match[1];
            return $this->handleNotAllowed($response, $allowed);
        }
 
        return $this->handleFound($match[1], $request, $response, (array) $match[2]);
    }
 
/home/kotech/web/btl3d.c12.kotechwb.com/public_html/vendor/league/route/src/RouteCollection.php
     *
     * @return \Psr\Http\Message\ResponseInterface
     */
    public function dispatch(ServerRequestInterface $request, ResponseInterface $response)
    {
        $dispatcher = $this->getDispatcher($request);
 
        return $dispatcher->handle($request, $response);
    }
 
/home/kotech/web/btl3d.c12.kotechwb.com/public_html/src/App/Application.php
     * @return \League\Route\RouteCollection
     */
    public function getRoute() {
        return $this->route;
    }

    public function run() {
        $response = $this->route->dispatch(  $this->container->get('request'),   $this->container->get('response'));
        $this->container->get('emitter')->emit($response);
    }
/home/kotech/web/btl3d.c12.kotechwb.com/public_html/index.php
    $_SESSION['email_result'] = 'success';

    header('Location:https://btl3d.com/platform');
    exit();
});

try {
    $app->run();
} catch (NotFoundException $ex) {
    echo "Not Found";
empty
empty
empty
empty
empty
Key Value
TEMP /home/kotech/tmp
TMPDIR /home/kotech/tmp
TMP /home/kotech/tmp
PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
USER kotech
HOME /home/kotech
SCRIPT_NAME /index.php
REQUEST_URI /course/AppInventor2
QUERY_STRING
REQUEST_METHOD GET
SERVER_PROTOCOL HTTP/1.0
GATEWAY_INTERFACE CGI/1.1
REDIRECT_URL /course/AppInventor2
REMOTE_PORT 51886
SCRIPT_FILENAME /home/kotech/web/btl3d.c12.kotechwb.com/public_html/index.php
SERVER_ADMIN info@btl3d.c12.kotechwb.com
CONTEXT_DOCUMENT_ROOT /home/kotech/web/btl3d.c12.kotechwb.com/public_html
CONTEXT_PREFIX
REQUEST_SCHEME http
DOCUMENT_ROOT /home/kotech/web/btl3d.c12.kotechwb.com/public_html
REMOTE_ADDR 54.226.25.246
SERVER_PORT 80
SERVER_ADDR 122.128.106.24
SERVER_NAME btl3d.com
SERVER_SOFTWARE Apache/2.4.58 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/1.1.1f
SERVER_SIGNATURE
HTTP_CF_IPCOUNTRY US
HTTP_CDN_LOOP cloudflare
HTTP_CF_CONNECTING_IP 54.226.25.246
HTTP_USER_AGENT claudebot
HTTP_ACCEPT */*
HTTP_CF_VISITOR {"scheme":"https"}
HTTP_X_FORWARDED_PROTO https
HTTP_CF_RAY 866b03a1bf5c0794-IAD
HTTP_ACCEPT_ENCODING gzip, br
HTTP_CONNECTION close
HTTP_X_FORWARDED_FOR 54.226.25.246, 54.226.25.246
HTTP_HOST btl3d.com
proxy-nokeepalive 1
REDIRECT_STATUS 200
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1710825636.4756
REQUEST_TIME 1710825636
empty
0. Whoops\Handler\PrettyPageHandler