summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYasuo Ohgaki <yohgaki@php.net>2006-03-02 00:37:22 +0000
committerYasuo Ohgaki <yohgaki@php.net>2006-03-02 00:37:22 +0000
commite2218515d240816dcdd68dc4ac82d103d76f14a1 (patch)
tree439da4a51b0550ef6246e963c5c06e4a46c8f96f
parent1aa1c535b51cf4d8acb4e4672942c50c91168478 (diff)
downloadphp-git-e2218515d240816dcdd68dc4ac82d103d76f14a1.tar.gz
MFH add safe_mode num of parameter check
-rw-r--r--ext/mbstring/mbstring.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c
index ca440766c8..5549ad6bf9 100644
--- a/ext/mbstring/mbstring.c
+++ b/ext/mbstring/mbstring.c
@@ -3068,7 +3068,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);