wp_nav_menu not working correctly in my underscores theme

If found out that this is removing my menu:

function add_menu_icon ( $items, $args ) {
    if ( $args->theme_location == 'primary' ) {
        $elements="<li class="custom-logo">"
                    .   get_custom_logo()   .
                    '</li>';
                    $elements .= $items;
        $items = $elements;
        return $items;
    }
}
add_filter( 'wp_nav_menu_items', 'add_menu_icon', 10, 2 );

I still haven’t figured out why.

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