Oh, thatâs not good. However I donât know of a way to avoid this besides catching and suppressing the error (which is not great). Itâs rather something PHP needs to fix if the fix should be proper.
Maybe you have another idea?
PS: You should always disable error reporting on production systems. Displaying errors there can give attackers a lot of insights (just like in this case). And it probably makes sense to connect to the database via a local port or socket thatâs blocked for external access as MySQL is generally unencrypted anyway.