com php-src: - Fix ZTS build when HAVE_PQESCAPELITERAL is not set: ext/pgsql/pgsql.c
| From: | Felipe Pena | Date: | Sat, 15 Feb 2014 13:04:49 +0000 |
| Subject: | com php-src: - Fix ZTS build when HAVE_PQESCAPELITERAL is not set: ext/pgsql/pgsql.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-75997@lists.php.net to get a copy of this message | ||
Commit: 9d84f6c06ec59e8fc23b715c08fba2eaf451868a
Author: Felipe Pena <felipensp@gmail.com> Sat, 15 Feb 2014 11:04:49 -0200
Parents: 7ce88b2d8a9890dba987259c6bf5c5b8935ffee3
Branches: PHP-5.4 PHP-5.5 PHP-5.6 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=9d84f6c06ec59e8fc23b715c08fba2eaf451868a
Log:
- Fix ZTS build when HAVE_PQESCAPELITERAL is not set
Changed paths:
M ext/pgsql/pgsql.c
Diff:
diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c
index c4632ae..270b7ba 100644
--- a/ext/pgsql/pgsql.c
+++ b/ext/pgsql/pgsql.c
@@ -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 */