diff --git a/ext/bz2/bz2.c b/ext/bz2/bz2.c index 0e777851a5f..cc7605ab066 100644 --- a/ext/bz2/bz2.c +++ b/ext/bz2/bz2.c @@ -349,7 +349,7 @@ PHP_FUNCTION(bzopen) /* If it's not a resource its a string containing the filename to open */ if (Z_TYPE_P(file) == IS_STRING) { if (Z_STRLEN_P(file) == 0) { - zend_argument_value_error(1, "cannot be empty"); + zend_argument_cannot_be_empty_error(1); RETURN_THROWS(); } diff --git a/ext/dba/dba.c b/ext/dba/dba.c index 6f4f78de7a6..7637b24f8d6 100644 --- a/ext/dba/dba.c +++ b/ext/dba/dba.c @@ -547,15 +547,15 @@ static void php_dba_open(INTERNAL_FUNCTION_PARAMETERS, bool persistent) } if (ZSTR_LEN(path) == 0) { - zend_argument_value_error(1, "cannot be empty"); + zend_argument_cannot_be_empty_error(1); RETURN_THROWS(); } if (ZSTR_LEN(mode) == 0) { - zend_argument_value_error(2, "cannot be empty"); + zend_argument_cannot_be_empty_error(2); RETURN_THROWS(); } if (handler_str && ZSTR_LEN(handler_str) == 0) { - zend_argument_value_error(3, "cannot be empty"); + zend_argument_cannot_be_empty_error(3); RETURN_THROWS(); } // TODO Check Value for permission @@ -640,7 +640,7 @@ static void php_dba_open(INTERNAL_FUNCTION_PARAMETERS, bool persistent) // bool is_file_lock = false; if (ZSTR_LEN(mode) == 0) { - zend_argument_value_error(2, "cannot be empty"); + zend_argument_cannot_be_empty_error(2); efree(resource_key); RETURN_THROWS(); } diff --git a/ext/dom/domimplementation.c b/ext/dom/domimplementation.c index 7997dcfed12..d505e5326b3 100644 --- a/ext/dom/domimplementation.c +++ b/ext/dom/domimplementation.c @@ -64,7 +64,7 @@ PHP_METHOD(DOMImplementation, createDocumentType) } if (name_len == 0) { - zend_argument_value_error(1, "cannot be empty"); + zend_argument_cannot_be_empty_error(1); RETURN_THROWS(); } diff --git a/ext/dom/element.c b/ext/dom/element.c index a1529a0d3bb..1542c23149a 100644 --- a/ext/dom/element.c +++ b/ext/dom/element.c @@ -411,7 +411,7 @@ PHP_METHOD(DOMElement, setAttribute) } if (name_len == 0) { - zend_argument_value_error(1, "cannot be empty"); + zend_argument_cannot_be_empty_error(1); RETURN_THROWS(); } @@ -903,7 +903,7 @@ PHP_METHOD(DOMElement, getAttributeNS) static void dom_set_attribute_ns_legacy(dom_object *intern, xmlNodePtr elemp, char *uri, size_t uri_len, char *name, size_t name_len, const char *value) { if (name_len == 0) { - zend_argument_value_error(2, "cannot be empty"); + zend_argument_cannot_be_empty_error(2); return; } diff --git a/ext/enchant/enchant.c b/ext/enchant/enchant.c index 2c264a23039..faf18b842ed 100644 --- a/ext/enchant/enchant.c +++ b/ext/enchant/enchant.c @@ -447,7 +447,7 @@ PHP_FUNCTION(enchant_broker_request_dict) PHP_ENCHANT_GET_BROKER; if (taglen == 0) { - zend_argument_value_error(2, "cannot be empty"); + zend_argument_cannot_be_empty_error(2); RETURN_THROWS(); } diff --git a/ext/exif/exif.c b/ext/exif/exif.c index 7e9df52af5b..44a193e7c0b 100644 --- a/ext/exif/exif.c +++ b/ext/exif/exif.c @@ -4550,7 +4550,7 @@ PHP_FUNCTION(exif_read_data) } if (!Z_STRLEN_P(stream)) { - zend_argument_value_error(1, "cannot be empty"); + zend_argument_cannot_be_empty_error(1); RETURN_THROWS(); } @@ -4727,7 +4727,7 @@ PHP_FUNCTION(exif_thumbnail) } if (!Z_STRLEN_P(stream)) { - zend_argument_value_error(1, "cannot be empty"); + zend_argument_cannot_be_empty_error(1); RETURN_THROWS(); } diff --git a/ext/fileinfo/fileinfo.c b/ext/fileinfo/fileinfo.c index 8680722ae95..0d802925d89 100644 --- a/ext/fileinfo/fileinfo.c +++ b/ext/fileinfo/fileinfo.c @@ -374,7 +374,7 @@ static void _php_finfo_get_type(INTERNAL_FUNCTION_PARAMETERS, int mode, int mime php_stream_statbuf ssb; if (buffer == NULL || buffer_len == 0) { - zend_argument_value_error(1, "cannot be empty"); + zend_argument_cannot_be_empty_error(1); goto clean; } if (CHECK_NULL_PATH(buffer, buffer_len)) { diff --git a/ext/gd/gd.c b/ext/gd/gd.c index 5af2d4a5152..b03c4700add 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -646,7 +646,7 @@ PHP_FUNCTION(imagesetstyle) num_styles = zend_hash_num_elements(Z_ARRVAL_P(styles)); if (num_styles == 0) { - zend_argument_value_error(2, "cannot be empty"); + zend_argument_cannot_be_empty_error(2); RETURN_THROWS(); } diff --git a/ext/gettext/gettext.c b/ext/gettext/gettext.c index 939619bfb3b..96ee53144ac 100644 --- a/ext/gettext/gettext.c +++ b/ext/gettext/gettext.c @@ -55,7 +55,7 @@ ZEND_GET_MODULE(php_gettext) zend_argument_value_error(_arg_num, "is too long"); \ RETURN_THROWS(); \ } else if (domain_len == 0) { \ - zend_argument_value_error(_arg_num, "cannot be empty"); \ + zend_argument_cannot_be_empty_error(_arg_num); \ RETURN_THROWS(); \ } @@ -191,7 +191,7 @@ PHP_FUNCTION(bindtextdomain) PHP_GETTEXT_DOMAIN_LENGTH_CHECK(1, ZSTR_LEN(domain)) if (!ZSTR_LEN(domain)) { - zend_argument_value_error(1, "cannot be empty"); + zend_argument_cannot_be_empty_error(1); RETURN_THROWS(); } @@ -313,7 +313,7 @@ PHP_FUNCTION(bind_textdomain_codeset) PHP_GETTEXT_DOMAIN_LENGTH_CHECK(1, ZSTR_LEN(domain)) if (!ZSTR_LEN(domain)) { - zend_argument_value_error(1, "cannot be empty"); + zend_argument_cannot_be_empty_error(1); RETURN_THROWS(); } diff --git a/ext/hash/hash.c b/ext/hash/hash.c index 8a1214b3274..d4953aa7ec6 100644 --- a/ext/hash/hash.c +++ b/ext/hash/hash.c @@ -914,7 +914,7 @@ PHP_FUNCTION(hash_hkdf) } if (ZSTR_LEN(ikm) == 0) { - zend_argument_value_error(2, "cannot be empty"); + zend_argument_cannot_be_empty_error(2); RETURN_THROWS(); } diff --git a/ext/intl/idn/idn.c b/ext/intl/idn/idn.c index db8765837c1..3fb7ee5cba1 100644 --- a/ext/intl/idn/idn.c +++ b/ext/intl/idn/idn.c @@ -125,7 +125,7 @@ static void php_intl_idn_handoff(INTERNAL_FUNCTION_PARAMETERS, int mode) ZEND_PARSE_PARAMETERS_END(); if (ZSTR_LEN(domain) == 0) { - zend_argument_value_error(1, "cannot be empty"); + zend_argument_cannot_be_empty_error(1); RETURN_THROWS(); } if (ZSTR_LEN(domain) > INT32_MAX - 1) { diff --git a/ext/intl/resourcebundle/resourcebundle_class.c b/ext/intl/resourcebundle/resourcebundle_class.c index 92475b0ed08..2d344e054e8 100644 --- a/ext/intl/resourcebundle/resourcebundle_class.c +++ b/ext/intl/resourcebundle/resourcebundle_class.c @@ -186,7 +186,7 @@ static zval *resource_bundle_array_fetch( if (offset_str) { if (UNEXPECTED(ZSTR_LEN(offset_str) == 0)) { if (offset_arg_num) { - zend_argument_value_error(offset_arg_num, "cannot be empty"); + zend_argument_cannot_be_empty_error(offset_arg_num); } else { zend_value_error("Offset cannot be empty"); } diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c index e15635ffe62..f1a37dd4dd8 100644 --- a/ext/ldap/ldap.c +++ b/ext/ldap/ldap.c @@ -1501,7 +1501,7 @@ static void php_ldap_do_search(INTERNAL_FUNCTION_PARAMETERS, int scope) nlinks = zend_hash_num_elements(Z_ARRVAL_P(link)); if (nlinks == 0) { - zend_argument_value_error(1, "cannot be empty"); + zend_argument_cannot_be_empty_error(1); ret = 0; goto cleanup; } diff --git a/ext/mysqli/mysqli_api.c b/ext/mysqli/mysqli_api.c index b71888f630a..09fe384938b 100644 --- a/ext/mysqli/mysqli_api.c +++ b/ext/mysqli/mysqli_api.c @@ -139,7 +139,7 @@ PHP_FUNCTION(mysqli_stmt_bind_param) MYSQLI_FETCH_RESOURCE_STMT(stmt, mysql_stmt, MYSQLI_STATUS_VALID); if (!types_len) { - zend_argument_value_error(ERROR_ARG_POS(2), "cannot be empty"); + zend_argument_cannot_be_empty_error(ERROR_ARG_POS(2)); RETURN_THROWS(); } diff --git a/ext/mysqli/mysqli_nonapi.c b/ext/mysqli/mysqli_nonapi.c index 425f543d630..b6390db653a 100644 --- a/ext/mysqli/mysqli_nonapi.c +++ b/ext/mysqli/mysqli_nonapi.c @@ -572,7 +572,7 @@ PHP_FUNCTION(mysqli_query) } if (!query_len) { - zend_argument_value_error(ERROR_ARG_POS(2), "cannot be empty"); + zend_argument_cannot_be_empty_error(ERROR_ARG_POS(2)); RETURN_THROWS(); } if ((resultmode & ~MYSQLI_ASYNC) != MYSQLI_USE_RESULT && @@ -1013,7 +1013,7 @@ PHP_FUNCTION(mysqli_begin_transaction) RETURN_THROWS(); } if (name && !name_len) { - zend_argument_value_error(ERROR_ARG_POS(3), "cannot be empty"); + zend_argument_cannot_be_empty_error(ERROR_ARG_POS(3)); RETURN_THROWS(); } @@ -1037,7 +1037,7 @@ PHP_FUNCTION(mysqli_savepoint) } MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); if (name_len == 0) { - zend_argument_value_error(ERROR_ARG_POS(2), "cannot be empty"); + zend_argument_cannot_be_empty_error(ERROR_ARG_POS(2)); RETURN_THROWS(); } @@ -1061,7 +1061,7 @@ PHP_FUNCTION(mysqli_release_savepoint) } MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); if (name_len == 0) { - zend_argument_value_error(ERROR_ARG_POS(2), "cannot be empty"); + zend_argument_cannot_be_empty_error(ERROR_ARG_POS(2)); RETURN_THROWS(); } if (FAIL == mysqlnd_release_savepoint(mysql->mysql, name)) { diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c index 4c16279d818..7be102d1fb2 100644 --- a/ext/openssl/openssl.c +++ b/ext/openssl/openssl.c @@ -7243,7 +7243,7 @@ PHP_FUNCTION(openssl_seal) pubkeysht = Z_ARRVAL_P(pubkeys); nkeys = pubkeysht ? zend_hash_num_elements(pubkeysht) : 0; if (!nkeys) { - zend_argument_value_error(4, "cannot be empty"); + zend_argument_cannot_be_empty_error(4); RETURN_THROWS(); } @@ -8017,7 +8017,7 @@ PHP_FUNCTION(openssl_decrypt) } if (!method_len) { - zend_argument_value_error(2, "cannot be empty"); + zend_argument_cannot_be_empty_error(2); RETURN_THROWS(); } @@ -8059,7 +8059,7 @@ PHP_FUNCTION(openssl_cipher_iv_length) } if (ZSTR_LEN(method) == 0) { - zend_argument_value_error(1, "cannot be empty"); + zend_argument_cannot_be_empty_error(1); RETURN_THROWS(); } @@ -8088,7 +8088,7 @@ PHP_FUNCTION(openssl_cipher_key_length) } if (ZSTR_LEN(method) == 0) { - zend_argument_value_error(1, "cannot be empty"); + zend_argument_cannot_be_empty_error(1); RETURN_THROWS(); } diff --git a/ext/pcntl/pcntl.c b/ext/pcntl/pcntl.c index cf66057fc8f..81c076bc282 100644 --- a/ext/pcntl/pcntl.c +++ b/ext/pcntl/pcntl.c @@ -860,7 +860,7 @@ static bool php_pcntl_set_user_signal_infos( bool allow_empty_signal_array ) { if (!allow_empty_signal_array && zend_hash_num_elements(user_signals) == 0) { - zend_argument_value_error(arg_num, "cannot be empty"); + zend_argument_cannot_be_empty_error(arg_num); return false; } diff --git a/ext/pdo/pdo_dbh.c b/ext/pdo/pdo_dbh.c index c67b0eb24e5..0be81c463d4 100644 --- a/ext/pdo/pdo_dbh.c +++ b/ext/pdo/pdo_dbh.c @@ -563,7 +563,7 @@ PHP_METHOD(PDO, prepare) PDO_CONSTRUCT_CHECK; if (ZSTR_LEN(statement) == 0) { - zend_argument_value_error(1, "cannot be empty"); + zend_argument_cannot_be_empty_error(1); RETURN_THROWS(); } @@ -1030,7 +1030,7 @@ PHP_METHOD(PDO, exec) ZEND_PARSE_PARAMETERS_END(); if (ZSTR_LEN(statement) == 0) { - zend_argument_value_error(1, "cannot be empty"); + zend_argument_cannot_be_empty_error(1); RETURN_THROWS(); } @@ -1166,7 +1166,7 @@ PHP_METHOD(PDO, query) PDO_CONSTRUCT_CHECK; if (ZSTR_LEN(statement) == 0) { - zend_argument_value_error(1, "cannot be empty"); + zend_argument_cannot_be_empty_error(1); RETURN_THROWS(); } diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c index 4674e901da5..751781e76eb 100644 --- a/ext/pdo/pdo_stmt.c +++ b/ext/pdo/pdo_stmt.c @@ -1423,7 +1423,7 @@ static void register_bound_param(INTERNAL_FUNCTION_PARAMETERS, int is_param) /* if (param.name) { if (ZSTR_LEN(param.name) == 0) { - zend_argument_value_error(1, "cannot be empty"); + zend_argument_cannot_be_empty_error(1); RETURN_THROWS(); } param.paramno = -1; @@ -1471,7 +1471,7 @@ PHP_METHOD(PDOStatement, bindValue) if (param.name) { if (ZSTR_LEN(param.name) == 0) { - zend_argument_value_error(1, "cannot be empty"); + zend_argument_cannot_be_empty_error(1); RETURN_THROWS(); } param.paramno = -1; diff --git a/ext/pdo_pgsql/pgsql_driver.c b/ext/pdo_pgsql/pgsql_driver.c index c418e6f5ba9..fbc30a3c09a 100644 --- a/ext/pdo_pgsql/pgsql_driver.c +++ b/ext/pdo_pgsql/pgsql_driver.c @@ -627,7 +627,7 @@ void pgsqlCopyFromArray_internal(INTERNAL_FUNCTION_PARAMETERS) } if (!zend_hash_num_elements(Z_ARRVAL_P(pg_rows))) { - zend_argument_value_error(2, "cannot be empty"); + zend_argument_cannot_be_empty_error(2); RETURN_THROWS(); } diff --git a/ext/pdo_sqlite/pdo_sqlite.c b/ext/pdo_sqlite/pdo_sqlite.c index e2c686ed691..4b0dc8f99e2 100644 --- a/ext/pdo_sqlite/pdo_sqlite.c +++ b/ext/pdo_sqlite/pdo_sqlite.c @@ -82,7 +82,7 @@ PHP_METHOD(Pdo_Sqlite, loadExtension) } if (extension_len == 0) { - zend_argument_value_error(1, "cannot be empty"); + zend_argument_cannot_be_empty_error(1); RETURN_THROWS(); } diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index f74667b214f..4d3c548025d 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -4613,7 +4613,7 @@ PHP_FUNCTION(pg_meta_data) /* php_pgsql_meta_data() asserts that table_name is not empty */ if (ZSTR_LEN(table_name) == 0) { - zend_argument_value_error(2, "cannot be empty"); + zend_argument_cannot_be_empty_error(2); RETURN_THROWS(); } @@ -5405,7 +5405,7 @@ PHP_FUNCTION(pg_convert) ZEND_PARSE_PARAMETERS_END(); if (ZSTR_LEN(table_name) == 0) { - zend_argument_value_error(2, "cannot be empty"); + zend_argument_cannot_be_empty_error(2); RETURN_THROWS(); } @@ -5618,7 +5618,7 @@ PHP_FUNCTION(pg_insert) ZEND_PARSE_PARAMETERS_END(); if (ZSTR_LEN(table) == 0) { - zend_argument_value_error(2, "cannot be empty"); + zend_argument_cannot_be_empty_error(2); RETURN_THROWS(); } @@ -5840,7 +5840,7 @@ PHP_FUNCTION(pg_update) ZEND_PARSE_PARAMETERS_END(); if (ZSTR_LEN(table) == 0) { - zend_argument_value_error(2, "cannot be empty"); + zend_argument_cannot_be_empty_error(2); RETURN_THROWS(); } @@ -5939,7 +5939,7 @@ PHP_FUNCTION(pg_delete) ZEND_PARSE_PARAMETERS_END(); if (ZSTR_LEN(table) == 0) { - zend_argument_value_error(2, "cannot be empty"); + zend_argument_cannot_be_empty_error(2); RETURN_THROWS(); } @@ -6095,7 +6095,7 @@ PHP_FUNCTION(pg_select) ZEND_PARSE_PARAMETERS_END(); if (ZSTR_LEN(table) == 0) { - zend_argument_value_error(2, "cannot be empty"); + zend_argument_cannot_be_empty_error(2); RETURN_THROWS(); } @@ -6143,13 +6143,13 @@ PHP_FUNCTION(pg_change_password) ZEND_PARSE_PARAMETERS_END(); if (ZSTR_LEN(user) == 0) { - zend_argument_value_error(2, "cannot be empty"); + zend_argument_cannot_be_empty_error(2); RETURN_THROWS(); } /* it is technically possible, but better to disallow it */ if (ZSTR_LEN(passwd) == 0) { - zend_argument_value_error(3, "cannot be empty"); + zend_argument_cannot_be_empty_error(3); RETURN_THROWS(); } diff --git a/ext/posix/posix.c b/ext/posix/posix.c index 6711492e3d2..bea433cd5f2 100644 --- a/ext/posix/posix.c +++ b/ext/posix/posix.c @@ -746,7 +746,7 @@ PHP_FUNCTION(posix_eaccess) path = expand_filepath(filename, NULL); if (!path) { - zend_argument_value_error(1, "cannot be empty"); + zend_argument_cannot_be_empty_error(1); RETURN_THROWS(); } @@ -1285,7 +1285,7 @@ PHP_FUNCTION(posix_pathconf) ZEND_PARSE_PARAMETERS_END(); if (path_len == 0) { - zend_argument_value_error(1, "cannot be empty"); + zend_argument_cannot_be_empty_error(1); RETURN_THROWS(); } else if (php_check_open_basedir(path)) { php_error_docref(NULL, E_WARNING, "Invalid path supplied: %s", path); diff --git a/ext/random/randomizer.c b/ext/random/randomizer.c index 1109b497c13..3768e1b7e16 100644 --- a/ext/random/randomizer.c +++ b/ext/random/randomizer.c @@ -434,7 +434,7 @@ PHP_METHOD(Random_Randomizer, getBytesFromString) const size_t max_offset = source_length - 1; if (source_length < 1) { - zend_argument_value_error(1, "cannot be empty"); + zend_argument_cannot_be_empty_error(1); RETURN_THROWS(); } diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c index 8a12d430d47..74350167a52 100644 --- a/ext/simplexml/simplexml.c +++ b/ext/simplexml/simplexml.c @@ -1667,7 +1667,7 @@ PHP_METHOD(SimpleXMLElement, addChild) } if (qname_len == 0) { - zend_argument_value_error(1, "cannot be empty"); + zend_argument_cannot_be_empty_error(1); RETURN_THROWS(); } @@ -1734,7 +1734,7 @@ PHP_METHOD(SimpleXMLElement, addAttribute) } if (qname_len == 0) { - zend_argument_value_error(1, "cannot be empty"); + zend_argument_cannot_be_empty_error(1); RETURN_THROWS(); } diff --git a/ext/soap/soap.c b/ext/soap/soap.c index b152a1a187a..fc7e5eb1853 100644 --- a/ext/soap/soap.c +++ b/ext/soap/soap.c @@ -571,7 +571,7 @@ PHP_METHOD(SoapParam, __construct) } if (ZSTR_LEN(name) == 0) { - zend_argument_value_error(2, "cannot be empty"); + zend_argument_cannot_be_empty_error(2); RETURN_THROWS(); } @@ -602,11 +602,11 @@ PHP_METHOD(SoapHeader, __construct) ZEND_PARSE_PARAMETERS_END(); if (ZSTR_LEN(ns) == 0) { - zend_argument_value_error(1, "cannot be empty"); + zend_argument_cannot_be_empty_error(1); RETURN_THROWS(); } if (ZSTR_LEN(name) == 0) { - zend_argument_value_error(2, "cannot be empty"); + zend_argument_cannot_be_empty_error(2); RETURN_THROWS(); } diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c index 989f84f1fdd..c59ec7f84a4 100644 --- a/ext/spl/spl_directory.c +++ b/ext/spl/spl_directory.c @@ -696,7 +696,7 @@ static void spl_filesystem_object_construct(INTERNAL_FUNCTION_PARAMETERS, zend_l } if (ZSTR_LEN(path) == 0) { - zend_argument_value_error(1, "cannot be empty"); + zend_argument_cannot_be_empty_error(1); RETURN_THROWS(); } diff --git a/ext/sqlite3/sqlite3.c b/ext/sqlite3/sqlite3.c index 4ef8cb3101a..6aea72a6fa7 100644 --- a/ext/sqlite3/sqlite3.c +++ b/ext/sqlite3/sqlite3.c @@ -421,7 +421,7 @@ PHP_METHOD(SQLite3, loadExtension) } if (extension_len == 0) { - zend_argument_value_error(1, "cannot be empty"); + zend_argument_cannot_be_empty_error(1); RETURN_THROWS(); } diff --git a/ext/standard/array.c b/ext/standard/array.c index 068057e70a9..b38b5fe6a6a 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -6211,7 +6211,7 @@ PHPAPI bool php_array_pick_keys(php_random_algo_with_state engine, zval *input, if (num_avail == 0) { if (!silent) { - zend_argument_value_error(1, "cannot be empty"); + zend_argument_cannot_be_empty_error(1); } return false; } diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 7b3494303ca..a6226ae6cd9 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -2500,7 +2500,7 @@ PHP_FUNCTION(parse_ini_file) ZEND_PARSE_PARAMETERS_END(); if (ZSTR_LEN(filename) == 0) { - zend_argument_value_error(1, "cannot be empty"); + zend_argument_cannot_be_empty_error(1); RETURN_THROWS(); } diff --git a/ext/standard/dir.c b/ext/standard/dir.c index edb62c368fc..bf0c5666781 100644 --- a/ext/standard/dir.c +++ b/ext/standard/dir.c @@ -467,7 +467,7 @@ PHP_FUNCTION(scandir) ZEND_PARSE_PARAMETERS_END(); if (dirn_len < 1) { - zend_argument_value_error(1, "cannot be empty"); + zend_argument_cannot_be_empty_error(1); RETURN_THROWS(); } diff --git a/ext/standard/dns.c b/ext/standard/dns.c index 41e90e3e924..3f9b20cfe54 100644 --- a/ext/standard/dns.c +++ b/ext/standard/dns.c @@ -388,7 +388,7 @@ PHP_FUNCTION(dns_check_record) ZEND_PARSE_PARAMETERS_END(); if (hostname_len == 0) { - zend_argument_value_error(1, "cannot be empty"); + zend_argument_cannot_be_empty_error(1); RETURN_THROWS(); } diff --git a/ext/standard/dns_win32.c b/ext/standard/dns_win32.c index 2aeedb133e0..5bc41880de5 100644 --- a/ext/standard/dns_win32.c +++ b/ext/standard/dns_win32.c @@ -108,7 +108,7 @@ PHP_FUNCTION(dns_check_record) } if (hostname_len == 0) { - zend_argument_value_error(1, "cannot be empty"); + zend_argument_cannot_be_empty_error(1); RETURN_THROWS(); } diff --git a/ext/standard/exec.c b/ext/standard/exec.c index 5b3ba60e5fd..7b1d2c8c8f9 100644 --- a/ext/standard/exec.c +++ b/ext/standard/exec.c @@ -218,7 +218,7 @@ static void php_exec_ex(INTERNAL_FUNCTION_PARAMETERS, int mode) /* {{{ */ ZEND_PARSE_PARAMETERS_END(); if (!cmd_len) { - zend_argument_value_error(1, "cannot be empty"); + zend_argument_cannot_be_empty_error(1); RETURN_THROWS(); } if (strlen(cmd) != cmd_len) { @@ -518,7 +518,7 @@ PHP_FUNCTION(shell_exec) ZEND_PARSE_PARAMETERS_END(); if (!command_len) { - zend_argument_value_error(1, "cannot be empty"); + zend_argument_cannot_be_empty_error(1); RETURN_THROWS(); } if (strlen(command) != command_len) { diff --git a/ext/standard/ftok.c b/ext/standard/ftok.c index 1a046b3de69..338fb00ee51 100644 --- a/ext/standard/ftok.c +++ b/ext/standard/ftok.c @@ -40,7 +40,7 @@ PHP_FUNCTION(ftok) ZEND_PARSE_PARAMETERS_END(); if (pathname_len == 0){ - zend_argument_value_error(1, "cannot be empty"); + zend_argument_cannot_be_empty_error(1); RETURN_THROWS(); } diff --git a/ext/standard/head.c b/ext/standard/head.c index 0acd34c83c4..ad02faf0255 100644 --- a/ext/standard/head.c +++ b/ext/standard/head.c @@ -87,7 +87,7 @@ PHPAPI zend_result php_setcookie(zend_string *name, zend_string *value, time_t e smart_str buf = {0}; if (!ZSTR_LEN(name)) { - zend_argument_value_error(1, "cannot be empty"); + zend_argument_cannot_be_empty_error(1); return FAILURE; } if (strpbrk(ZSTR_VAL(name), "=,; \t\r\n\013\014") != NULL) { /* man isspace for \013 and \014 */ diff --git a/ext/standard/string.c b/ext/standard/string.c index 23c34df958b..66efa04862b 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -724,7 +724,7 @@ PHP_FUNCTION(wordwrap) } if (breakchar_len == 0) { - zend_argument_value_error(3, "cannot be empty"); + zend_argument_cannot_be_empty_error(3); RETURN_THROWS(); } @@ -930,7 +930,7 @@ PHP_FUNCTION(explode) ZEND_PARSE_PARAMETERS_END(); if (ZSTR_LEN(delim) == 0) { - zend_argument_value_error(1, "cannot be empty"); + zend_argument_cannot_be_empty_error(1); RETURN_THROWS(); } @@ -1277,7 +1277,7 @@ PHP_FUNCTION(str_increment) ZEND_PARSE_PARAMETERS_END(); if (ZSTR_LEN(str) == 0) { - zend_argument_value_error(1, "cannot be empty"); + zend_argument_cannot_be_empty_error(1); RETURN_THROWS(); } if (!zend_string_only_has_ascii_alphanumeric(str)) { @@ -1333,7 +1333,7 @@ PHP_FUNCTION(str_decrement) ZEND_PARSE_PARAMETERS_END(); if (ZSTR_LEN(str) == 0) { - zend_argument_value_error(1, "cannot be empty"); + zend_argument_cannot_be_empty_error(1); RETURN_THROWS(); } if (!zend_string_only_has_ascii_alphanumeric(str)) { @@ -5727,7 +5727,7 @@ PHP_FUNCTION(substr_count) ZEND_PARSE_PARAMETERS_END(); if (needle_len == 0) { - zend_argument_value_error(2, "cannot be empty"); + zend_argument_cannot_be_empty_error(2); RETURN_THROWS(); } diff --git a/ext/xmlreader/php_xmlreader.c b/ext/xmlreader/php_xmlreader.c index b5a4badd138..178053f8f60 100644 --- a/ext/xmlreader/php_xmlreader.c +++ b/ext/xmlreader/php_xmlreader.c @@ -382,7 +382,7 @@ static void php_xmlreader_string_arg(INTERNAL_FUNCTION_PARAMETERS, xmlreader_rea } if (!name_len) { - zend_argument_value_error(1, "cannot be empty"); + zend_argument_cannot_be_empty_error(1); RETURN_THROWS(); } @@ -467,7 +467,7 @@ static void php_xmlreader_set_relaxng_schema(INTERNAL_FUNCTION_PARAMETERS, int t } if (source != NULL && !source_len) { - zend_argument_value_error(1, "cannot be empty"); + zend_argument_cannot_be_empty_error(1); RETURN_THROWS(); } @@ -574,12 +574,12 @@ PHP_METHOD(XMLReader, getAttributeNs) } if (name_len == 0) { - zend_argument_value_error(1, "cannot be empty"); + zend_argument_cannot_be_empty_error(1); RETURN_THROWS(); } if (ns_uri_len == 0) { - zend_argument_value_error(2, "cannot be empty"); + zend_argument_cannot_be_empty_error(2); RETURN_THROWS(); } @@ -655,7 +655,7 @@ PHP_METHOD(XMLReader, moveToAttribute) } if (name_len == 0) { - zend_argument_value_error(1, "cannot be empty"); + zend_argument_cannot_be_empty_error(1); RETURN_THROWS(); } @@ -715,12 +715,12 @@ PHP_METHOD(XMLReader, moveToAttributeNs) } if (name_len == 0) { - zend_argument_value_error(1, "cannot be empty"); + zend_argument_cannot_be_empty_error(1); RETURN_THROWS(); } if (ns_uri_len == 0) { - zend_argument_value_error(2, "cannot be empty"); + zend_argument_cannot_be_empty_error(2); RETURN_THROWS(); } @@ -860,7 +860,7 @@ static void xml_reader_from_uri(INTERNAL_FUNCTION_PARAMETERS, zend_class_entry * } if (!source_len) { - zend_argument_value_error(1, "cannot be empty"); + zend_argument_cannot_be_empty_error(1); RETURN_THROWS(); } @@ -1027,7 +1027,7 @@ PHP_METHOD(XMLReader, setSchema) } if (source != NULL && !source_len) { - zend_argument_value_error(1, "cannot be empty"); + zend_argument_cannot_be_empty_error(1); RETURN_THROWS(); } @@ -1132,7 +1132,7 @@ static void xml_reader_from_string(INTERNAL_FUNCTION_PARAMETERS, zend_class_entr } if (!source_len) { - zend_argument_value_error(1, "cannot be empty"); + zend_argument_cannot_be_empty_error(1); RETURN_THROWS(); } diff --git a/ext/xmlwriter/php_xmlwriter.c b/ext/xmlwriter/php_xmlwriter.c index 6724f4fbfbf..0e7f3d29153 100644 --- a/ext/xmlwriter/php_xmlwriter.c +++ b/ext/xmlwriter/php_xmlwriter.c @@ -817,7 +817,7 @@ PHP_FUNCTION(xmlwriter_open_uri) } if (source_len == 0) { - zend_argument_value_error(1, "cannot be empty"); + zend_argument_cannot_be_empty_error(1); RETURN_THROWS(); } @@ -858,7 +858,7 @@ PHP_METHOD(XMLWriter, toUri) ZEND_PARSE_PARAMETERS_END(); if (source_len == 0) { - zend_argument_value_error(1, "cannot be empty"); + zend_argument_cannot_be_empty_error(1); RETURN_THROWS(); } diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c index 342d6aabe72..be3c6d4c581 100644 --- a/ext/zip/php_zip.c +++ b/ext/zip/php_zip.c @@ -56,7 +56,7 @@ static int le_zip_entry; This is always used for the first argument*/ #define PHP_ZIP_STAT_PATH(za, path, path_len, flags, sb) \ if (path_len == 0) { \ - zend_argument_value_error(1, "cannot be empty"); \ + zend_argument_cannot_be_empty_error(1); \ RETURN_THROWS(); \ } \ if (zip_stat(za, path, flags, &sb) != 0) { \ @@ -1184,7 +1184,7 @@ PHP_FUNCTION(zip_open) } if (ZSTR_LEN(filename) == 0) { - zend_argument_value_error(1, "cannot be empty"); + zend_argument_cannot_be_empty_error(1); RETURN_THROWS(); } @@ -1466,7 +1466,7 @@ PHP_METHOD(ZipArchive, open) ze_obj = Z_ZIP_P(self); if (ZSTR_LEN(filename) == 0) { - zend_argument_value_error(1, "cannot be empty"); + zend_argument_cannot_be_empty_error(1); RETURN_THROWS(); } @@ -1753,7 +1753,7 @@ static void php_zip_add_from_pattern(INTERNAL_FUNCTION_PARAMETERS, int type) /* } if (ZSTR_LEN(pattern) == 0) { - zend_argument_value_error(1, "cannot be empty"); + zend_argument_cannot_be_empty_error(1); RETURN_THROWS(); } if (options && zend_hash_num_elements(options) > 0 && (php_zip_parse_options(options, &opts) < 0)) { @@ -1871,7 +1871,7 @@ PHP_METHOD(ZipArchive, addFile) } if (ZSTR_LEN(filename) == 0) { - zend_argument_value_error(1, "cannot be empty"); + zend_argument_cannot_be_empty_error(1); RETURN_THROWS(); } @@ -1904,7 +1904,7 @@ PHP_METHOD(ZipArchive, replaceFile) } if (ZSTR_LEN(filename) == 0) { - zend_argument_value_error(1, "cannot be empty"); + zend_argument_cannot_be_empty_error(1); RETURN_THROWS(); } @@ -2168,7 +2168,7 @@ PHP_METHOD(ZipArchive, setCommentName) } if (name_len == 0) { - zend_argument_value_error(1, "cannot be empty"); + zend_argument_cannot_be_empty_error(1); RETURN_THROWS(); } @@ -2235,7 +2235,7 @@ PHP_METHOD(ZipArchive, setExternalAttributesName) ZIP_FROM_OBJECT(intern, self); if (name_len == 0) { - zend_argument_value_error(1, "cannot be empty"); + zend_argument_cannot_be_empty_error(1); RETURN_THROWS(); } @@ -2296,7 +2296,7 @@ PHP_METHOD(ZipArchive, getExternalAttributesName) ZIP_FROM_OBJECT(intern, self); if (name_len == 0) { - zend_argument_value_error(1, "cannot be empty"); + zend_argument_cannot_be_empty_error(1); RETURN_THROWS(); } @@ -2363,7 +2363,7 @@ PHP_METHOD(ZipArchive, setEncryptionName) ZIP_FROM_OBJECT(intern, self); if (name_len == 0) { - zend_argument_value_error(1, "cannot be empty"); + zend_argument_cannot_be_empty_error(1); RETURN_THROWS(); } @@ -2424,7 +2424,7 @@ PHP_METHOD(ZipArchive, getCommentName) ZIP_FROM_OBJECT(intern, self); if (name_len == 0) { - zend_argument_value_error(1, "cannot be empty"); + zend_argument_cannot_be_empty_error(1); RETURN_THROWS(); } @@ -2480,7 +2480,7 @@ PHP_METHOD(ZipArchive, setCompressionName) ZIP_FROM_OBJECT(intern, this); if (name_len == 0) { - zend_argument_value_error(1, "cannot be empty"); + zend_argument_cannot_be_empty_error(1); RETURN_THROWS(); } @@ -2540,7 +2540,7 @@ PHP_METHOD(ZipArchive, setMtimeName) ZIP_FROM_OBJECT(intern, this); if (name_len == 0) { - zend_argument_value_error(1, "cannot be empty"); + zend_argument_cannot_be_empty_error(1); RETURN_THROWS(); } @@ -2654,7 +2654,7 @@ PHP_METHOD(ZipArchive, renameIndex) ZIP_FROM_OBJECT(intern, self); if (new_name_len == 0) { - zend_argument_value_error(2, "cannot be empty"); + zend_argument_cannot_be_empty_error(2); RETURN_THROWS(); } @@ -2682,7 +2682,7 @@ PHP_METHOD(ZipArchive, renameName) ZIP_FROM_OBJECT(intern, self); if (new_name_len == 0) { - zend_argument_value_error(2, "cannot be empty"); + zend_argument_cannot_be_empty_error(2); RETURN_THROWS(); }