Assigning this can fail. At the moment this can't be easily detected without installing global error handlers (it currently emits an E_NOTICE
|
php_error(E_NOTICE, "Unrecognized encoding '%s'", zenc->val); |
). Notably, it always fails if you attempt to set it before the connection has been established when connecting asynchronously.
As this is something that could contribute to a security issue if it fails, can we throw an exception instead? A failure to set an encoding anywhere should always be handled - or at least handle-able - IMHO.
Assigning this can fail. At the moment this can't be easily detected without installing global error handlers (it currently emits an
E_NOTICEext-pq/src/php_pqconn.c
Line 199 in 75f3b1b
As this is something that could contribute to a security issue if it fails, can we throw an exception instead? A failure to set an encoding anywhere should always be handled - or at least handle-able - IMHO.