From: Yasuo Ohgaki Date: Mon, 8 Jul 2013 09:51:37 +0000 (+0900) Subject: Add warning to pg_unescape_bytea() when invalid parameter is passed X-Git-Tag: php-5.5.2RC1~17^2~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2bc8271b29752e82eb0b9bb7f85e6f9dbaee9a78;p=php Add warning to pg_unescape_bytea() when invalid parameter is passed --- diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index 0fa4031b37..1c78fffe55 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -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);