]> 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 499d1fe67339094b6645f813b86c218b8fed5533..07f1ea223059189fedc9ea58ffcac16dff8c343e 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -12,6 +12,8 @@ PHP                                                                        NEWS
 - Fixed a NULL pointer dereference when processing invalid XML-RPC
   requests (Fixes CVE-2010-0397, bug #51288). (Raphael Geissert)
 
+- Fixed bug #51608 (pg_copy_to: WARNING: nonstandard use of \\ in a string
+  literal). (cbandy at jbandy dot com)
 - Fixed bug #51445 (var_dump() invalid/slow *RECURSION* detection). (Felipe)
 - Fixed bug #51393 (DateTime::createFromFormat() fails if format string contains
   timezone). (Adam)
index 6579a96d620f6f947cf5df942be884cd4daa6242..042f81ff77796150f9bcb361e39cba6a0b15fa96 100644 (file)
@@ -3342,9 +3342,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))) {