[Notice] Trying to get property of non-object

GET /news/view/join-us-winston-indonesia-

Line 146 in /home/admin/web/winston.co.id/public_html/mysite/code/NewsPage.php

Source

137 
138 
139         //BREADCUMBS CUSTOM////////////
140         /////////////check if category data exist////////////////
141         $categoryLink = "";
142         //Debug::show($OneBlogData->BlogCategory()->BlogCategoryLink());die();
143         //Debug::show($OneBlogData);die();        
144         ///create custom breadcumbs
145         $tampHolder = DataObject::get_one("NewsPage");
146         $customBreadcrumbs = "<a href=" . $tampHolder->Link() . ">" . $tampHolder->Title . "</a>" . $categoryLink . "&nbsp/&nbsp" . $OneBlogData->Title . "";
147         //////////////////////////////////
148         ///////////////////////////////////
149         //$viewCategoryName = $OneBlogData->BlogCategory()->Title;
150         //Debug::show($viewCategoryName);die();
151 
152 

Trace

GET /news/view/join-us-winston-indonesia-

[Notice] Trying to get property of non-object

GET /news/view/join-us-winston-indonesia-

Line 233 in /home/admin/web/winston.co.id/public_html/mysite/code/NewsPage.php

Source

224         $page_size = 4; //self untuk panggil global variable pada class jika dlm 1 class.
225 
226         if (isset($_GET['page'])) {
227             $page = $_GET['page'];
228         }
229         $offset = ($page - 1) * $page_size; //$offset untuk menentukan dimulai dari halaman berapa
230         //Debug::show($offset);
231 
232         $resultBlogTeaser = NewsData::get()
233                 ->where("ID<>" . "$getBlog->ID")
234                 ->limit($page_size, $offset)
235                 ->sort('Created DESC');
236         //Debug::show($getProduct->ID);die();
237         return $resultBlogTeaser;
238     }
239 

Trace

GET /news/view/join-us-winston-indonesia-

[User Error] Couldn't run query: SELECT DISTINCT count(DISTINCT "NewsData"."ID") AS "0" FROM "NewsData" WHERE (ID) You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')' at line 1

GET /news/view/join-us-winston-indonesia-

Line 598 in /home/admin/web/winston.co.id/public_html/framework/model/MySQLDatabase.php

Source

589 	}
590 
591 	public function databaseError($msg, $errorLevel = E_USER_ERROR) {
592 		// try to extract and format query
593 		if(preg_match('/Couldn\'t run query: ([^\|]*)\|\s*(.*)/', $msg, $matches)) {
594 			$formatter = new SQLFormatter();
595 			$msg = "Couldn't run query: \n" . $formatter->formatPlain($matches[1]) . "\n\n" . $matches[2];
596 		}
597 
598 		user_error($msg, $errorLevel);
599 	}
600 
601 	/**
602 	 * Return a boolean type-formatted string
603 	 *
604 	 * @param array $values Contains a tokenised list of info about this data type

Trace