7. Whoops\Exception\ErrorException
…/­src/­PMCOM/­Front/­Category.php223
6. Whoops\Run handleError
…/­src/­PMCOM/­Front/­Category.php223
5. PMCOM\Front\Category get
…/­src/­PMCOM/­Front/­Product.php385
4. PMCOM\Front\Product view
…/­src/­PMCOM/­Core/­Router.php117
3. PMCOM\Core\Router _get_route
<#unknown>0
2. call_user_func_array
…/­src/­PMCOM/­Core/­Router.php158
1. PMCOM\Core\Router __callStatic
…/­index.php99
0. PMCOM\Core\Router get_route
…/­index.php99

Whoops \ Exception \ ErrorException (E_NOTICE) Whoops\Exception\ErrorException thrown with message "Trying to get property of non-object" Stacktrace: #7 Whoops\Exception\ErrorException in /home/tbec71889672/public_html/src/PMCOM/Front/Category.php:223 #6 Whoops\Run:handleError in /home/tbec71889672/public_html/src/PMCOM/Front/Category.php:223 #5 PMCOM\Front\Category:get in /home/tbec71889672/public_html/src/PMCOM/Front/Product.php:385 #4 PMCOM\Front\Product:view in /home/tbec71889672/public_html/src/PMCOM/Core/Router.php:117 #3 PMCOM\Core\Router:_get_route in <#unknown>:0 #2 call_user_func_array in /home/tbec71889672/public_html/src/PMCOM/Core/Router.php:158 #1 PMCOM\Core\Router:__callStatic in /home/tbec71889672/public_html/index.php:99 #0 PMCOM\Core\Router:get_route in /home/tbec71889672/public_html/index.php:99

Trying to get property of non-object

/home/tbec71889672/public_html/src/PMCOM/Front/Category.php
	* @param string $field
	* @return object
	*
	*/
	function get($id, $field = 'id')
	{
		$cat = $this->database->get(self::$table, array($field => $id));
		$cat->url = $this->generate_url($cat->id);
 
		return $cat;
/home/tbec71889672/public_html/src/PMCOM/Front/Category.php
	* @param string $field
	* @return object
	*
	*/
	function get($id, $field = 'id')
	{
		$cat = $this->database->get(self::$table, array($field => $id));
		$cat->url = $this->generate_url($cat->id);
 
		return $cat;
cpt-obvious This frame is within function 'handleError'
/home/tbec71889672/public_html/src/PMCOM/Front/Product.php
				}
 
				$product->price = $discount_price;
			}
 
			$cat = new Category();
			$product->return_url = Session::get('category_url') ? Session::get('category_url') : $cat->generate_url($product->category_id);
			$product->parent = $cat->get( $product->category_id );
			$product->guarantee = $this->database->get('product_guarantees', array('id' => $product->product_guarantee_id));
 
cpt-obvious This frame is within function 'get'
/home/tbec71889672/public_html/src/PMCOM/Core/Router.php
				} elseif( $method === 'index' ) {
					$method = $class;
				}
				foreach( $controllers as $controller ) :
					try {
						$routed = $this->container->get( $controller );
						if( $routed->exists( $method ) ) :
							die( $routed->view( $method ) );
						endif;
					} catch( \Orno\Di\Exception\ReflectionException $e ) {}
cpt-obvious This frame is within function 'view'
<#unknown>
cpt-obvious This frame is within function '_get_route'
/home/tbec71889672/public_html/src/PMCOM/Core/Router.php
 
	public static function __callStatic( $method, $parameters )
	{
		if( is_null( static::$instance ) )
		{
			static::$instance = new Router();
		}
		return call_user_func_array( array( static::$instance, '_' . $method ), $parameters );
	}
 
