cvs: /php4/ext/pgsql pgsql.c
| From: | Zeev Suraski | Date: | Fri, 10 Sep 1999 02:59:38 +0000 |
| Subject: | cvs: /php4/ext/pgsql pgsql.c | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-4297@lists.php.net to get a copy of this message | ||
zeev Thu Sep 9 22:59:38 1999 EDT
Modified files:
/php4/ext/pgsql pgsql.c
Log:
Lost functionality in earlier fix... That should really work.
Index: php4/ext/pgsql/pgsql.c
diff -u php4/ext/pgsql/pgsql.c:1.20 php4/ext/pgsql/pgsql.c:1.21
--- php4/ext/pgsql/pgsql.c:1.20 Thu Sep 9 22:55:28 1999
+++ php4/ext/pgsql/pgsql.c Thu Sep 9 22:59:37 1999
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: pgsql.c,v 1.20 1999/09/10 02:55:28 zeev Exp $ */
+/* $Id: pgsql.c,v 1.21 1999/09/10 02:59:37 zeev Exp $ */
#include <stdlib.h>
@@ -919,6 +919,7 @@
if (element) {
char *data;
int data_len;
+ int should_copy=0;
if (PG(magic_quotes_runtime)) {
data = php_addslashes(element,element_len,&data_len,0);
@@ -928,12 +929,13 @@
}
if (result_type & PGSQL_NUM) {
- add_index_stringl(return_value, i, data, data_len, 0);
+ add_index_stringl(return_value, i, data, data_len, should_copy);
+ should_copy=1;
}
if (result_type & PGSQL_ASSOC) {
field_name = PQfname(pgsql_result,i);
- add_assoc_stringl(return_value, field_name, data, data_len, 1);
+ add_assoc_stringl(return_value, field_name, data, data_len, should_copy);
}
} else {
/* NULL field, don't set it */