summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJani Taskinen <jani@php.net>2010-12-03 16:04:24 +0000
committerJani Taskinen <jani@php.net>2010-12-03 16:04:24 +0000
commit686c7fec26c7721bb92b836cc40d1232be497334 (patch)
treef8a4a37971be0306eb57b985cc065c2378a24ecd
parent85ef85a0b4c7eec39a9086ea0c43dba11957811d (diff)
downloadphp-git-686c7fec26c7721bb92b836cc40d1232be497334.tar.gz
- CS + reorder to match trunk better, removed trailing dots from error messages
-rw-r--r--main/output.c278
-rw-r--r--tests/output/bug46897.phpt4
-rw-r--r--tests/output/ob_clean_basic_001.phpt4
-rw-r--r--tests/output/ob_end_clean_basic_001.phpt4
-rw-r--r--tests/output/ob_end_flush_basic_001.phpt6
-rw-r--r--tests/output/ob_flush_basic_001.phpt4
-rw-r--r--tests/output/ob_get_level_basic_001.phpt4
-rw-r--r--tests/output/ob_start_basic_unerasable_002.phpt8
-rw-r--r--tests/output/ob_start_basic_unerasable_003.phpt4
-rw-r--r--tests/output/ob_start_basic_unerasable_004.phpt2
-rw-r--r--tests/output/ob_start_basic_unerasable_005.phpt4
11 files changed, 154 insertions, 168 deletions
diff --git a/main/output.c b/main/output.c
index 75044f5e9b..5e98558710 100644
--- a/main/output.c
+++ b/main/output.c
@@ -1,4 +1,4 @@
-/*
+/*
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
@@ -61,7 +61,7 @@ PHPAPI int php_default_output_func(const char *str, uint str_len TSRMLS_DC)
/* {{{ php_output_init_globals */
static void php_output_init_globals(php_output_globals *output_globals_p TSRMLS_DC)
{
- OG(php_body_write) = php_default_output_func;
+ OG(php_body_write) = php_default_output_func;
OG(php_header_write) = php_default_output_func;
OG(implicit_flush) = 0;
OG(output_start_filename) = NULL;
@@ -69,22 +69,20 @@ static void php_output_init_globals(php_output_globals *output_globals_p TSRMLS_
}
/* }}} */
-
/* {{{ php_output_startup
- Start output layer */
+ * Start output layer */
PHPAPI void php_output_startup(void)
{
#ifdef ZTS
ts_allocate_id(&output_globals_id, sizeof(php_output_globals), (ts_allocate_ctor) php_output_init_globals, NULL);
-#else
+#else
php_output_init_globals(&output_globals TSRMLS_CC);
#endif
}
/* }}} */
-
/* {{{ php_output_activate
- Initilize output global for activation */
+ * Initilize output global for activation */
PHPAPI void php_output_activate(TSRMLS_D)
{
OG(php_body_write) = php_ub_body_write;
@@ -97,15 +95,6 @@ PHPAPI void php_output_activate(TSRMLS_D)
}
/* }}} */
-
-/* {{{ php_output_set_status
- Toggle output status. Do NOT use in application code, only in SAPIs where appropriate. */
-PHPAPI void php_output_set_status(zend_bool status TSRMLS_DC)
-{
- OG(disable_output) = !status;
-}
-/* }}} */
-
/* {{{ php_output_register_constants */
void php_output_register_constants(TSRMLS_D)
{
@@ -115,12 +104,19 @@ void php_output_register_constants(TSRMLS_D)
}
/* }}} */
+/* {{{ php_output_set_status
+ * Toggle output status. Do NOT use in application code, only in SAPIs where appropriate. */
+PHPAPI void php_output_set_status(zend_bool status TSRMLS_DC)
+{
+ OG(disable_output) = !status;
+}
+/* }}} */
/* {{{ php_body_write
* Write body part */
PHPAPI int php_body_write(const char *str, uint str_length TSRMLS_DC)
{
- return OG(php_body_write)(str, str_length TSRMLS_CC);
+ return OG(php_body_write)(str, str_length TSRMLS_CC);
}
/* }}} */
@@ -219,7 +215,7 @@ PHPAPI void php_end_ob_buffer(zend_bool send_buffer, zend_bool just_flush TSRMLS
fclose(fp);
}
#endif
-
+
if (OG(active_ob_buffer).internal_output_handler) {
final_buffer = OG(active_ob_buffer).internal_output_handler_buffer;
final_buffer_length = OG(active_ob_buffer).internal_output_handler_buffer_size;
@@ -343,7 +339,7 @@ PHPAPI void php_end_ob_buffers(zend_bool send_buffer TSRMLS_DC)
*/
PHPAPI void php_start_implicit_flush(TSRMLS_D)
{
- OG(implicit_flush)=1;
+ OG(implicit_flush) = 1;
}
/* }}} */
@@ -351,7 +347,23 @@ PHPAPI void php_start_implicit_flush(TSRMLS_D)
*/
PHPAPI void php_end_implicit_flush(TSRMLS_D)
{
- OG(implicit_flush)=0;
+ OG(implicit_flush) = 0;
+}
+/* }}} */
+
+/* {{{ char *php_get_output_start_filename(TSRMLS_D)
+ * Return filename start output something */
+PHPAPI char *php_get_output_start_filename(TSRMLS_D)
+{
+ return OG(output_start_filename);
+}
+/* }}} */
+
+/* {{{ char *php_get_output_start_lineno(TSRMLS_D)
+ * Return line number start output something */
+PHPAPI int php_get_output_start_lineno(TSRMLS_D)
+{
+ return OG(output_start_lineno);
}
/* }}} */
@@ -359,7 +371,7 @@ PHPAPI void php_end_implicit_flush(TSRMLS_D)
*/
PHPAPI void php_ob_set_internal_handler(php_output_handler_func_t internal_output_handler, uint buffer_size, char *handler_name, zend_bool erase TSRMLS_DC)
{
- if (OG(ob_nesting_level)==0 || OG(active_ob_buffer).internal_output_handler || strcmp(OG(active_ob_buffer).handler_name, OB_DEFAULT_HANDLER_NAME)) {
+ if (OG(ob_nesting_level) == 0 || OG(active_ob_buffer).internal_output_handler || strcmp(OG(active_ob_buffer).handler_name, OB_DEFAULT_HANDLER_NAME)) {
php_start_ob_buffer(NULL, buffer_size, erase TSRMLS_CC);
}
@@ -398,8 +410,7 @@ static inline void php_ob_allocate(uint text_length TSRMLS_DC)
/* }}} */
/* {{{ php_ob_init_conflict
- * Returns 1 if handler_set is already used and generates error message
- */
+ * Returns 1 if handler_set is already used and generates error message */
PHPAPI int php_ob_init_conflict(char *handler_new, char *handler_set TSRMLS_DC)
{
if (php_ob_handler_used(handler_set TSRMLS_CC)) {
@@ -419,7 +430,7 @@ static int php_ob_init_named(uint initial_size, uint block_size, char *handler_n
if (output_handler && !zend_is_callable(output_handler, 0, NULL TSRMLS_CC)) {
return FAILURE;
}
-
+
tmp_buf.block_size = block_size;
tmp_buf.size = initial_size;
tmp_buf.buffer = (char *) emalloc(initial_size+1);
@@ -452,8 +463,7 @@ static int php_ob_init_named(uint initial_size, uint block_size, char *handler_n
/* }}} */
/* {{{ php_ob_handler_from_string
- * Create zval output handler from string
- */
+ * Create zval output handler from string */
static zval* php_ob_handler_from_string(const char *handler_name, int len TSRMLS_DC)
{
zval *output_handler;
@@ -544,36 +554,16 @@ static int php_ob_init(uint initial_size, uint block_size, zval *output_handler,
/* {{{ php_ob_list_each
*/
-static int php_ob_list_each(php_ob_buffer *ob_buffer, zval *ob_handler_array)
+static int php_ob_list_each(php_ob_buffer *ob_buffer, zval *ob_handler_array)
{
add_next_index_string(ob_handler_array, ob_buffer->handler_name, 1);
return 0;
}
/* }}} */
-/* {{{ proto false|array ob_list_handlers()
- * List all output_buffers in an array
- */
-PHP_FUNCTION(ob_list_handlers)
-{
- if (zend_parse_parameters_none() == FAILURE) {
- return;
- }
-
- array_init(return_value);
- if (OG(ob_nesting_level)) {
- if (OG(ob_nesting_level)>1) {
- zend_stack_apply_with_argument(&OG(ob_buffers), ZEND_STACK_APPLY_BOTTOMUP, (int (*)(void *element, void *)) php_ob_list_each, return_value);
- }
- php_ob_list_each(&OG(active_ob_buffer), return_value);
- }
-}
-/* }}} */
-
/* {{{ php_ob_used_each
- * Sets handler_name to NULL is found
- */
-static int php_ob_handler_used_each(php_ob_buffer *ob_buffer, char **handler_name)
+ Sets handler_name to NULL is found */
+static int php_ob_handler_used_each(php_ob_buffer *ob_buffer, char **handler_name)
{
if (!strcmp(ob_buffer->handler_name, *handler_name)) {
*handler_name = NULL;
@@ -584,8 +574,7 @@ static int php_ob_handler_used_each(php_ob_buffer *ob_buffer, char **handler_nam
/* }}} */
/* {{{ php_ob_used
- * returns 1 if given handler_name is used as output_handler
- */
+ returns 1 if given handler_name is used as output_handler */
PHPAPI int php_ob_handler_used(char *handler_name TSRMLS_DC)
{
char *tmp = handler_name;
@@ -616,10 +605,10 @@ static inline void php_ob_append(const char *text, uint text_length TSRMLS_DC)
memcpy(target, text, text_length);
target[text_length]=0;
- /* If implicit_flush is On or chunked buffering, send contents to next buffer and return. */
+ /* If implicit_flush is On or chunked buffering, send contents to next buffer and return. */
if (OG(active_ob_buffer).chunk_size
&& OG(active_ob_buffer).text_length >= OG(active_ob_buffer).chunk_size) {
-
+
php_end_ob_buffer(1, 1 TSRMLS_CC);
return;
}
@@ -646,7 +635,6 @@ static inline void php_ob_prepend(const char *text, uint text_length)
}
#endif
-
/* {{{ php_ob_get_buffer
* Return the current output buffer */
PHPAPI int php_ob_get_buffer(zval *p TSRMLS_DC)
@@ -675,7 +663,6 @@ PHPAPI int php_ob_get_length(zval *p TSRMLS_DC)
* Wrapper functions - implementation
*/
-
/* buffered output function */
static int php_b_body_write(const char *str, uint str_length TSRMLS_DC)
{
@@ -691,7 +678,7 @@ PHPAPI int php_ub_body_write_no_header(const char *str, uint str_length TSRMLS_D
if (OG(disable_output)) {
return 0;
- }
+ }
result = OG(php_header_write)(str, str_length TSRMLS_CC);
@@ -733,26 +720,56 @@ PHPAPI int php_ub_body_write(const char *str, uint str_length TSRMLS_DC)
}
/* }}} */
+/* {{{ int php_ob_buffer_status(php_ob_buffer *ob_buffer, zval *result)
+ */
+static int php_ob_buffer_status(php_ob_buffer *ob_buffer, zval *result)
+{
+ zval *elem;
+
+ MAKE_STD_ZVAL(elem);
+ array_init(elem);
+
+ add_assoc_long(elem, "chunk_size", ob_buffer->chunk_size);
+ if (!ob_buffer->chunk_size) {
+ add_assoc_long(elem, "size", ob_buffer->size);
+ add_assoc_long(elem, "block_size", ob_buffer->block_size);
+ }
+ if (ob_buffer->internal_output_handler) {
+ add_assoc_long(elem, "type", PHP_OUTPUT_HANDLER_INTERNAL);
+ add_assoc_long(elem, "buffer_size", ob_buffer->internal_output_handler_buffer_size);
+ } else {
+ add_assoc_long(elem, "type", PHP_OUTPUT_HANDLER_USER);
+ }
+ add_assoc_long(elem, "status", ob_buffer->status);
+ add_assoc_string(elem, "name", ob_buffer->handler_name, 1);
+ add_assoc_bool(elem, "del", ob_buffer->erase);
+ add_next_index_zval(result, elem);
+
+ return SUCCESS;
+}
+/* }}} */
+
/*
- * HEAD support
+ * USERLAND (nearly 1:1 of old output.c)
*/
-/* {{{ proto bool ob_start([ string|array user_function [, int chunk_size [, bool erase]]])
+/* {{{ proto bool ob_start([string|array user_function [, int chunk_size [, bool erase]]])
Turn on Output Buffering (specifying an optional output handler). */
PHP_FUNCTION(ob_start)
{
- zval *output_handler=NULL;
- long chunk_size=0;
- zend_bool erase=1;
+ zval *output_handler = NULL;
+ long chunk_size = 0;
+ zend_bool erase = 1;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|z/lb", &output_handler, &chunk_size, &erase) == FAILURE) {
return;
}
- if (chunk_size < 0)
+ if (chunk_size < 0) {
chunk_size = 0;
+ }
- if (php_start_ob_buffer(output_handler, chunk_size, erase TSRMLS_CC)==FAILURE) {
+ if (php_start_ob_buffer(output_handler, chunk_size, erase TSRMLS_CC) == FAILURE) {
RETURN_FALSE;
}
RETURN_TRUE;
@@ -768,21 +785,20 @@ PHP_FUNCTION(ob_flush)
}
if (!OG(ob_nesting_level)) {
- php_error_docref("ref.outcontrol" TSRMLS_CC, E_NOTICE, "failed to flush buffer. No buffer to flush.");
+ php_error_docref("ref.outcontrol" TSRMLS_CC, E_NOTICE, "failed to flush buffer. No buffer to flush");
RETURN_FALSE;
}
-
+
if (!OG(active_ob_buffer).status && !OG(active_ob_buffer).erase) {
- php_error_docref("ref.outcontrol" TSRMLS_CC, E_NOTICE, "failed to flush buffer %s.", OG(active_ob_buffer).handler_name);
+ php_error_docref("ref.outcontrol" TSRMLS_CC, E_NOTICE, "failed to flush buffer %s", OG(active_ob_buffer).handler_name);
RETURN_FALSE;
}
-
+
php_end_ob_buffer(1, 1 TSRMLS_CC);
RETURN_TRUE;
}
/* }}} */
-
/* {{{ proto bool ob_clean(void)
Clean (delete) the current output buffer */
PHP_FUNCTION(ob_clean)
@@ -790,17 +806,17 @@ PHP_FUNCTION(ob_clean)
if (zend_parse_parameters_none() == FAILURE) {
return;
}
-
+
if (!OG(ob_nesting_level)) {
- php_error_docref("ref.outcontrol" TSRMLS_CC, E_NOTICE, "failed to delete buffer. No buffer to delete.");
+ php_error_docref("ref.outcontrol" TSRMLS_CC, E_NOTICE, "failed to delete buffer. No buffer to delete");
RETURN_FALSE;
}
if (!OG(active_ob_buffer).status && !OG(active_ob_buffer).erase) {
- php_error_docref("ref.outcontrol" TSRMLS_CC, E_NOTICE, "failed to delete buffer %s.", OG(active_ob_buffer).handler_name);
+ php_error_docref("ref.outcontrol" TSRMLS_CC, E_NOTICE, "failed to delete buffer %s", OG(active_ob_buffer).handler_name);
RETURN_FALSE;
}
-
+
php_end_ob_buffer(0, 1 TSRMLS_CC);
RETURN_TRUE;
}
@@ -813,16 +829,17 @@ PHP_FUNCTION(ob_end_flush)
if (zend_parse_parameters_none() == FAILURE) {
return;
}
-
+
if (!OG(ob_nesting_level)) {
- php_error_docref("ref.outcontrol" TSRMLS_CC, E_NOTICE, "failed to delete and flush buffer. No buffer to delete or flush.");
+ php_error_docref("ref.outcontrol" TSRMLS_CC, E_NOTICE, "failed to delete and flush buffer. No buffer to delete or flush");
RETURN_FALSE;
}
+
if (OG(ob_nesting_level) && !OG(active_ob_buffer).status && !OG(active_ob_buffer).erase) {
- php_error_docref("ref.outcontrol" TSRMLS_CC, E_NOTICE, "failed to delete buffer %s.", OG(active_ob_buffer).handler_name);
+ php_error_docref("ref.outcontrol" TSRMLS_CC, E_NOTICE, "failed to delete buffer %s", OG(active_ob_buffer).handler_name);
RETURN_FALSE;
}
-
+
php_end_ob_buffer(1, 0 TSRMLS_CC);
RETURN_TRUE;
}
@@ -835,16 +852,17 @@ PHP_FUNCTION(ob_end_clean)
if (zend_parse_parameters_none() == FAILURE) {
return;
}
-
+
if (!OG(ob_nesting_level)) {
- php_error_docref("ref.outcontrol" TSRMLS_CC, E_NOTICE, "failed to delete buffer. No buffer to delete.");
+ php_error_docref("ref.outcontrol" TSRMLS_CC, E_NOTICE, "failed to delete buffer. No buffer to delete");
RETURN_FALSE;
}
+
if (OG(ob_nesting_level) && !OG(active_ob_buffer).status && !OG(active_ob_buffer).erase) {
- php_error_docref("ref.outcontrol" TSRMLS_CC, E_NOTICE, "failed to delete buffer %s.", OG(active_ob_buffer).handler_name);
+ php_error_docref("ref.outcontrol" TSRMLS_CC, E_NOTICE, "failed to delete buffer %s", OG(active_ob_buffer).handler_name);
RETURN_FALSE;
}
-
+
php_end_ob_buffer(0, 0 TSRMLS_CC);
RETURN_TRUE;
}
@@ -858,22 +876,22 @@ PHP_FUNCTION(ob_get_flush)
return;
}
- /* get contents */
- if (php_ob_get_buffer(return_value TSRMLS_CC)==FAILURE) {
+ if (php_ob_get_buffer(return_value TSRMLS_CC) == FAILURE) {
RETURN_FALSE;
}
- /* error checks */
+
if (!OG(ob_nesting_level)) {
- php_error_docref("ref.outcontrol" TSRMLS_CC, E_NOTICE, "failed to delete and flush buffer. No buffer to delete or flush.");
+ php_error_docref("ref.outcontrol" TSRMLS_CC, E_NOTICE, "failed to delete and flush buffer. No buffer to delete or flush");
zval_dtor(return_value);
RETURN_FALSE;
}
+
if (OG(ob_nesting_level) && !OG(active_ob_buffer).status && !OG(active_ob_buffer).erase) {
- php_error_docref("ref.outcontrol" TSRMLS_CC, E_NOTICE, "failed to delete buffer %s.", OG(active_ob_buffer).handler_name);
+ php_error_docref("ref.outcontrol" TSRMLS_CC, E_NOTICE, "failed to delete buffer %s", OG(active_ob_buffer).handler_name);
zval_dtor(return_value);
RETURN_FALSE;
}
- /* flush */
+
php_end_ob_buffer(1, 0 TSRMLS_CC);
}
/* }}} */
@@ -885,22 +903,22 @@ PHP_FUNCTION(ob_get_clean)
if (zend_parse_parameters_none() == FAILURE) {
return;
}
- /* get contents */
- if (php_ob_get_buffer(return_value TSRMLS_CC)==FAILURE) {
+
+ if (php_ob_get_buffer(return_value TSRMLS_CC) == FAILURE) {
RETURN_FALSE;
}
- /* error checks */
+
if (!OG(ob_nesting_level)) {
- php_error_docref("ref.outcontrol" TSRMLS_CC, E_NOTICE, "failed to delete buffer. No buffer to delete.");
+ php_error_docref("ref.outcontrol" TSRMLS_CC, E_NOTICE, "failed to delete buffer. No buffer to delete");
zval_dtor(return_value);
RETURN_FALSE;
}
if (OG(ob_nesting_level) && !OG(active_ob_buffer).status && !OG(active_ob_buffer).erase) {
- php_error_docref("ref.outcontrol" TSRMLS_CC, E_NOTICE, "failed to delete buffer %s.", OG(active_ob_buffer).handler_name);
+ php_error_docref("ref.outcontrol" TSRMLS_CC, E_NOTICE, "failed to delete buffer %s", OG(active_ob_buffer).handler_name);
zval_dtor(return_value);
RETURN_FALSE;
}
- /* delete buffer */
+
php_end_ob_buffer(0, 0 TSRMLS_CC);
}
/* }}} */
@@ -912,8 +930,8 @@ PHP_FUNCTION(ob_get_contents)
if (zend_parse_parameters_none() == FAILURE) {
return;
}
-
- if (php_ob_get_buffer(return_value TSRMLS_CC)==FAILURE) {
+
+ if (php_ob_get_buffer(return_value TSRMLS_CC) == FAILURE) {
RETURN_FALSE;
}
}
@@ -926,8 +944,8 @@ PHP_FUNCTION(ob_get_level)
if (zend_parse_parameters_none() == FAILURE) {
return;
}
-
- RETURN_LONG (OG(ob_nesting_level));
+
+ RETURN_LONG(OG(ob_nesting_level));
}
/* }}} */
@@ -938,63 +956,52 @@ PHP_FUNCTION(ob_get_length)
if (zend_parse_parameters_none() == FAILURE) {
return;
}
-
- if (php_ob_get_length(return_value TSRMLS_CC)==FAILURE) {
+
+ if (php_ob_get_length(return_value TSRMLS_CC) == FAILURE) {
RETURN_FALSE;
}
}
/* }}} */
-/* {{{ int php_ob_buffer_status(php_ob_buffer *ob_buffer, zval *result) */
-static int php_ob_buffer_status(php_ob_buffer *ob_buffer, zval *result)
+/* {{{ proto false|array ob_list_handlers()
+ List all output_buffers in an array */
+PHP_FUNCTION(ob_list_handlers)
{
- zval *elem;
+ if (zend_parse_parameters_none() == FAILURE) {
+ return;
+ }
- MAKE_STD_ZVAL(elem);
- array_init(elem);
+ array_init(return_value);
- add_assoc_long(elem, "chunk_size", ob_buffer->chunk_size);
- if (!ob_buffer->chunk_size) {
- add_assoc_long(elem, "size", ob_buffer->size);
- add_assoc_long(elem, "block_size", ob_buffer->block_size);
- }
- if (ob_buffer->internal_output_handler) {
- add_assoc_long(elem, "type", PHP_OUTPUT_HANDLER_INTERNAL);
- add_assoc_long(elem, "buffer_size", ob_buffer->internal_output_handler_buffer_size);
- }
- else {
- add_assoc_long(elem, "type", PHP_OUTPUT_HANDLER_USER);
+ if (OG(ob_nesting_level)) {
+ if (OG(ob_nesting_level) > 1) {
+ zend_stack_apply_with_argument(&OG(ob_buffers), ZEND_STACK_APPLY_BOTTOMUP, (int (*)(void *element, void *)) php_ob_list_each, return_value);
+ }
+ php_ob_list_each(&OG(active_ob_buffer), return_value);
}
- add_assoc_long(elem, "status", ob_buffer->status);
- add_assoc_string(elem, "name", ob_buffer->handler_name, 1);
- add_assoc_bool(elem, "del", ob_buffer->erase);
- add_next_index_zval(result, elem);
-
- return SUCCESS;
}
/* }}} */
-
/* {{{ proto false|array ob_get_status([bool full_status])
Return the status of the active or all output buffers */
PHP_FUNCTION(ob_get_status)
{
zend_bool full_status = 0;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|b", &full_status) == FAILURE ) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|b", &full_status) == FAILURE) {
return;
}
array_init(return_value);
if (full_status) {
- if (OG(ob_nesting_level)>1) {
+ if (OG(ob_nesting_level) > 1) {
zend_stack_apply_with_argument(&OG(ob_buffers), ZEND_STACK_APPLY_BOTTOMUP, (int (*)(void *elem, void *))php_ob_buffer_status, return_value);
}
- if (OG(ob_nesting_level)>0 && php_ob_buffer_status(&OG(active_ob_buffer), return_value)==FAILURE) {
+ if (OG(ob_nesting_level) > 0 && php_ob_buffer_status(&OG(active_ob_buffer), return_value) == FAILURE) {
RETURN_FALSE;
}
- } else if (OG(ob_nesting_level)>0) {
+ } else if (OG(ob_nesting_level) > 0) {
add_assoc_long(return_value, "level", OG(ob_nesting_level));
if (OG(active_ob_buffer).internal_output_handler) {
add_assoc_long(return_value, "type", PHP_OUTPUT_HANDLER_INTERNAL);
@@ -1008,7 +1015,6 @@ PHP_FUNCTION(ob_get_status)
}
/* }}} */
-
/* {{{ proto void ob_implicit_flush([int flag])
Turn implicit flush on/off and is equivalent to calling flush() after every output call */
PHP_FUNCTION(ob_implicit_flush)
@@ -1027,25 +1033,6 @@ PHP_FUNCTION(ob_implicit_flush)
}
/* }}} */
-
-/* {{{ char *php_get_output_start_filename(TSRMLS_D)
- Return filename start output something */
-PHPAPI char *php_get_output_start_filename(TSRMLS_D)
-{
- return OG(output_start_filename);
-}
-/* }}} */
-
-
-/* {{{ char *php_get_output_start_lineno(TSRMLS_D)
- Return line number start output something */
-PHPAPI int php_get_output_start_lineno(TSRMLS_D)
-{
- return OG(output_start_lineno);
-}
-/* }}} */
-
-
/* {{{ proto bool output_reset_rewrite_vars(void)
Reset(clear) URL rewriter values */
PHP_FUNCTION(output_reset_rewrite_vars)
@@ -1058,7 +1045,6 @@ PHP_FUNCTION(output_reset_rewrite_vars)
}
/* }}} */
-
/* {{{ proto bool output_add_rewrite_var(string name, string value)
Add URL rewriter values */
PHP_FUNCTION(output_add_rewrite_var)
diff --git a/tests/output/bug46897.phpt b/tests/output/bug46897.phpt
index 6cfb102531..a77db91d34 100644
--- a/tests/output/bug46897.phpt
+++ b/tests/output/bug46897.phpt
@@ -18,10 +18,10 @@ echo 'Done';
?>
--EXPECTF--
[callback:1]Attempt to flush unerasable buffer - should fail...
-Notice: ob_flush(): failed to flush buffer callback. in %s on line %d
+Notice: ob_flush(): failed to flush buffer callback in %s on line %d
bool(false)
string(%d) "Attempt to flush unerasable buffer - should fail...
-Notice: ob_flush(): failed to flush buffer callback. in %s on line %d
+Notice: ob_flush(): failed to flush buffer callback in %s on line %d
bool(false)
"
Done
diff --git a/tests/output/ob_clean_basic_001.phpt b/tests/output/ob_clean_basic_001.phpt
index c93bea3588..afaa7e2f4a 100644
--- a/tests/output/ob_clean_basic_001.phpt
+++ b/tests/output/ob_clean_basic_001.phpt
@@ -29,8 +29,8 @@ echo "Done";
-- Testing ob_clean() function with Zero arguments --
-Notice: ob_clean(): failed to delete buffer. No buffer to delete. in %s on line 12
+Notice: ob_clean(): failed to delete buffer. No buffer to delete in %s on line 12
bool(false)
string(61) "bool(true)
Ensure the buffer is still active after the clean."
-Done \ No newline at end of file
+Done
diff --git a/tests/output/ob_end_clean_basic_001.phpt b/tests/output/ob_end_clean_basic_001.phpt
index 0b694e36ca..54e840bdbd 100644
--- a/tests/output/ob_end_clean_basic_001.phpt
+++ b/tests/output/ob_end_clean_basic_001.phpt
@@ -21,11 +21,11 @@ var_dump(ob_end_clean());
?>
--EXPECTF--
-Notice: ob_end_clean(): failed to delete buffer. No buffer to delete. in %s on line 7
+Notice: ob_end_clean(): failed to delete buffer. No buffer to delete in %s on line 7
bool(false)
bool(true)
bool(true)
-Notice: ob_end_clean(): failed to delete buffer. No buffer to delete. in %s on line 16
+Notice: ob_end_clean(): failed to delete buffer. No buffer to delete in %s on line 16
bool(false)
diff --git a/tests/output/ob_end_flush_basic_001.phpt b/tests/output/ob_end_flush_basic_001.phpt
index 7515face06..cba7802761 100644
--- a/tests/output/ob_end_flush_basic_001.phpt
+++ b/tests/output/ob_end_flush_basic_001.phpt
@@ -30,12 +30,12 @@ echo "Done";
-- Testing ob_end_flush() function with Zero arguments --
-Notice: ob_end_flush(): failed to delete and flush buffer. No buffer to delete or flush. in %s on line 12
+Notice: ob_end_flush(): failed to delete and flush buffer. No buffer to delete or flush in %s on line 12
bool(false)
bool(true)
Hello
bool(true)
-Notice: ob_end_flush(): failed to delete and flush buffer. No buffer to delete or flush. in %s on line 21
+Notice: ob_end_flush(): failed to delete and flush buffer. No buffer to delete or flush in %s on line 21
bool(false)
-Done \ No newline at end of file
+Done
diff --git a/tests/output/ob_flush_basic_001.phpt b/tests/output/ob_flush_basic_001.phpt
index 91fb695266..57de5e31ad 100644
--- a/tests/output/ob_flush_basic_001.phpt
+++ b/tests/output/ob_flush_basic_001.phpt
@@ -30,10 +30,10 @@ echo "Done";
-- Testing ob_flush() function with Zero arguments --
-Notice: ob_flush(): failed to flush buffer. No buffer to flush. in %s on line 12
+Notice: ob_flush(): failed to flush buffer. No buffer to flush in %s on line 12
bool(false)
This should get flushed.
bool(true)
Ensure the buffer is still active after the flush.
bool(true)
-Done \ No newline at end of file
+Done
diff --git a/tests/output/ob_get_level_basic_001.phpt b/tests/output/ob_get_level_basic_001.phpt
index 78217e4a45..65f3291355 100644
--- a/tests/output/ob_get_level_basic_001.phpt
+++ b/tests/output/ob_get_level_basic_001.phpt
@@ -42,6 +42,6 @@ int(2)
int(1)
int(0)
-Notice: ob_end_flush(): failed to delete and flush buffer. No buffer to delete or flush. in %s on line 26
+Notice: ob_end_flush(): failed to delete and flush buffer. No buffer to delete or flush in %s on line 26
int(0)
-Done \ No newline at end of file
+Done
diff --git a/tests/output/ob_start_basic_unerasable_002.phpt b/tests/output/ob_start_basic_unerasable_002.phpt
index 2ffcbb9dc1..3b8bd637ee 100644
--- a/tests/output/ob_start_basic_unerasable_002.phpt
+++ b/tests/output/ob_start_basic_unerasable_002.phpt
@@ -21,13 +21,13 @@ var_dump(ob_get_level());
--EXPECTF--
[callback:1]All of the following calls will fail to clean/remove the topmost buffer:
-Notice: ob_clean(): failed to delete buffer callback. in %s on line 11
+Notice: ob_clean(): failed to delete buffer callback in %s on line 11
bool(false)
-Notice: ob_end_clean(): failed to delete buffer callback. in %s on line 12
+Notice: ob_end_clean(): failed to delete buffer callback in %s on line 12
bool(false)
-Notice: ob_end_flush(): failed to delete buffer callback. in %s on line 13
+Notice: ob_end_flush(): failed to delete buffer callback in %s on line 13
bool(false)
The OB nesting will still be 1 level deep:
-int(1) \ No newline at end of file
+int(1)
diff --git a/tests/output/ob_start_basic_unerasable_003.phpt b/tests/output/ob_start_basic_unerasable_003.phpt
index d201414533..e35902c89b 100644
--- a/tests/output/ob_start_basic_unerasable_003.phpt
+++ b/tests/output/ob_start_basic_unerasable_003.phpt
@@ -17,5 +17,5 @@ var_dump($str);
--EXPECTF--
[callback:1]This call will fail to obtain the content, since it is also requesting a clean:
-Notice: ob_get_clean(): failed to delete buffer callback. in %s on line 11
-bool(false) \ No newline at end of file
+Notice: ob_get_clean(): failed to delete buffer callback in %s on line 11
+bool(false)
diff --git a/tests/output/ob_start_basic_unerasable_004.phpt b/tests/output/ob_start_basic_unerasable_004.phpt
index 6669856d67..081875a788 100644
--- a/tests/output/ob_start_basic_unerasable_004.phpt
+++ b/tests/output/ob_start_basic_unerasable_004.phpt
@@ -17,5 +17,5 @@ var_dump($str);
--EXPECTF--
[callback:1]This call will fail to flush and fail to obtain the content:
-Notice: ob_get_flush(): failed to delete buffer callback. in %s on line 11
+Notice: ob_get_flush(): failed to delete buffer callback in %s on line 11
bool(false)
diff --git a/tests/output/ob_start_basic_unerasable_005.phpt b/tests/output/ob_start_basic_unerasable_005.phpt
index 7be71e5aa8..f1af201e67 100644
--- a/tests/output/ob_start_basic_unerasable_005.phpt
+++ b/tests/output/ob_start_basic_unerasable_005.phpt
@@ -17,9 +17,9 @@ var_dump(ob_get_contents());
?>
--EXPECTF--
[callback:1]Attempt to flush unerasable buffer - should fail...
-Notice: ob_flush(): failed to flush buffer callback. in %s on line 11
+Notice: ob_flush(): failed to flush buffer callback in %s on line 11
bool(false)
string(%d) "Attempt to flush unerasable buffer - should fail...
-Notice: ob_flush(): failed to flush buffer callback. in %s on line 11
+Notice: ob_flush(): failed to flush buffer callback in %s on line 11
bool(false)
"