Add warning to pg_unescape_bytea() when invalid parameter is passed

This commit is contained in:
Yasuo Ohgaki 2013-07-08 18:51:37 +09:00
parent d1c261d7f8
commit 2bc8271b29

View file

@ -4212,6 +4212,7 @@ PHP_FUNCTION(pg_unescape_bytea)
to = (char *)php_pgsql_unescape_bytea((unsigned char*)from, &to_len);
#endif
if (!to) {
php_error_docref(NULL TSRMLS_CC, E_WARNING,"Failed to unescape");
RETURN_FALSE;
}
RETVAL_STRINGL(to, to_len, 0);