avoid php error/warn on connection attempt failure