Lines Matching refs:val

94 static zend_bool php_mail_build_headers_check_field_value(zval *val)  in php_mail_build_headers_check_field_value()  argument
97 zend_string *value = Z_STR_P(val); in php_mail_build_headers_check_field_value()
102 if (*(value->val+len) == '\r') { in php_mail_build_headers_check_field_value()
104 && *(value->val+len+1) == '\n' in php_mail_build_headers_check_field_value()
105 && (*(value->val+len+2) == ' ' || *(value->val+len+2) == '\t')) { in php_mail_build_headers_check_field_value()
111 if (*(value->val+len) == '\0') { in php_mail_build_headers_check_field_value()
126 if (*(key->val+len) < 33 || *(key->val+len) > 126 || *(key->val+len) == ':') { in php_mail_build_headers_check_field_name()
135 static void php_mail_build_headers_elems(smart_str *s, zend_string *key, zval *val);
137 static void php_mail_build_headers_elem(smart_str *s, zend_string *key, zval *val) in php_mail_build_headers_elem() argument
139 switch(Z_TYPE_P(val)) { in php_mail_build_headers_elem()
145 if (php_mail_build_headers_check_field_value(val) != SUCCESS) { in php_mail_build_headers_elem()
146 … "Header field value (%s => %s) contains invalid chars or format", ZSTR_VAL(key), Z_STRVAL_P(val)); in php_mail_build_headers_elem()
151 smart_str_appends(s, Z_STRVAL_P(val)); in php_mail_build_headers_elem()
155 php_mail_build_headers_elems(s, key, val); in php_mail_build_headers_elem()
163 static void php_mail_build_headers_elems(smart_str *s, zend_string *key, zval *val) in php_mail_build_headers_elems() argument
170 ZEND_HASH_FOREACH_KEY_VAL(HASH_OF(val), idx, tmp_key, tmp_val) { in php_mail_build_headers_elems()
188 zval *val; in php_mail_build_headers() local
193 ZEND_HASH_FOREACH_KEY_VAL(HASH_OF(headers), idx, key, val) { in php_mail_build_headers()
202 PHP_MAIL_BUILD_HEADER_CHECK("orig-date", s, key, val); in php_mail_build_headers()
204 PHP_MAIL_BUILD_HEADER_DEFAULT(s, key, val); in php_mail_build_headers()
209 PHP_MAIL_BUILD_HEADER_CHECK("from", s, key, val); in php_mail_build_headers()
211 PHP_MAIL_BUILD_HEADER_DEFAULT(s, key, val); in php_mail_build_headers()
216 PHP_MAIL_BUILD_HEADER_CHECK("sender", s, key, val); in php_mail_build_headers()
218 PHP_MAIL_BUILD_HEADER_DEFAULT(s, key, val); in php_mail_build_headers()
223 PHP_MAIL_BUILD_HEADER_CHECK("reply-to", s, key, val); in php_mail_build_headers()
225 PHP_MAIL_BUILD_HEADER_DEFAULT(s, key, val); in php_mail_build_headers()
234 PHP_MAIL_BUILD_HEADER_CHECK("cc", s, key, val); in php_mail_build_headers()
236 PHP_MAIL_BUILD_HEADER_DEFAULT(s, key, val); in php_mail_build_headers()
241 PHP_MAIL_BUILD_HEADER_CHECK("bcc", s, key, val); in php_mail_build_headers()
243 PHP_MAIL_BUILD_HEADER_DEFAULT(s, key, val); in php_mail_build_headers()
248 PHP_MAIL_BUILD_HEADER_CHECK("message-id", s, key, val); in php_mail_build_headers()
250 PHP_MAIL_BUILD_HEADER_CHECK("references", s, key, val); in php_mail_build_headers()
252 PHP_MAIL_BUILD_HEADER_DEFAULT(s, key, val); in php_mail_build_headers()
257 PHP_MAIL_BUILD_HEADER_CHECK("in-reply-to", s, key, val); in php_mail_build_headers()
259 PHP_MAIL_BUILD_HEADER_DEFAULT(s, key, val); in php_mail_build_headers()
267 PHP_MAIL_BUILD_HEADER_DEFAULT(s, key, val); in php_mail_build_headers()
270 PHP_MAIL_BUILD_HEADER_DEFAULT(s, key, val); in php_mail_build_headers()
483 #define MAIL_RET(val) \ in php_mail() argument
487 return val; \ in php_mail()
510 len = spprintf(&tmp, 0, "[%s] %s%s", date_str->val, logline, PHP_EOL); in php_mail()