summaryrefslogtreecommitdiff
path: root/ext/mbstring/php_mbregex.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/mbstring/php_mbregex.c')
-rw-r--r--ext/mbstring/php_mbregex.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/mbstring/php_mbregex.c b/ext/mbstring/php_mbregex.c
index bcdff2c4c9..6fded56744 100644
--- a/ext/mbstring/php_mbregex.c
+++ b/ext/mbstring/php_mbregex.c
@@ -855,8 +855,8 @@ PHP_FUNCTION(mb_regex_encoding)
mbctype = _php_mb_regex_name2mbctype(encoding);
if (mbctype == ONIG_ENCODING_UNDEF) {
- php_error_docref(NULL, E_WARNING, "Unknown encoding \"%s\"", encoding);
- RETURN_FALSE;
+ zend_argument_value_error(1, "must be a valid encoding, \"%s\" given", encoding);
+ RETURN_THROWS();
}
MBREX(current_mbctype) = mbctype;