pg_query_params returns a value described as:
A query result resource on success or FALSE on failure.
So just check that return value for falseness.
Also since your update query does not return any row, even when it succeeds there's no point in passing its return value to
pg_fetch_all. Not being
false is all that matters.