From: Michael Wallner Date: Wed, 13 Apr 2005 17:29:04 +0000 (+0000) Subject: - E_THROW for PHP4 too X-Git-Tag: RELEASE_0_8_0~61 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=47c525716db7a03c84af5efc9953db3634084263;p=m6w6%2Fext-http - E_THROW for PHP4 too - dont return on wrong param count --- diff --git a/php_http_std_defs.h b/php_http_std_defs.h index b4aee3f..03911a8 100644 --- a/php_http_std_defs.h +++ b/php_http_std_defs.h @@ -34,7 +34,10 @@ typedef int STATUS; #define RETURN_SUCCESS(v) RETURN_BOOL(SUCCESS == (v)) /* function accepts no args */ -#define NO_ARGS if (ZEND_NUM_ARGS()) WRONG_PARAM_COUNT +#define NO_ARGS \ + if (ZEND_NUM_ARGS()) { \ + zend_error(E_NOTICE, "Wrong parameter count for %s()", get_active_function_name(TSRMLS_C)); \ + } /* CR LF */ #define HTTP_CRLF "\r\n" @@ -142,13 +145,13 @@ typedef int STATUS; # define SET_EH_THROW_EX(ex) php_set_error_handling(EH_THROW, ex TSRMLS_CC) # define SET_EH_NORMAL() php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC) -# ifndef E_THROW -# define E_THROW 0 -# endif - #endif /* ZEND_ENGINE_2 */ /* }}} */ +#ifndef E_THROW +# define E_THROW 0 +#endif + #define HTTP_E_UNKOWN 0L #define HTTP_E_PARSE 1L #define HTTP_E_HEADER 2L