Trying to get property of non-object in: $wp_query

get_object_vars() returns an associative array of object properties – so queried_object is never in $wpQueryObj, it’s a key: $wpQueryObj['queried_object'].

Besides, you shouldn’t be doing any of that anyway – use get_queried_object():

if ( $wp_query instanceof WP_Query ) {
    if ( $object = $wp_query->get_queried_object() ) {
         $query_name = isset( $object->name ) ? $object->name : '';
    }
}

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)