Display custom post type title as text if post thumbnail is not available

Try to replace the block in the middle of the query with this code:

<?php if ( has_post_thumbnail()) {
   the_post_thumbnail();
} else {  
   the_title( '<h4>', '</h4>');
} ?>

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