so I have been getting this error quite a bit in my error.log and cannot figure out how to fix it. I have tried searching similar questions like this on Stack Overflow but have not had any success. Some help would be much appreciated!
The line marked is where the error is showing:
if(isset($_GET['id']) && !empty($_GET['id'])){
//If statement content here...
} elseif(isset($_GET['category']) && !empty($_GET['category'])) {
$_GET['category'] = $database->escape_string(filter_var($_GET['category'], FILTER_SANITIZE_STRING));
// This line:
$category_title = $database->query("SELECT `name` FROM `categories` WHERE `slug` = '{$_GET['category']}'")->fetch_object()->name;
$pageTitle = 'something';
$description = 'something';
$keywords = $category_title;
$indexTitle = $category_title;
}