Hello,
1. this patch doesn't work with thread safety, 2. It doesn't use the PHP
coding standards and 3. it uses GOTO. I don't think this should have been
committed at all.
Derick
On Sat, 30 Mar 2002, Jan Pavl�k wrote:
> rootshell Fri Mar 29 23:13:29 2002 CET
>
> Modified files:
> /php4/main/main.c
> Log:
> lot of same errors are logged as one, cleans errorlog
>
>
>
> Index: php4/main/main.c
> diff -u php4/main/main.c:1.404.2.5 php4/main/main.c:1.404.2.6
> --- php4/main/main.c:1.404.2.5 Mon Dec 17 22:19:51 2001
> +++ php4/main/main.c Fri Mar 29 23:11:03 2002
> @@ -18,11 +18,12 @@
> +----------------------------------------------------------------------+
> */
>
> -/* $Id: main.c,v 1.404.2.5 2001/12/17 21:19:51 derick Exp $ */
> +/* $Id: main.c,v 1.404.2.6 2002/03/29 23:10:05 rootshell Exp $ */
>
> /* {{{ includes
> */
> #include <stdio.h>
> +#include <string.h>
> #include "php.h"
> #ifdef PHP_WIN32
> #include "win32/time.h"
> @@ -83,6 +84,9 @@
> PHPAPI int core_globals_id;
> #endif
>
> +static char _err_buf[1024];
> +#define MAX_ERR_LENGTH (buffer_len > sizeof(_err_buf) ? sizeof(_err_buf) :
> buffer_len)
> +
> static void php_build_argv(char *s, zval *track_vars_array TSRMLS_DC);
>
>
> @@ -417,6 +421,9 @@
> char *append_string = INI_STR("error_append_string");
> char *error_format;
>
> + if(!strncmp(buffer, _err_buf, MAX_ERR_LENGTH)) goto _away;
> + else strncpy(_err_buf, buffer, MAX_ERR_LENGTH);
> +
> error_format = PG(html_errors) ?
> "<br>\n<b>%s</b>: %s in <b>%s</b> on line <b>%d</b><br>\n"
> : "\n%s: %s in %s on line %d\n";
> @@ -437,6 +444,7 @@
> if (append_string) {
> PUTS(append_string);
> }
> +_away:
> }
> #if ZEND_DEBUG
> {
>
>
>
>
>
>
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, visit: http://www.php.net/unsub.php
>
-----------------------------------------------------------------------
PHP: Scripting the Web - [EMAIL PROTECTED]
All your branches are belong to me!
SRM: Script Running Machine - www.vl-srm.net
-----------------------------------------------------------------------
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php