helly Sun Mar 14 18:56:08 2004 EDT
Modified files:
/php-src/main main.c output.c php_output.h
Log:
Guard display_startup_errors with checking for default (working) output
functions.
http://cvs.php.net/diff.php/php-src/main/main.c?r1=1.595&r2=1.596&ty=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.595 php-src/main/main.c:1.596
--- php-src/main/main.c:1.595 Wed Feb 25 05:58:06 2004
+++ php-src/main/main.c Sun Mar 14 18:56:07 2004
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: main.c,v 1.595 2004/02/25 10:58:06 zeev Exp $ */
+/* $Id: main.c,v 1.596 2004/03/14 23:56:07 helly Exp $ */
/* {{{ includes
*/
@@ -752,7 +752,12 @@
efree(log_buffer);
}
if (PG(display_errors)
- && ((!PG(during_request_startup) &&
PG(display_startup_errors)) || module_initialized)) {
+ && ((module_initialized && !PG(during_request_startup))
+ || (PG(display_startup_errors)
+ &&
(OG(php_body_write)==php_default_output_func ||
OG(php_body_write)==php_ub_body_write_no_header ||
OG(php_body_write)==php_ub_body_write)
+ )
+ )
+ ) {
if (PG(xmlrpc_errors)) {
php_printf("<?xml
version=\"1.0\"?><methodResponse><fault><value><struct><member><name>faultCode</name><value><int>%ld</int></value></member><member><name>faultString</name><value><string>%s:%s
in %s on line
%d</string></value></member></struct></value></fault></methodResponse>",
PG(xmlrpc_error_number), error_type_str, buffer, error_filename, error_lineno);
http://cvs.php.net/diff.php/php-src/main/output.c?r1=1.163&r2=1.164&ty=u
Index: php-src/main/output.c
diff -u php-src/main/output.c:1.163 php-src/main/output.c:1.164
--- php-src/main/output.c:1.163 Thu Jan 8 03:17:53 2004
+++ php-src/main/output.c Sun Mar 14 18:56:07 2004
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: output.c,v 1.163 2004/01/08 08:17:53 andi Exp $ */
+/* $Id: output.c,v 1.164 2004/03/14 23:56:07 helly Exp $ */
#include "php.h"
#include "ext/standard/head.h"
@@ -32,8 +32,6 @@
#define OB_DEFAULT_HANDLER_NAME "default output handler"
/* output functions */
-static int php_ub_body_write(const char *str, uint str_length TSRMLS_DC);
-static int php_ub_body_write_no_header(const char *str, uint str_length TSRMLS_DC);
static int php_b_body_write(const char *str, uint str_length TSRMLS_DC);
static int php_ob_init(uint initial_size, uint block_size, zval *output_handler, uint
chunk_size, zend_bool erase TSRMLS_DC);
@@ -49,7 +47,7 @@
#endif
/* {{{ php_default_output_func */
-static inline int php_default_output_func(const char *str, uint str_len TSRMLS_DC)
+PHPAPI int php_default_output_func(const char *str, uint str_len TSRMLS_DC)
{
fwrite(str, 1, str_len, stderr);
return str_len;
@@ -675,7 +673,7 @@
/* {{{ php_ub_body_write_no_header
*/
-static int php_ub_body_write_no_header(const char *str, uint str_length TSRMLS_DC)
+PHPAPI int php_ub_body_write_no_header(const char *str, uint str_length TSRMLS_DC)
{
int result;
@@ -695,7 +693,7 @@
/* {{{ php_ub_body_write
*/
-static int php_ub_body_write(const char *str, uint str_length TSRMLS_DC)
+PHPAPI int php_ub_body_write(const char *str, uint str_length TSRMLS_DC)
{
int result = 0;
http://cvs.php.net/diff.php/php-src/main/php_output.h?r1=1.51&r2=1.52&ty=u
Index: php-src/main/php_output.h
diff -u php-src/main/php_output.h:1.51 php-src/main/php_output.h:1.52
--- php-src/main/php_output.h:1.51 Fri Feb 20 03:04:30 2004
+++ php-src/main/php_output.h Sun Mar 14 18:56:07 2004
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_output.h,v 1.51 2004/02/20 08:04:30 hholzgra Exp $ */
+/* $Id: php_output.h,v 1.52 2004/03/14 23:56:07 helly Exp $ */
#ifndef PHP_OUTPUT_H
#define PHP_OUTPUT_H
@@ -28,6 +28,9 @@
PHPAPI void php_output_activate(TSRMLS_D);
PHPAPI void php_output_set_status(zend_bool status TSRMLS_DC);
PHPAPI void php_output_register_constants(TSRMLS_D);
+PHPAPI int php_default_output_func(const char *str, uint str_len TSRMLS_DC);
+PHPAPI int php_ub_body_write(const char *str, uint str_length TSRMLS_DC);
+PHPAPI int php_ub_body_write_no_header(const char *str, uint str_length TSRMLS_DC);
PHPAPI int php_body_write(const char *str, uint str_length TSRMLS_DC);
PHPAPI int php_header_write(const char *str, uint str_length TSRMLS_DC);
PHPAPI int php_start_ob_buffer(zval *output_handler, uint chunk_size, zend_bool erase
TSRMLS_DC);
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php