mirror of
https://github.com/php/php-src.git
synced 2024-11-24 10:24:11 +08:00
Consolidate the usage of "either" and "one of" in error messages
Closes GH-6173
This commit is contained in:
parent
c0f8cc1904
commit
e950ca13ea
@ -1284,7 +1284,7 @@ PHP_FUNCTION(ftp_set_option)
|
||||
RETURN_TRUE;
|
||||
break;
|
||||
default:
|
||||
zend_argument_value_error(2, "must be either FTP_TIMEOUT_SEC, FTP_AUTOSEEK, or FTP_USEPASVADDRESS");
|
||||
zend_argument_value_error(2, "must be one of FTP_TIMEOUT_SEC, FTP_AUTOSEEK, or FTP_USEPASVADDRESS");
|
||||
RETURN_THROWS();
|
||||
break;
|
||||
}
|
||||
@ -1317,7 +1317,7 @@ PHP_FUNCTION(ftp_get_option)
|
||||
RETURN_BOOL(ftp->usepasvaddress);
|
||||
break;
|
||||
default:
|
||||
zend_argument_value_error(2, "must be either FTP_TIMEOUT_SEC, FTP_AUTOSEEK, or FTP_USEPASVADDRESS");
|
||||
zend_argument_value_error(2, "must be one of FTP_TIMEOUT_SEC, FTP_AUTOSEEK, or FTP_USEPASVADDRESS");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
}
|
||||
|
@ -28,4 +28,4 @@ try {
|
||||
int(%d)
|
||||
bool(true)
|
||||
bool(true)
|
||||
ftp_get_option(): Argument #2 ($option) must be either FTP_TIMEOUT_SEC, FTP_AUTOSEEK, or FTP_USEPASVADDRESS
|
||||
ftp_get_option(): Argument #2 ($option) must be one of FTP_TIMEOUT_SEC, FTP_AUTOSEEK, or FTP_USEPASVADDRESS
|
||||
|
@ -49,4 +49,4 @@ ftp_set_option(): Argument #3 ($value) must be greater than 0 for the FTP_TIMEOU
|
||||
ftp_set_option(): Argument #3 ($value) must be of type int for the FTP_TIMEOUT_SEC option, string given
|
||||
ftp_set_option(): Argument #3 ($value) must be of type bool for the FTP_USEPASVADDRESS option, array given
|
||||
ftp_set_option(): Argument #3 ($value) must be of type bool for the FTP_AUTOSEEK option, string given
|
||||
ftp_set_option(): Argument #2 ($option) must be either FTP_TIMEOUT_SEC, FTP_AUTOSEEK, or FTP_USEPASVADDRESS
|
||||
ftp_set_option(): Argument #2 ($option) must be one of FTP_TIMEOUT_SEC, FTP_AUTOSEEK, or FTP_USEPASVADDRESS
|
||||
|
@ -3521,7 +3521,7 @@ PHP_FUNCTION(imageflip)
|
||||
break;
|
||||
|
||||
default:
|
||||
zend_argument_value_error(2, "must be either IMG_FLIP_VERTICAL, IMG_FLIP_HORIZONTAL, or IMG_FLIP_BOTH");
|
||||
zend_argument_value_error(2, "must be one of IMG_FLIP_VERTICAL, IMG_FLIP_HORIZONTAL, or IMG_FLIP_BOTH");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
|
@ -778,7 +778,7 @@ PHP_FUNCTION(grapheme_extract)
|
||||
}
|
||||
|
||||
if ( extract_type < GRAPHEME_EXTRACT_TYPE_MIN || extract_type > GRAPHEME_EXTRACT_TYPE_MAX ) {
|
||||
zend_argument_value_error(3, "must be either GRAPHEME_EXTR_COUNT, GRAPHEME_EXTR_MAXBYTES, or GRAPHEME_EXTR_MAXCHARS");
|
||||
zend_argument_value_error(3, "must be one of GRAPHEME_EXTR_COUNT, GRAPHEME_EXTR_MAXBYTES, or GRAPHEME_EXTR_MAXCHARS");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
|
@ -14,4 +14,4 @@ try {
|
||||
}
|
||||
?>
|
||||
--EXPECT--
|
||||
grapheme_extract(): Argument #3 ($extract_type) must be either GRAPHEME_EXTR_COUNT, GRAPHEME_EXTR_MAXBYTES, or GRAPHEME_EXTR_MAXCHARS
|
||||
grapheme_extract(): Argument #3 ($extract_type) must be one of GRAPHEME_EXTR_COUNT, GRAPHEME_EXTR_MAXBYTES, or GRAPHEME_EXTR_MAXCHARS
|
||||
|
@ -2655,7 +2655,7 @@ PHP_FUNCTION(ldap_modify_batch)
|
||||
modtype != LDAP_MODIFY_BATCH_REPLACE &&
|
||||
modtype != LDAP_MODIFY_BATCH_REMOVE_ALL
|
||||
) {
|
||||
zend_value_error("%s(): Option \"" LDAP_MODIFY_BATCH_MODTYPE "\" must be one of LDAP_MODIFY_BATCH_ADD, LDAP_MODIFY_BATCH_REMOVE, LDAP_MODIFY_BATCH_REPLACE, or LDAP_MODIFY_BATCH_REMOVE_ALL", get_active_function_name());
|
||||
zend_value_error("%s(): Option \"" LDAP_MODIFY_BATCH_MODTYPE "\" must be one of the LDAP_MODIFY_BATCH_* constants", get_active_function_name());
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
|
@ -1307,7 +1307,7 @@ PHP_FUNCTION(mb_http_input)
|
||||
return;
|
||||
default:
|
||||
zend_argument_value_error(1,
|
||||
"must be one of \"G\", \"P\", \"C\", \"S\", \"I\" or \"L\"");
|
||||
"must be one of \"G\", \"P\", \"C\", \"S\", \"I\", or \"L\"");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
}
|
||||
@ -2596,8 +2596,7 @@ PHP_FUNCTION(mb_convert_case)
|
||||
}
|
||||
|
||||
if (case_mode < 0 || case_mode > PHP_UNICODE_CASE_MODE_MAX) {
|
||||
zend_argument_value_error(2, "must be one of MB_CASE_UPPER, MB_CASE_LOWER, MB_CASE_TITLE, MB_CASE_FOLD,"
|
||||
" MB_CASE_UPPER_SIMPLE, MB_CASE_LOWER_SIMPLE, MB_CASE_TITLE_SIMPLE, or MB_CASE_FOLD_SIMPLE");
|
||||
zend_argument_value_error(2, "must be one of the MB_CASE_* constants");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
|
@ -31,4 +31,4 @@ string(13) "FOO BAR SPAß"
|
||||
string(13) "foo bar spaß"
|
||||
string(13) "Foo Bar Spaß"
|
||||
string(13) "foo bar spaß"
|
||||
mb_convert_case(): Argument #2 ($mode) must be one of MB_CASE_UPPER, MB_CASE_LOWER, MB_CASE_TITLE, MB_CASE_FOLD, MB_CASE_UPPER_SIMPLE, MB_CASE_LOWER_SIMPLE, MB_CASE_TITLE_SIMPLE, or MB_CASE_FOLD_SIMPLE
|
||||
mb_convert_case(): Argument #2 ($mode) must be one of the MB_CASE_* constants
|
||||
|
@ -43,4 +43,4 @@ array(1) {
|
||||
string(10) "ISO-8859-1"
|
||||
}
|
||||
string(10) "ISO-8859-1"
|
||||
mb_http_input(): Argument #1 ($type) must be one of "G", "P", "C", "S", "I" or "L"
|
||||
mb_http_input(): Argument #1 ($type) must be one of "G", "P", "C", "S", "I", or "L"
|
||||
|
@ -2270,8 +2270,7 @@ PHP_FUNCTION(mysqli_stmt_attr_set)
|
||||
case CURSOR_TYPE_SCROLLABLE:
|
||||
break;
|
||||
default:
|
||||
zend_argument_value_error(ERROR_ARG_POS(3), "must be one of MYSQLI_CURSOR_TYPE_NO_CURSOR, "
|
||||
"MYSQLI_CURSOR_TYPE_READ_ONLY, MYSQLI_CURSOR_TYPE_FOR_UPDATE, or MYSQLI_CURSOR_TYPE_SCROLLABLE "
|
||||
zend_argument_value_error(ERROR_ARG_POS(3), "must be one of the MYSQLI_CURSOR_TYPE_* constants "
|
||||
"for attribute MYSQLI_STMT_ATTR_CURSOR_TYPE");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
@ -639,7 +639,7 @@ PHP_FUNCTION(mysqli_query)
|
||||
if ((resultmode & ~MYSQLI_ASYNC) != MYSQLI_USE_RESULT &&
|
||||
MYSQLI_STORE_RESULT != (resultmode & ~(MYSQLI_ASYNC | MYSQLI_STORE_RESULT_COPY_DATA))
|
||||
) {
|
||||
zend_argument_value_error(ERROR_ARG_POS(3), "must be either MYSQLI_USE_RESULT, or MYSQLI_STORE_RESULT"
|
||||
zend_argument_value_error(ERROR_ARG_POS(3), "must be either MYSQLI_USE_RESULT or MYSQLI_STORE_RESULT"
|
||||
#ifdef MYSQLI_USE_MYSQLND
|
||||
" with MYSQLI_ASYNC as an optional bitmask flag"
|
||||
#endif
|
||||
|
@ -125,6 +125,6 @@ array(1) {
|
||||
string(1) "a"
|
||||
}
|
||||
string(1) "a"
|
||||
mysqli_query(): Argument #3 ($result_mode) must be either MYSQLI_USE_RESULT, or MYSQLI_STORE_RESULT%S
|
||||
mysqli_query(): Argument #3 ($result_mode) must be either MYSQLI_USE_RESULT or MYSQLI_STORE_RESULT%S
|
||||
mysqli object is already closed
|
||||
done!
|
||||
|
@ -245,6 +245,6 @@ Error: mysqli_stmt object is not fully initialized
|
||||
mysqli_stmt_attr_set(): Argument #2 ($attr) must be one of MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH, MYSQLI_STMT_ATTR_PREFETCH_ROWS, or STMT_ATTR_CURSOR_TYPE
|
||||
mysqli_stmt::attr_set(): Argument #2 ($mode_in) must be 0 or 1 for attribute MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH
|
||||
bool(true)
|
||||
mysqli_stmt::attr_set(): Argument #2 ($mode_in) must be one of MYSQLI_CURSOR_TYPE_NO_CURSOR, MYSQLI_CURSOR_TYPE_READ_ONLY, MYSQLI_CURSOR_TYPE_FOR_UPDATE, or MYSQLI_CURSOR_TYPE_SCROLLABLE for attribute MYSQLI_STMT_ATTR_CURSOR_TYPE
|
||||
mysqli_stmt::attr_set(): Argument #2 ($mode_in) must be one of the MYSQLI_CURSOR_TYPE_* constants for attribute MYSQLI_STMT_ATTR_CURSOR_TYPE
|
||||
mysqli_stmt::attr_set(): Argument #2 ($mode_in) must be greater than 0 for attribute MYSQLI_STMT_ATTR_PREFETCH_ROWS
|
||||
done!
|
||||
|
@ -87,7 +87,7 @@ PHP_MINIT_FUNCTION(pdo_odbc)
|
||||
} else if (*pooling_val == '\0' || strcasecmp(pooling_val, "off") == 0) {
|
||||
pdo_odbc_pool_on = SQL_CP_OFF;
|
||||
} else {
|
||||
php_error_docref(NULL, E_CORE_ERROR, "Error in pdo_odbc.connection_pooling configuration. Value MUST be one of 'strict', 'relaxed' or 'off'");
|
||||
php_error_docref(NULL, E_CORE_ERROR, "Error in pdo_odbc.connection_pooling configuration. Value must be one of \"strict\", \"relaxed\", or \"off\"");
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
|
@ -2320,7 +2320,7 @@ ZEND_METHOD(ReflectionParameter, __construct)
|
||||
break;
|
||||
|
||||
default:
|
||||
zend_argument_error(reflection_exception_ptr, 1, "must be either a string, an array(class, method) or a callable object, %s given", zend_zval_type_name(reference));
|
||||
zend_argument_error(reflection_exception_ptr, 1, "must be a string, an array(class, method), or a callable object, %s given", zend_zval_type_name(reference));
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
|
@ -44,5 +44,5 @@ Class "A" does not exist
|
||||
Method C::b() does not exist
|
||||
Method C::b() does not exist
|
||||
Ok - ReflectionParameter::__construct() expects exactly 2 arguments, 1 given
|
||||
Ok - ReflectionParameter::__construct(): Argument #1 ($function) must be either a string, an array(class, method) or a callable object, int given
|
||||
Ok - ReflectionParameter::__construct(): Argument #1 ($function) must be a string, an array(class, method), or a callable object, int given
|
||||
Done.
|
||||
|
@ -941,7 +941,7 @@ static int netsnmp_session_set_auth_protocol(struct snmp_session *s, char *prot)
|
||||
s->securityAuthProto = usmHMACSHA1AuthProtocol;
|
||||
s->securityAuthProtoLen = USM_AUTH_PROTO_SHA_LEN;
|
||||
} else {
|
||||
zend_value_error("Authentication protocol must be either MD5 or SHA");
|
||||
zend_value_error("Authentication protocol must be either \"MD5\" or \"SHA\"");
|
||||
return (-1);
|
||||
}
|
||||
return (0);
|
||||
@ -962,9 +962,9 @@ static int netsnmp_session_set_sec_protocol(struct snmp_session *s, char *prot)
|
||||
#endif
|
||||
} else {
|
||||
#ifdef HAVE_AES
|
||||
zend_value_error("Security protocol must be one of DES, AES128, or AES");
|
||||
zend_value_error("Security protocol must be one of \"DES\", \"AES128\", or \"AES\"");
|
||||
#else
|
||||
zend_value_error("Security protocol must be DES");
|
||||
zend_value_error("Security protocol must be \"DES\"");
|
||||
#endif
|
||||
return (-1);
|
||||
}
|
||||
|
@ -59,15 +59,15 @@ var_dump($session->close());
|
||||
--EXPECTF--
|
||||
Security level must be one of "noAuthNoPriv", "authNoPriv", or "authPriv"
|
||||
Security level must be one of "noAuthNoPriv", "authNoPriv", or "authPriv"
|
||||
Authentication protocol must be either MD5 or SHA
|
||||
Authentication protocol must be either "MD5" or "SHA"
|
||||
|
||||
Warning: SNMP::setSecurity(): Error generating a key for authentication pass phrase '': Generic error (The supplied password length is too short.) in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: SNMP::setSecurity(): Error generating a key for authentication pass phrase 'te': Generic error (The supplied password length is too short.) in %s on line %d
|
||||
bool(false)
|
||||
Security protocol must be one of DES, AES128, or AES
|
||||
Security protocol must be one of DES, AES128, or AES
|
||||
Security protocol must be one of "DES", "AES128", or "AES"
|
||||
Security protocol must be one of "DES", "AES128", or "AES"
|
||||
|
||||
Warning: SNMP::setSecurity(): Error generating a key for privacy pass phrase '': Generic error (The supplied password length is too short.) in %s on line %d
|
||||
bool(false)
|
||||
|
@ -58,14 +58,14 @@ try {
|
||||
Checking error handling
|
||||
Security level must be one of "noAuthNoPriv", "authNoPriv", or "authPriv"
|
||||
Security level must be one of "noAuthNoPriv", "authNoPriv", or "authPriv"
|
||||
Authentication protocol must be either MD5 or SHA
|
||||
Authentication protocol must be either "MD5" or "SHA"
|
||||
|
||||
Warning: snmp3_get(): Error generating a key for authentication pass phrase '': Generic error (The supplied password length is too short.) in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: snmp3_get(): Error generating a key for authentication pass phrase 'te': Generic error (The supplied password length is too short.) in %s on line %d
|
||||
bool(false)
|
||||
Security protocol must be one of DES, AES128, or AES
|
||||
Security protocol must be one of "DES", "AES128", or "AES"
|
||||
|
||||
Warning: snmp3_get(): Error generating a key for privacy pass phrase '': Generic error (The supplied password length is too short.) in %s on line %d
|
||||
bool(false)
|
||||
|
@ -587,7 +587,7 @@ PHP_METHOD(SoapHeader, __construct)
|
||||
if ((actor_long == SOAP_ACTOR_NEXT || actor_long == SOAP_ACTOR_NONE || actor_long == SOAP_ACTOR_UNLIMATERECEIVER)) {
|
||||
add_property_long(this_ptr, "actor", actor_long);
|
||||
} else {
|
||||
zend_argument_value_error(5, "must be either SOAP_ACTOR_NEXT, SOAP_ACTOR_NONE or SOAP_ACTOR_UNLIMATERECEIVER");
|
||||
zend_argument_value_error(5, "must be one of SOAP_ACTOR_NEXT, SOAP_ACTOR_NONE, or SOAP_ACTOR_UNLIMATERECEIVER");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
}
|
||||
|
@ -1137,7 +1137,7 @@ PHP_FUNCTION(socket_getsockname)
|
||||
break;
|
||||
|
||||
default:
|
||||
zend_argument_value_error(1, "must be either AF_UNIX, AF_INET, or AF_INET6");
|
||||
zend_argument_value_error(1, "must be one of AF_UNIX, AF_INET, or AF_INET6");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
}
|
||||
@ -1212,7 +1212,7 @@ PHP_FUNCTION(socket_getpeername)
|
||||
break;
|
||||
|
||||
default:
|
||||
zend_argument_value_error(1, "must be either AF_UNIX, AF_INET, or AF_INET6");
|
||||
zend_argument_value_error(1, "must be one of AF_UNIX, AF_INET, or AF_INET6");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
}
|
||||
@ -1233,12 +1233,12 @@ PHP_FUNCTION(socket_create)
|
||||
&& domain != AF_INET6
|
||||
#endif
|
||||
&& domain != AF_INET) {
|
||||
zend_argument_value_error(1, "must be either AF_UNIX, AF_INET6, or AF_INET");
|
||||
zend_argument_value_error(1, "must be one of AF_UNIX, AF_INET6, or AF_INET");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
if (type > 10) {
|
||||
zend_argument_value_error(2, "must be either SOCK_STREAM, SOCK_DGRAM, SOCK_SEQPACKET,"
|
||||
zend_argument_value_error(2, "must be one of SOCK_STREAM, SOCK_DGRAM, SOCK_SEQPACKET,"
|
||||
" SOCK_RAW, or SOCK_RDM");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
@ -1337,7 +1337,7 @@ PHP_FUNCTION(socket_connect)
|
||||
}
|
||||
|
||||
default:
|
||||
zend_argument_value_error(1, "must be either AF_UNIX, AF_INET, or AF_INET6");
|
||||
zend_argument_value_error(1, "must be one of AF_UNIX, AF_INET, or AF_INET6");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
@ -1431,7 +1431,7 @@ PHP_FUNCTION(socket_bind)
|
||||
}
|
||||
#endif
|
||||
default:
|
||||
zend_argument_value_error(1, "must be either AF_UNIX, AF_INET, or AF_INET6");
|
||||
zend_argument_value_error(1, "must be one of AF_UNIX, AF_INET, or AF_INET6");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
@ -1625,7 +1625,7 @@ PHP_FUNCTION(socket_recvfrom)
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
zend_argument_value_error(1, "must be either AF_UNIX, AF_INET, or AF_INET6");
|
||||
zend_argument_value_error(1, "must be one of AF_UNIX, AF_INET, or AF_INET6");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
@ -1705,7 +1705,7 @@ PHP_FUNCTION(socket_sendto)
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
zend_argument_value_error(1, "must be either AF_UNIX, AF_INET, or AF_INET6");
|
||||
zend_argument_value_error(1, "must be one of AF_UNIX, AF_INET, or AF_INET6");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
@ -1987,12 +1987,12 @@ PHP_FUNCTION(socket_create_pair)
|
||||
&& domain != AF_INET6
|
||||
#endif
|
||||
&& domain != AF_UNIX) {
|
||||
zend_argument_value_error(1, "must be either AF_UNIX, AF_INET6 or AF_INET");
|
||||
zend_argument_value_error(1, "must be one of AF_UNIX, AF_INET6, or AF_INET");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
if (type > 10) {
|
||||
zend_argument_value_error(2, "must be either SOCK_STREAM, SOCK_DGRAM, SOCK_SEQPACKET,"
|
||||
zend_argument_value_error(2, "must be one of SOCK_STREAM, SOCK_DGRAM, SOCK_SEQPACKET,"
|
||||
" SOCK_RAW, or SOCK_RDM");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
@ -2402,7 +2402,7 @@ PHP_FUNCTION(socket_addrinfo_bind)
|
||||
default:
|
||||
close(php_sock->bsd_socket);
|
||||
zval_ptr_dtor(return_value);
|
||||
zend_argument_value_error(1, "must be either AF_UNIX, AF_INET, or AF_INET6");
|
||||
zend_argument_value_error(1, "must be one of AF_UNIX, AF_INET, or AF_INET6");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
@ -2463,7 +2463,7 @@ PHP_FUNCTION(socket_addrinfo_connect)
|
||||
break;
|
||||
}
|
||||
default:
|
||||
zend_argument_value_error(1, "socket type must be either AF_UNIX, AF_INET, or AF_INET6");
|
||||
zend_argument_value_error(1, "socket type must be one of AF_UNIX, AF_INET, or AF_INET6");
|
||||
close(php_sock->bsd_socket);
|
||||
zval_ptr_dtor(return_value);
|
||||
RETURN_THROWS();
|
||||
|
@ -27,8 +27,8 @@ try {
|
||||
?>
|
||||
--EXPECT--
|
||||
bool(true)
|
||||
socket_create_pair(): Argument #1 ($domain) must be either AF_UNIX, AF_INET6 or AF_INET
|
||||
socket_create_pair(): Argument #2 ($type) must be either SOCK_STREAM, SOCK_DGRAM, SOCK_SEQPACKET, SOCK_RAW, or SOCK_RDM
|
||||
socket_create_pair(): Argument #1 ($domain) must be one of AF_UNIX, AF_INET6, or AF_INET
|
||||
socket_create_pair(): Argument #2 ($type) must be one of SOCK_STREAM, SOCK_DGRAM, SOCK_SEQPACKET, SOCK_RAW, or SOCK_RDM
|
||||
--CREDITS--
|
||||
Till Klampaeckel, till@php.net
|
||||
Berlin TestFest 2009
|
||||
|
@ -29,8 +29,8 @@ try {
|
||||
--EXPECTF--
|
||||
Warning: socket_create_pair(): Unable to create socket pair [%d]: %s not supported in %s on line %d
|
||||
bool(false)
|
||||
socket_create_pair(): Argument #1 ($domain) must be either AF_UNIX, AF_INET6 or AF_INET
|
||||
socket_create_pair(): Argument #2 ($type) must be either SOCK_STREAM, SOCK_DGRAM, SOCK_SEQPACKET, SOCK_RAW, or SOCK_RDM
|
||||
socket_create_pair(): Argument #1 ($domain) must be one of AF_UNIX, AF_INET6, or AF_INET
|
||||
socket_create_pair(): Argument #2 ($type) must be one of SOCK_STREAM, SOCK_DGRAM, SOCK_SEQPACKET, SOCK_RAW, or SOCK_RDM
|
||||
--CREDITS--
|
||||
Till Klampaeckel, till@php.net
|
||||
Berlin TestFest 2009
|
||||
|
@ -333,7 +333,7 @@ PHPAPI void php_flock_common(php_stream *stream, zend_long operation,
|
||||
|
||||
act = operation & PHP_LOCK_UN;
|
||||
if (act < 1 || act > 3) {
|
||||
zend_argument_value_error(operation_arg_num, "must be either LOCK_SH, LOCK_EX, or LOCK_UN");
|
||||
zend_argument_value_error(operation_arg_num, "must be one of LOCK_SH, LOCK_EX, or LOCK_UN");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
|
@ -60,4 +60,4 @@ int(0)
|
||||
bool(true)
|
||||
int(0)
|
||||
bool(true)
|
||||
flock(): Argument #2 ($operation) must be either LOCK_SH, LOCK_EX, or LOCK_UN
|
||||
flock(): Argument #2 ($operation) must be one of LOCK_SH, LOCK_EX, or LOCK_UN
|
||||
|
@ -56,13 +56,13 @@ unlink($file);
|
||||
--EXPECT--
|
||||
*** Testing error conditions ***
|
||||
--- Iteration 0 ---
|
||||
flock(): Argument #2 ($operation) must be either LOCK_SH, LOCK_EX, or LOCK_UN
|
||||
flock(): Argument #2 ($operation) must be one of LOCK_SH, LOCK_EX, or LOCK_UN
|
||||
--- Iteration 1 ---
|
||||
flock(): Argument #2 ($operation) must be either LOCK_SH, LOCK_EX, or LOCK_UN
|
||||
flock(): Argument #2 ($operation) must be one of LOCK_SH, LOCK_EX, or LOCK_UN
|
||||
--- Iteration 2 ---
|
||||
flock(): Argument #2 ($operation) must be either LOCK_SH, LOCK_EX, or LOCK_UN
|
||||
flock(): Argument #2 ($operation) must be one of LOCK_SH, LOCK_EX, or LOCK_UN
|
||||
--- Iteration 3 ---
|
||||
flock(): Argument #2 ($operation) must be either LOCK_SH, LOCK_EX, or LOCK_UN
|
||||
flock(): Argument #2 ($operation) must be one of LOCK_SH, LOCK_EX, or LOCK_UN
|
||||
--- Iteration 4 ---
|
||||
flock(): Argument #2 ($operation) must be of type int, array given
|
||||
--- Iteration 5 ---
|
||||
|
@ -42,9 +42,9 @@ var_dump(gzencode($string, 9, ZLIB_ENCODING_DEFLATE));
|
||||
--EXPECTF--
|
||||
gzencode(): Argument #2 ($level) must be between -1 and 9
|
||||
gzencode(): Argument #2 ($level) must be between -1 and 9
|
||||
gzencode(): Argument #3 ($encoding) must be either ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP, or ZLIB_ENCODING_DEFLATE
|
||||
gzencode(): Argument #3 ($encoding) must be one of ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP, or ZLIB_ENCODING_DEFLATE
|
||||
string(%d) "%a"
|
||||
string(%d) "%a"
|
||||
gzencode(): Argument #3 ($encoding) must be either ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP, or ZLIB_ENCODING_DEFLATE
|
||||
gzencode(): Argument #3 ($encoding) must be one of ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP, or ZLIB_ENCODING_DEFLATE
|
||||
string(%d) "%a"
|
||||
string(%d) "%a"
|
||||
|
@ -41,7 +41,7 @@ try {
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
deflate_init(): Argument #1 ($encoding) must be either ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP, or ZLIB_ENCODING_DEFLATE
|
||||
deflate_init(): Argument #1 ($encoding) must be one of ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP, or ZLIB_ENCODING_DEFLATE
|
||||
deflate_init(): "level" option must be between -1 and 9
|
||||
deflate_init(): "level" option must be between -1 and 9
|
||||
deflate_init(): "memory" option must be between 1 and 9
|
||||
|
@ -41,4 +41,4 @@ try {
|
||||
gzcompress(): Argument #2 ($level) must be between -1 and 9
|
||||
|
||||
-- Testing with invalid encoding --
|
||||
gzcompress(): Argument #3 ($encoding) must be either ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP, or ZLIB_ENCODING_DEFLATE
|
||||
gzcompress(): Argument #3 ($encoding) must be one of ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP, or ZLIB_ENCODING_DEFLATE
|
||||
|
@ -41,4 +41,4 @@ try {
|
||||
gzdeflate(): Argument #2 ($level) must be between -1 and 9
|
||||
|
||||
-- Testing with incorrect encoding --
|
||||
gzdeflate(): Argument #3 ($encoding) must be either ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP, or ZLIB_ENCODING_DEFLATE
|
||||
gzdeflate(): Argument #3 ($encoding) must be one of ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP, or ZLIB_ENCODING_DEFLATE
|
||||
|
@ -42,4 +42,4 @@ try {
|
||||
gzencode(): Argument #2 ($level) must be between -1 and 9
|
||||
|
||||
-- Testing with incorrect encoding_mode --
|
||||
gzencode(): Argument #3 ($encoding) must be either ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP, or ZLIB_ENCODING_DEFLATE
|
||||
gzencode(): Argument #3 ($encoding) must be one of ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP, or ZLIB_ENCODING_DEFLATE
|
||||
|
@ -725,7 +725,7 @@ PHP_FUNCTION(name) \
|
||||
case PHP_ZLIB_ENCODING_DEFLATE: \
|
||||
break; \
|
||||
default: \
|
||||
zend_argument_value_error(default_encoding ? 3 : 2, "must be either ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP, or ZLIB_ENCODING_DEFLATE"); \
|
||||
zend_argument_value_error(default_encoding ? 3 : 2, "must be one of ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP, or ZLIB_ENCODING_DEFLATE"); \
|
||||
RETURN_THROWS(); \
|
||||
} \
|
||||
if ((out = php_zlib_encode(ZSTR_VAL(in), ZSTR_LEN(in), encoding, level)) == NULL) { \
|
||||
@ -1129,7 +1129,7 @@ PHP_FUNCTION(deflate_init)
|
||||
case Z_DEFAULT_STRATEGY:
|
||||
break;
|
||||
default:
|
||||
zend_value_error("deflate_init(): \"strategy\" option must be one of ZLIB_FILTERED, ZLIB_HUFFMAN_ONLY, ZLIB_RLE, ZLIB_FIXED or ZLIB_DEFAULT_STRATEGY");
|
||||
zend_value_error("deflate_init(): \"strategy\" option must be one of ZLIB_FILTERED, ZLIB_HUFFMAN_ONLY, ZLIB_RLE, ZLIB_FIXED, or ZLIB_DEFAULT_STRATEGY");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
@ -1143,7 +1143,7 @@ PHP_FUNCTION(deflate_init)
|
||||
case PHP_ZLIB_ENCODING_DEFLATE:
|
||||
break;
|
||||
default:
|
||||
zend_argument_value_error(1, "must be either ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP, or ZLIB_ENCODING_DEFLATE");
|
||||
zend_argument_value_error(1, "must be one of ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP, or ZLIB_ENCODING_DEFLATE");
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
|
@ -438,7 +438,7 @@ PHP_FUNCTION(phpdbg_color)
|
||||
break;
|
||||
|
||||
default:
|
||||
zend_argument_value_error(1, "must be either PHPDBG_COLOR_PROMPT, PHPDBG_COLOR_NOTICE, or PHPDBG_COLOR_ERROR");
|
||||
zend_argument_value_error(1, "must be one of PHPDBG_COLOR_PROMPT, PHPDBG_COLOR_NOTICE, or PHPDBG_COLOR_ERROR");
|
||||
}
|
||||
} /* }}} */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user