]> granicus.if.org Git - php/commitdiff
- Fix ZTS build when HAVE_PQESCAPELITERAL is not set
authorFelipe Pena <felipensp@gmail.com>
Sat, 15 Feb 2014 13:04:49 +0000 (11:04 -0200)
committerFelipe Pena <felipensp@gmail.com>
Sat, 15 Feb 2014 13:04:49 +0000 (11:04 -0200)
ext/pgsql/pgsql.c

index c4632aecbf621dba386a9b9a49aa2f89a79273ed..270b7ba8f6d6cef65bde4f7376fd5bf26bd35f3e 100644 (file)
@@ -804,6 +804,8 @@ static char* php_pgsql_PQescapeInternal(PGconn *conn, const char *str, size_t le
                                !strncmp(encoding, "GBK", sizeof("GBK")-1) ||
                                !strncmp(encoding, "JOHAB", sizeof("JOHAB")-1) ||
                                !strncmp(encoding, "UHC", sizeof("UHC")-1) ) {
+                               TSRMLS_FETCH();
+                               
                                php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unsafe encoding is used. Do not use '%s' encoding or use PostgreSQL 9.0 or later libpq.", encoding);
                        }
                        /* check backslashes */