Fixed clear_sql calling if the type of query was not PDOStatement