]> granicus.if.org Git - php/commitdiff
add safe_mode num of parameter check
authorYasuo Ohgaki <yohgaki@php.net>
Thu, 2 Mar 2006 00:34:28 +0000 (00:34 +0000)
committerYasuo Ohgaki <yohgaki@php.net>
Thu, 2 Mar 2006 00:34:28 +0000 (00:34 +0000)
ext/mbstring/mbstring.c

index 980de284407702724720f66c74427951c2031418..389c86bc80bd70abc4c2250f4e78ab96cbd7fa9d 100644 (file)
@@ -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);