gschlossnagle Tue Oct 8 22:57:33 2002 EDT Modified files: (Branch: apache_hooks) /php4/sapi/apache mod_php4.c Log: fixed return values for php_response_handler Index: php4/sapi/apache/mod_php4.c diff -u php4/sapi/apache/mod_php4.c:1.120.2.10 php4/sapi/apache/mod_php4.c:1.120.2.11 --- php4/sapi/apache/mod_php4.c:1.120.2.10 Mon Oct 7 22:17:02 2002 +++ php4/sapi/apache/mod_php4.c Tue Oct 8 22:57:33 2002 @@ -17,7 +17,7 @@ | PHP 4.0 patches by Zeev Suraski <[EMAIL PROTECTED]> | +----------------------------------------------------------------------+ */ -/* $Id: mod_php4.c,v 1.120.2.10 2002/10/08 02:17:02 gschlossnagle Exp $ */ +/* $Id: mod_php4.c,v 1.120.2.11 2002/10/09 02:57:33 gschlossnagle Exp $ */ #include "php_apache_http.h" @@ -156,20 +156,21 @@ int sapi_stack_apply_with_argument_all(sapi_stack *stack, int type, int (*apply_function)(void *element, void *arg), void *arg) { - int i; + int i, retval; switch (type) { case ZEND_STACK_APPLY_TOPDOWN: for (i=stack->top-1; i>=0; i--) { - apply_function(stack->elements[i], arg); + retval = apply_function(stack->elements[i], arg); } break; case ZEND_STACK_APPLY_BOTTOMUP: for (i=0; i<stack->top; i++) { - apply_function(stack->elements[i], arg); + retval = apply_function(stack->elements[i], arg); } break; } + return retval; } @@ -1366,7 +1367,7 @@ php_per_dir_config *conf; AP(current_hook) = AP_RESPONSE; conf = get_module_config(r->per_dir_config, &php4_module); - sapi_stack_apply_with_argument_all(&conf->response_handlers, ZEND_STACK_APPLY_BOTTOMUP, (int (*)(void *element, void *)) php_run_hook, r); + return sapi_stack_apply_with_argument_all(&conf->response_handlers, +ZEND_STACK_APPLY_BOTTOMUP, (int (*)(void *element, void *)) php_run_hook, r); } /* {{{ handler_rec php_handlers[]
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php