From: Yasuo Ohgaki Date: Thu, 2 Mar 2006 00:34:28 +0000 (+0000) Subject: add safe_mode num of parameter check X-Git-Tag: RELEASE_1_2~39 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=52fe090ef017e1095cbafae2cff0af8968370047;p=php add safe_mode num of parameter check --- diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index 980de28440..389c86bc80 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -3069,7 +3069,12 @@ PHP_FUNCTION(mb_send_mail) HashTable ht_headers; smart_str *s; extern void mbfl_memory_device_unput(mbfl_memory_device *device); - + + if (PG(safe_mode) && (ZEND_NUM_ARGS() == 5)) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "SAFE MODE Restriction in effect. The fifth parameter is disabled in SAFE MODE."); + RETURN_FALSE; + } + /* initialize */ mbfl_memory_device_init(&device, 0, 0); mbfl_string_init(&orig_str);