]> TLD Linux GIT Repositories - packages/php.git/blobdiff - php-fcgi-error_log-no-newlines.patch
- PHP_5_4 branch from PLD
[packages/php.git] / php-fcgi-error_log-no-newlines.patch
diff --git a/php-fcgi-error_log-no-newlines.patch b/php-fcgi-error_log-no-newlines.patch
new file mode 100644 (file)
index 0000000..e35648e
--- /dev/null
@@ -0,0 +1,16 @@
+--- ./sapi/cgi/cgi_main.c~     2007-08-09 02:51:57.000000000 +0300
++++ ./sapi/cgi/cgi_main.c      2007-09-05 20:54:19.390089070 +0300
+@@ -558,12 +558,7 @@
+               request = (fcgi_request*) SG(server_context);
+               if (request) {                  
+                       int len = strlen(message);
+-                      char *buf = malloc(len+2);
+-
+-                      memcpy(buf, message, len);
+-                      memcpy(buf + len, "\n", sizeof("\n"));
+-                      fcgi_write(request, FCGI_STDERR, buf, len+1);
+-                      free(buf);
++                      fcgi_write(request, FCGI_STDERR, message, len);
+               } else {
+                       fprintf(stderr, "%s\n", message);
+               }