summaryrefslogtreecommitdiff
path: root/ext/standard/php_mail.h
diff options
context:
space:
mode:
authorMáté Kocsis <kocsismate@woohoolabs.com>2020-09-10 13:28:18 +0200
committerMáté Kocsis <kocsismate@woohoolabs.com>2020-09-15 14:26:16 +0200
commitc37a1cd650a5399c4a89543759deedcc7280becd (patch)
tree3a36dcdb3a20042ce3f37b3b534cbc5fbec7d1d4 /ext/standard/php_mail.h
parent62c20c662a961f030178a15311bfe37591c10316 (diff)
downloadphp-git-c37a1cd650a5399c4a89543759deedcc7280becd.tar.gz
Promote a few remaining errors in ext/standard
Closes GH-6110
Diffstat (limited to 'ext/standard/php_mail.h')
-rw-r--r--ext/standard/php_mail.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/standard/php_mail.h b/ext/standard/php_mail.h
index 2a561d5523..7e7a758545 100644
--- a/ext/standard/php_mail.h
+++ b/ext/standard/php_mail.h
@@ -28,12 +28,12 @@ do { \
php_mail_build_headers_elem(&s, key, val); \
} else if (Z_TYPE_P(val) == IS_ARRAY) { \
if (!strncasecmp(target, ZSTR_VAL(key), ZSTR_LEN(key))) { \
- php_error_docref(NULL, E_WARNING, "'%s' header must be at most one header. Array is passed for '%s'", target, target); \
- continue; \
+ zend_type_error("Header \"%s\" must be of type string, array given", target); \
+ break; \
} \
php_mail_build_headers_elems(&s, key, val); \
} else { \
- php_error_docref(NULL, E_WARNING, "Extra header element '%s' cannot be other than string or array.", ZSTR_VAL(key)); \
+ zend_type_error("Header \"%s\" must be of type array|string, %s given", ZSTR_VAL(key), zend_zval_type_name(val)); \
} \
} while(0)
@@ -45,7 +45,7 @@ do { \
} else if (Z_TYPE_P(val) == IS_ARRAY) { \
php_mail_build_headers_elems(&s, key, val); \
} else { \
- php_error_docref(NULL, E_WARNING, "Extra header element '%s' cannot be other than string or array.", ZSTR_VAL(key)); \
+ zend_type_error("Header \"%s\" must be of type array|string, %s given", ZSTR_VAL(key), zend_zval_type_name(val)); \
} \
} while(0)