cpt-obvious This frame is within function 'call_user_func_array'
/home/tbec71889672/public_html/index.php
|---------------------------------------------------------------
| LOAD THE ROUTES CLASS
|---------------------------------------------------------------
|
| And away we go...
|
*/
PMCOM\Core\Router::get_route( $container );
cpt-obvious This frame is within function '__callStatic'
/home/tbec71889672/public_html/index.php
|---------------------------------------------------------------
| LOAD THE ROUTES CLASS
|---------------------------------------------------------------
|
| And away we go...
|
*/
PMCOM\Core\Router::get_route( $container );
cpt-obvious This frame is within function 'get_route'
Key Value
LSPHP_ENABLE_USER_INI on
PATH /usr/local/bin:/usr/bin:/bin
TEMP /tmp
TMP /tmp
TMPDIR /tmp
PWD /
HTTP_ACCEPT */*
CONTENT_LENGTH 0
HTTP_HOST www.thebestecigarette.co.uk
HTTP_USER_AGENT Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
HTTP_X_HTTPS 1
REDIRECT_UNIQUE_ID ZiJcHkfTouT8hxm36sCeQQAAkR8
REDIRECT_SCRIPT_URL /e-liquid/short-fill-e-liquid/mr-kool-60ml-50ml-shortfill-nicotine-free/mr-kool-pina-colada-50ml-60ml-short-fill-nicotine-free-e-liquid/
REDIRECT_SCRIPT_URI https://www.thebestecigarette.co.uk/e-liquid/short-fill-e-liquid/mr-kool-60ml-50ml-shortfill-nicotine-free/mr-kool-pina-colada-50ml-60ml-short-fill-nicotine-free-e-liquid/
REDIRECT_USER_ID 4182016
REDIRECT_HTTPS on
REDIRECT_SSL_TLS_SNI www.thebestecigarette.co.uk
REDIRECT_HTTP2 on
REDIRECT_H2PUSH off
REDIRECT_H2_PUSH off
REDIRECT_H2_PUSHED
REDIRECT_H2_PUSHED_ON
REDIRECT_H2_STREAM_ID 3
REDIRECT_H2_STREAM_TAG 1381147-2039-3
REDIRECT_STATUS 200
UNIQUE_ID ZiJcHkfTouT8hxm36sCeQQAAkR8
SCRIPT_URL /e-liquid/short-fill-e-liquid/mr-kool-60ml-50ml-shortfill-nicotine-free/mr-kool-pina-colada-50ml-60ml-short-fill-nicotine-free-e-liquid/
SCRIPT_URI https://www.thebestecigarette.co.uk/e-liquid/short-fill-e-liquid/mr-kool-60ml-50ml-shortfill-nicotine-free/mr-kool-pina-colada-50ml-60ml-short-fill-nicotine-free-e-liquid/
USER_ID 4182016
HTTPS on
SSL_TLS_SNI www.thebestecigarette.co.uk
HTTP2 on
H2PUSH off
H2_PUSH off
H2_PUSHED
H2_PUSHED_ON
H2_STREAM_ID 3
H2_STREAM_TAG 1381147-2039-3
SERVER_SIGNATURE
SERVER_SOFTWARE Apache
SERVER_NAME www.thebestecigarette.co.uk
SERVER_ADDR 92.205.89.213
SERVER_PORT 443
REMOTE_ADDR 3.22.181.209
DOCUMENT_ROOT /home/tbec71889672/public_html
REQUEST_SCHEME https
CONTEXT_PREFIX
CONTEXT_DOCUMENT_ROOT /home/tbec71889672/public_html
SERVER_ADMIN webmaster@thebestecigarette.co.uk
SCRIPT_FILENAME /home/tbec71889672/public_html/index.php
REMOTE_PORT 46925
REDIRECT_URL /e-liquid/short-fill-e-liquid/mr-kool-60ml-50ml-shortfill-nicotine-free/mr-kool-pina-colada-50ml-60ml-short-fill-nicotine-free-e-liquid/
SERVER_PROTOCOL HTTP/2.0
REQUEST_METHOD GET
QUERY_STRING
REQUEST_URI /e-liquid/short-fill-e-liquid/mr-kool-60ml-50ml-shortfill-nicotine-free/mr-kool-pina-colada-50ml-60ml-short-fill-nicotine-free-e-liquid/
SCRIPT_NAME /index.php
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1713527838.6995
REQUEST_TIME 1713527838
empty
empty
empty
empty
empty
Key Value
LSPHP_ENABLE_USER_INI on
PATH /usr/local/bin:/usr/bin:/bin
TEMP /tmp
TMP /tmp
TMPDIR /tmp
PWD /
0. PMCOM\Core\PurposeHandler
1. Whoops\Handler\CallbackHandler