diff options
author | George Peter Banyard <girgias@php.net> | 2019-08-22 12:33:46 +0200 |
---|---|---|
committer | George Peter Banyard <girgias@php.net> | 2019-08-22 19:33:37 +0200 |
commit | c0554fdec5a73f34472fdcf082179ae4895c903d (patch) | |
tree | f29e416e9c01d15e7d75d5e3d55904e5f2aee625 /ext/standard/string.c | |
parent | c1fcf2d616d2c54d13be6daa6dc31f23160de636 (diff) | |
download | php-git-c0554fdec5a73f34472fdcf082179ae4895c903d.tar.gz |
Promote warnings to errors in strtr()
Diffstat (limited to 'ext/standard/string.c')
-rw-r--r-- | ext/standard/string.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/standard/string.c b/ext/standard/string.c index c3e9660e23..e8a8fed1ac 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -3292,7 +3292,7 @@ PHPAPI zend_string *php_str_to_str(const char *haystack, size_t length, const ch } /* }}} */ -/* {{{ proto string|false strtr(string str, string from[, string to]) +/* {{{ proto string strtr(string str, string from[, string to]) Translates characters in str using given translation tables */ PHP_FUNCTION(strtr) { @@ -3310,8 +3310,8 @@ PHP_FUNCTION(strtr) ZEND_PARSE_PARAMETERS_END(); if (ac == 2 && Z_TYPE_P(from) != IS_ARRAY) { - php_error_docref(NULL, E_WARNING, "The second argument is not an array"); - RETURN_FALSE; + zend_type_error("The second argument is not an array"); + return; } /* shortcut for empty string */ |