From 2bc8271b29752e82eb0b9bb7f85e6f9dbaee9a78 Mon Sep 17 00:00:00 2001 From: Yasuo Ohgaki Date: Mon, 8 Jul 2013 18:51:37 +0900 Subject: [PATCH] Add warning to pg_unescape_bytea() when invalid parameter is passed --- ext/pgsql/pgsql.c | 1 + 1 file changed, 1 insertion(+) 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); -- 2.50.1