Lines Matching refs:val

60 static bool php_mail_build_headers_check_field_value(zval *val)  in php_mail_build_headers_check_field_value()  argument
63 zend_string *value = Z_STR_P(val); in php_mail_build_headers_check_field_value()
68 if (*(value->val+len) == '\r') { in php_mail_build_headers_check_field_value()
70 && *(value->val+len+1) == '\n' in php_mail_build_headers_check_field_value()
71 && (*(value->val+len+2) == ' ' || *(value->val+len+2) == '\t')) { in php_mail_build_headers_check_field_value()
77 if (*(value->val+len) == '\0') { in php_mail_build_headers_check_field_value()
92 if (*(key->val+len) < 33 || *(key->val+len) > 126 || *(key->val+len) == ':') { in php_mail_build_headers_check_field_name()
101 static void php_mail_build_headers_elems(smart_str *s, zend_string *key, zval *val);
103 static void php_mail_build_headers_elem(smart_str *s, zend_string *key, zval *val) in php_mail_build_headers_elem() argument
105 switch(Z_TYPE_P(val)) { in php_mail_build_headers_elem()
111 if (php_mail_build_headers_check_field_value(val) != SUCCESS) { in php_mail_build_headers_elem()
117 smart_str_appends(s, Z_STRVAL_P(val)); in php_mail_build_headers_elem()
121 php_mail_build_headers_elems(s, key, val); in php_mail_build_headers_elem()
124 …r("Header \"%s\" must be of type array|string, %s given", ZSTR_VAL(key), zend_zval_type_name(val)); in php_mail_build_headers_elem()
129 static void php_mail_build_headers_elems(smart_str *s, zend_string *key, zval *val) in php_mail_build_headers_elems() argument
134 ZEND_HASH_FOREACH_STR_KEY_VAL(Z_ARRVAL_P(val), tmp_key, tmp_val) { in php_mail_build_headers_elems()
153 zval *val; in php_mail_build_headers() local
156 ZEND_HASH_FOREACH_KEY_VAL(headers, idx, key, val) { in php_mail_build_headers()
161 ZVAL_DEREF(val); in php_mail_build_headers()
164 PHP_MAIL_BUILD_HEADER_CHECK("orig-date", s, key, val); in php_mail_build_headers()
166 PHP_MAIL_BUILD_HEADER_CHECK("from", s, key, val); in php_mail_build_headers()
168 PHP_MAIL_BUILD_HEADER_CHECK("sender", s, key, val); in php_mail_build_headers()
170 PHP_MAIL_BUILD_HEADER_CHECK("reply-to", s, key, val); in php_mail_build_headers()
174 PHP_MAIL_BUILD_HEADER_CHECK("cc", s, key, val); in php_mail_build_headers()
176 PHP_MAIL_BUILD_HEADER_CHECK("bcc", s, key, val); in php_mail_build_headers()
178 PHP_MAIL_BUILD_HEADER_CHECK("message-id", s, key, val); in php_mail_build_headers()
180 PHP_MAIL_BUILD_HEADER_CHECK("references", s, key, val); in php_mail_build_headers()
182 PHP_MAIL_BUILD_HEADER_CHECK("in-reply-to", s, key, val); in php_mail_build_headers()
186 PHP_MAIL_BUILD_HEADER_DEFAULT(s, key, val); in php_mail_build_headers()
392 #define MAIL_RET(val) \ in php_mail() argument
396 return val; \ in php_mail()
419 len = spprintf(&tmp, 0, "[%s] %s%s", date_str->val, logline, PHP_EOL); in php_mail()