]> granicus.if.org Git - php/commitdiff
- Fixed bug #51608 (pg_copy_to: WARNING: nonstandard use of \\ in a string literal)
authorFelipe Pena <felipe@php.net>
Tue, 20 Apr 2010 11:49:23 +0000 (11:49 +0000)
committerFelipe Pena <felipe@php.net>
Tue, 20 Apr 2010 11:49:23 +0000 (11:49 +0000)
Patch by: cbandy at jbandy dot com

NEWS
ext/pgsql/pgsql.c

diff --git a/NEWS b/NEWS
index bebc34f25ec4ff4d56e7e23a2e8c8ccb2d9bb4c0..7ac9fb380e4a9e37364895c0b10300d876740d4c 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -18,6 +18,8 @@ PHP                                                                        NEWS
   requests (Fixes CVE-2010-0397, bug #51288). (Raphael Geissert)
 - Fixed 64-bit integer overflow in mhash_keygen_s2k(). (ClĂ©ment LECIGNE, Stas) 
 
+- Fixed bug #51608 (pg_copy_to: WARNING: nonstandard use of \\ in a string
+  literal). (cbandy at jbandy dot com)
 - Fixed bug #51590 (JSON_ERROR_UTF8 is undefined). (Felipe)
 - Fixed bug #51577 (Uninitialized memory reference with oci_bind_array_by_name)
   (Oracle Corp.)
index 43bd32b8f56ba0a6f66aa857916f82e1157de8b8..92725ee996586a81b89cda5c810b9f1ee12a5069 100644 (file)
@@ -3765,9 +3765,9 @@ PHP_FUNCTION(pg_copy_to)
        }
 
        if (memchr(table_name, '.', table_name_len)) {
-               spprintf(&query, 0, "COPY %s TO STDOUT DELIMITERS '%c' WITH NULL AS '%s'", table_name, *pg_delim, pg_null_as);
+               spprintf(&query, 0, "COPY %s TO STDOUT DELIMITERS E'%c' WITH NULL AS E'%s'", table_name, *pg_delim, pg_null_as);
        } else {
-               spprintf(&query, 0, "COPY \"%s\" TO STDOUT DELIMITERS '%c' WITH NULL AS '%s'", table_name, *pg_delim, pg_null_as);
+               spprintf(&query, 0, "COPY \"%s\" TO STDOUT DELIMITERS E'%c' WITH NULL AS E'%s'", table_name, *pg_delim, pg_null_as);
        }
 
        while ((pgsql_result = PQgetResult(pgsql))) {