]> granicus.if.org Git - php/commitdiff
Add warning to pg_unescape_bytea() when invalid parameter is passed
authorYasuo Ohgaki <yohgaki@php.net>
Mon, 8 Jul 2013 09:51:37 +0000 (18:51 +0900)
committerYasuo Ohgaki <yohgaki@php.net>
Mon, 8 Jul 2013 09:51:37 +0000 (18:51 +0900)
ext/pgsql/pgsql.c

index 0fa4031b376316e2b44c9b98867402f96de03beb..1c78fffe555deffa66794c4a6a3e185b481d8a76 100644 (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);