Problem with custom post type search

This is not related only to your custom post_types search. WordPress has a problem on empty search on itself. I use this simple code snippet as workaround:

add_filter( 'request', 'my_request_filter' );
function my_request_filter( $query_vars ) {
    if( isset( $_GET['s'] ) && empty( $_GET['s'] ) ) {
        $query_vars['s'] = " ";
    }
    return $query_vars;
}

You may tak advantage of that and build your own code above that.

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