[Notice] Trying to get property of non-object

GET /articles/category/cconsultancy

Line 23 in /homepages/7/d208150082/htdocs/p2bs2017/mysite/code/extensions/P2BSBlog_ControllerExtension.php

Source

14 			$dataRecord = $this->owner->dataRecord;
15 			$category = $this->owner->request->param('ID');
16 
17 			if ($category) {
18 				$data = $dataRecord->Categories()
19 					->filter('URLSegment', array($category, rawurlencode($category)))
20 					->first();
21 			}
22 			
23 			$this->owner->BetterMeta_Title = $data->MetaTitle;
24 			$this->owner->MetaDescription = $data->MetaDescription;
25 			break;
26 		}
27     }
28     
29 }

Trace

GET /articles/category/cconsultancy

[Notice] Trying to get property of non-object

GET /articles/category/cconsultancy

Line 24 in /homepages/7/d208150082/htdocs/p2bs2017/mysite/code/extensions/P2BSBlog_ControllerExtension.php

Source

15 			$category = $this->owner->request->param('ID');
16 
17 			if ($category) {
18 				$data = $dataRecord->Categories()
19 					->filter('URLSegment', array($category, rawurlencode($category)))
20 					->first();
21 			}
22 			
23 			$this->owner->BetterMeta_Title = $data->MetaTitle;
24 			$this->owner->MetaDescription = $data->MetaDescription;
25 			break;
26 		}
27     }
28     
29 }

Trace

GET /articles/category/cconsultancy

[User Warning] Couldn't set response type to 404 because of output on line 118 of /homepages/7/d208150082/htdocs/p2bs2017/framework/dev/DebugView.php

GET /articles/category/cconsultancy

Line 269 in /homepages/7/d208150082/htdocs/p2bs2017/framework/control/HTTPResponse.php

Source

260 					}
261 					header("$header: $value", true, $this->statusCode);
262 				}
263 			} else {
264 				// It's critical that these status codes are sent; we need to report a failure if not.
265 				if($this->statusCode >= 300) {
266 					user_error(
267 						"Couldn't set response type to $this->statusCode because " .
268 						"of output on line $line of $file",
269 						E_USER_WARNING
270 					);
271 				}
272 			}
273 
274 			// Only show error pages or generic "friendly" errors if the status code signifies
275 			// an error, and the response doesn't have any body yet that might contain

Trace

Proud2bSafe Ltd

Page not found

Sorry, it seems you were trying to access a page that doesn't exist.

Please check the spelling of the URL you were trying to access and try again.