Skip to content

Commit e950ca1

Browse files
committed
Consolidate the usage of "either" and "one of" in error messages
Closes GH-6173
1 parent c0f8cc1 commit e950ca1

34 files changed

+60
-62
lines changed

ext/ftp/php_ftp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1284,7 +1284,7 @@ PHP_FUNCTION(ftp_set_option)
12841284
RETURN_TRUE;
12851285
break;
12861286
default:
1287-
zend_argument_value_error(2, "must be either FTP_TIMEOUT_SEC, FTP_AUTOSEEK, or FTP_USEPASVADDRESS");
1287+
zend_argument_value_error(2, "must be one of FTP_TIMEOUT_SEC, FTP_AUTOSEEK, or FTP_USEPASVADDRESS");
12881288
RETURN_THROWS();
12891289
break;
12901290
}
@@ -1317,7 +1317,7 @@ PHP_FUNCTION(ftp_get_option)
13171317
RETURN_BOOL(ftp->usepasvaddress);
13181318
break;
13191319
default:
1320-
zend_argument_value_error(2, "must be either FTP_TIMEOUT_SEC, FTP_AUTOSEEK, or FTP_USEPASVADDRESS");
1320+
zend_argument_value_error(2, "must be one of FTP_TIMEOUT_SEC, FTP_AUTOSEEK, or FTP_USEPASVADDRESS");
13211321
RETURN_THROWS();
13221322
}
13231323
}

ext/ftp/tests/ftp_get_option.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ try {
2828
int(%d)
2929
bool(true)
3030
bool(true)
31-
ftp_get_option(): Argument #2 ($option) must be either FTP_TIMEOUT_SEC, FTP_AUTOSEEK, or FTP_USEPASVADDRESS
31+
ftp_get_option(): Argument #2 ($option) must be one of FTP_TIMEOUT_SEC, FTP_AUTOSEEK, or FTP_USEPASVADDRESS

ext/ftp/tests/ftp_set_option_errors.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,4 @@ ftp_set_option(): Argument #3 ($value) must be greater than 0 for the FTP_TIMEOU
4949
ftp_set_option(): Argument #3 ($value) must be of type int for the FTP_TIMEOUT_SEC option, string given
5050
ftp_set_option(): Argument #3 ($value) must be of type bool for the FTP_USEPASVADDRESS option, array given
5151
ftp_set_option(): Argument #3 ($value) must be of type bool for the FTP_AUTOSEEK option, string given
52-
ftp_set_option(): Argument #2 ($option) must be either FTP_TIMEOUT_SEC, FTP_AUTOSEEK, or FTP_USEPASVADDRESS
52+
ftp_set_option(): Argument #2 ($option) must be one of FTP_TIMEOUT_SEC, FTP_AUTOSEEK, or FTP_USEPASVADDRESS

ext/gd/gd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3521,7 +3521,7 @@ PHP_FUNCTION(imageflip)
35213521
break;
35223522

35233523
default:
3524-
zend_argument_value_error(2, "must be either IMG_FLIP_VERTICAL, IMG_FLIP_HORIZONTAL, or IMG_FLIP_BOTH");
3524+
zend_argument_value_error(2, "must be one of IMG_FLIP_VERTICAL, IMG_FLIP_HORIZONTAL, or IMG_FLIP_BOTH");
35253525
RETURN_THROWS();
35263526
}
35273527

ext/intl/grapheme/grapheme_string.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -778,7 +778,7 @@ PHP_FUNCTION(grapheme_extract)
778778
}
779779

780780
if ( extract_type < GRAPHEME_EXTRACT_TYPE_MIN || extract_type > GRAPHEME_EXTRACT_TYPE_MAX ) {
781-
zend_argument_value_error(3, "must be either GRAPHEME_EXTR_COUNT, GRAPHEME_EXTR_MAXBYTES, or GRAPHEME_EXTR_MAXCHARS");
781+
zend_argument_value_error(3, "must be one of GRAPHEME_EXTR_COUNT, GRAPHEME_EXTR_MAXBYTES, or GRAPHEME_EXTR_MAXCHARS");
782782
RETURN_THROWS();
783783
}
784784

ext/intl/tests/bug62083.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ try {
1414
}
1515
?>
1616
--EXPECT--
17-
grapheme_extract(): Argument #3 ($extract_type) must be either GRAPHEME_EXTR_COUNT, GRAPHEME_EXTR_MAXBYTES, or GRAPHEME_EXTR_MAXCHARS
17+
grapheme_extract(): Argument #3 ($extract_type) must be one of GRAPHEME_EXTR_COUNT, GRAPHEME_EXTR_MAXBYTES, or GRAPHEME_EXTR_MAXCHARS

ext/ldap/ldap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2655,7 +2655,7 @@ PHP_FUNCTION(ldap_modify_batch)
26552655
modtype != LDAP_MODIFY_BATCH_REPLACE &&
26562656
modtype != LDAP_MODIFY_BATCH_REMOVE_ALL
26572657
) {
2658-
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());
2658+
zend_value_error("%s(): Option \"" LDAP_MODIFY_BATCH_MODTYPE "\" must be one of the LDAP_MODIFY_BATCH_* constants", get_active_function_name());
26592659
RETURN_THROWS();
26602660
}
26612661

ext/mbstring/mbstring.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1307,7 +1307,7 @@ PHP_FUNCTION(mb_http_input)
13071307
return;
13081308
default:
13091309
zend_argument_value_error(1,
1310-
"must be one of \"G\", \"P\", \"C\", \"S\", \"I\" or \"L\"");
1310+
"must be one of \"G\", \"P\", \"C\", \"S\", \"I\", or \"L\"");
13111311
RETURN_THROWS();
13121312
}
13131313
}
@@ -2596,8 +2596,7 @@ PHP_FUNCTION(mb_convert_case)
25962596
}
25972597

25982598
if (case_mode < 0 || case_mode > PHP_UNICODE_CASE_MODE_MAX) {
2599-
zend_argument_value_error(2, "must be one of MB_CASE_UPPER, MB_CASE_LOWER, MB_CASE_TITLE, MB_CASE_FOLD,"
2600-
" MB_CASE_UPPER_SIMPLE, MB_CASE_LOWER_SIMPLE, MB_CASE_TITLE_SIMPLE, or MB_CASE_FOLD_SIMPLE");
2599+
zend_argument_value_error(2, "must be one of the MB_CASE_* constants");
26012600
RETURN_THROWS();
26022601
}
26032602

ext/mbstring/tests/mb_convert_case_various_mode.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ string(13) "FOO BAR SPAß"
3131
string(13) "foo bar spaß"
3232
string(13) "Foo Bar Spaß"
3333
string(13) "foo bar spaß"
34-
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
34+
mb_convert_case(): Argument #2 ($mode) must be one of the MB_CASE_* constants

ext/mbstring/tests/mb_http_input.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,4 @@ array(1) {
4343
string(10) "ISO-8859-1"
4444
}
4545
string(10) "ISO-8859-1"
46-
mb_http_input(): Argument #1 ($type) must be one of "G", "P", "C", "S", "I" or "L"
46+
mb_http_input(): Argument #1 ($type) must be one of "G", "P", "C", "S", "I", or "L"

ext/mysqli/mysqli_api.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2270,8 +2270,7 @@ PHP_FUNCTION(mysqli_stmt_attr_set)
22702270
case CURSOR_TYPE_SCROLLABLE:
22712271
break;
22722272
default:
2273-
zend_argument_value_error(ERROR_ARG_POS(3), "must be one of MYSQLI_CURSOR_TYPE_NO_CURSOR, "
2274-
"MYSQLI_CURSOR_TYPE_READ_ONLY, MYSQLI_CURSOR_TYPE_FOR_UPDATE, or MYSQLI_CURSOR_TYPE_SCROLLABLE "
2273+
zend_argument_value_error(ERROR_ARG_POS(3), "must be one of the MYSQLI_CURSOR_TYPE_* constants "
22752274
"for attribute MYSQLI_STMT_ATTR_CURSOR_TYPE");
22762275
RETURN_THROWS();
22772276
}

ext/mysqli/mysqli_nonapi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,7 @@ PHP_FUNCTION(mysqli_query)
639639
if ((resultmode & ~MYSQLI_ASYNC) != MYSQLI_USE_RESULT &&
640640
MYSQLI_STORE_RESULT != (resultmode & ~(MYSQLI_ASYNC | MYSQLI_STORE_RESULT_COPY_DATA))
641641
) {
642-
zend_argument_value_error(ERROR_ARG_POS(3), "must be either MYSQLI_USE_RESULT, or MYSQLI_STORE_RESULT"
642+
zend_argument_value_error(ERROR_ARG_POS(3), "must be either MYSQLI_USE_RESULT or MYSQLI_STORE_RESULT"
643643
#ifdef MYSQLI_USE_MYSQLND
644644
" with MYSQLI_ASYNC as an optional bitmask flag"
645645
#endif

ext/mysqli/tests/mysqli_query.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,6 @@ array(1) {
125125
string(1) "a"
126126
}
127127
string(1) "a"
128-
mysqli_query(): Argument #3 ($result_mode) must be either MYSQLI_USE_RESULT, or MYSQLI_STORE_RESULT%S
128+
mysqli_query(): Argument #3 ($result_mode) must be either MYSQLI_USE_RESULT or MYSQLI_STORE_RESULT%S
129129
mysqli object is already closed
130130
done!

ext/mysqli/tests/mysqli_stmt_attr_set.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,6 @@ Error: mysqli_stmt object is not fully initialized
245245
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
246246
mysqli_stmt::attr_set(): Argument #2 ($mode_in) must be 0 or 1 for attribute MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH
247247
bool(true)
248-
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
248+
mysqli_stmt::attr_set(): Argument #2 ($mode_in) must be one of the MYSQLI_CURSOR_TYPE_* constants for attribute MYSQLI_STMT_ATTR_CURSOR_TYPE
249249
mysqli_stmt::attr_set(): Argument #2 ($mode_in) must be greater than 0 for attribute MYSQLI_STMT_ATTR_PREFETCH_ROWS
250250
done!

ext/pdo_odbc/pdo_odbc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ PHP_MINIT_FUNCTION(pdo_odbc)
8787
} else if (*pooling_val == '\0' || strcasecmp(pooling_val, "off") == 0) {
8888
pdo_odbc_pool_on = SQL_CP_OFF;
8989
} else {
90-
php_error_docref(NULL, E_CORE_ERROR, "Error in pdo_odbc.connection_pooling configuration. Value MUST be one of 'strict', 'relaxed' or 'off'");
90+
php_error_docref(NULL, E_CORE_ERROR, "Error in pdo_odbc.connection_pooling configuration. Value must be one of \"strict\", \"relaxed\", or \"off\"");
9191
return FAILURE;
9292
}
9393

ext/reflection/php_reflection.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2320,7 +2320,7 @@ ZEND_METHOD(ReflectionParameter, __construct)
23202320
break;
23212321

23222322
default:
2323-
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));
2323+
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));
23242324
RETURN_THROWS();
23252325
}
23262326

ext/reflection/tests/ReflectionParameter_invalidMethodInConstructor.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,5 @@ Class "A" does not exist
4444
Method C::b() does not exist
4545
Method C::b() does not exist
4646
Ok - ReflectionParameter::__construct() expects exactly 2 arguments, 1 given
47-
Ok - ReflectionParameter::__construct(): Argument #1 ($function) must be either a string, an array(class, method) or a callable object, int given
47+
Ok - ReflectionParameter::__construct(): Argument #1 ($function) must be a string, an array(class, method), or a callable object, int given
4848
Done.

ext/snmp/snmp.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -941,7 +941,7 @@ static int netsnmp_session_set_auth_protocol(struct snmp_session *s, char *prot)
941941
s->securityAuthProto = usmHMACSHA1AuthProtocol;
942942
s->securityAuthProtoLen = USM_AUTH_PROTO_SHA_LEN;
943943
} else {
944-
zend_value_error("Authentication protocol must be either MD5 or SHA");
944+
zend_value_error("Authentication protocol must be either \"MD5\" or \"SHA\"");
945945
return (-1);
946946
}
947947
return (0);
@@ -962,9 +962,9 @@ static int netsnmp_session_set_sec_protocol(struct snmp_session *s, char *prot)
962962
#endif
963963
} else {
964964
#ifdef HAVE_AES
965-
zend_value_error("Security protocol must be one of DES, AES128, or AES");
965+
zend_value_error("Security protocol must be one of \"DES\", \"AES128\", or \"AES\"");
966966
#else
967-
zend_value_error("Security protocol must be DES");
967+
zend_value_error("Security protocol must be \"DES\"");
968968
#endif
969969
return (-1);
970970
}

ext/snmp/tests/snmp-object-setSecurity_error.phpt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,15 @@ var_dump($session->close());
5959
--EXPECTF--
6060
Security level must be one of "noAuthNoPriv", "authNoPriv", or "authPriv"
6161
Security level must be one of "noAuthNoPriv", "authNoPriv", or "authPriv"
62-
Authentication protocol must be either MD5 or SHA
62+
Authentication protocol must be either "MD5" or "SHA"
6363

6464
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
6565
bool(false)
6666

6767
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
6868
bool(false)
69-
Security protocol must be one of DES, AES128, or AES
70-
Security protocol must be one of DES, AES128, or AES
69+
Security protocol must be one of "DES", "AES128", or "AES"
70+
Security protocol must be one of "DES", "AES128", or "AES"
7171

7272
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
7373
bool(false)

ext/snmp/tests/snmp3-error.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,14 @@ try {
5858
Checking error handling
5959
Security level must be one of "noAuthNoPriv", "authNoPriv", or "authPriv"
6060
Security level must be one of "noAuthNoPriv", "authNoPriv", or "authPriv"
61-
Authentication protocol must be either MD5 or SHA
61+
Authentication protocol must be either "MD5" or "SHA"
6262

6363
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
6464
bool(false)
6565

6666
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
6767
bool(false)
68-
Security protocol must be one of DES, AES128, or AES
68+
Security protocol must be one of "DES", "AES128", or "AES"
6969

7070
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
7171
bool(false)

ext/soap/soap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ PHP_METHOD(SoapHeader, __construct)
587587
if ((actor_long == SOAP_ACTOR_NEXT || actor_long == SOAP_ACTOR_NONE || actor_long == SOAP_ACTOR_UNLIMATERECEIVER)) {
588588
add_property_long(this_ptr, "actor", actor_long);
589589
} else {
590-
zend_argument_value_error(5, "must be either SOAP_ACTOR_NEXT, SOAP_ACTOR_NONE or SOAP_ACTOR_UNLIMATERECEIVER");
590+
zend_argument_value_error(5, "must be one of SOAP_ACTOR_NEXT, SOAP_ACTOR_NONE, or SOAP_ACTOR_UNLIMATERECEIVER");
591591
RETURN_THROWS();
592592
}
593593
}

ext/sockets/sockets.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1137,7 +1137,7 @@ PHP_FUNCTION(socket_getsockname)
11371137
break;
11381138

11391139
default:
1140-
zend_argument_value_error(1, "must be either AF_UNIX, AF_INET, or AF_INET6");
1140+
zend_argument_value_error(1, "must be one of AF_UNIX, AF_INET, or AF_INET6");
11411141
RETURN_THROWS();
11421142
}
11431143
}
@@ -1212,7 +1212,7 @@ PHP_FUNCTION(socket_getpeername)
12121212
break;
12131213

12141214
default:
1215-
zend_argument_value_error(1, "must be either AF_UNIX, AF_INET, or AF_INET6");
1215+
zend_argument_value_error(1, "must be one of AF_UNIX, AF_INET, or AF_INET6");
12161216
RETURN_THROWS();
12171217
}
12181218
}
@@ -1233,12 +1233,12 @@ PHP_FUNCTION(socket_create)
12331233
&& domain != AF_INET6
12341234
#endif
12351235
&& domain != AF_INET) {
1236-
zend_argument_value_error(1, "must be either AF_UNIX, AF_INET6, or AF_INET");
1236+
zend_argument_value_error(1, "must be one of AF_UNIX, AF_INET6, or AF_INET");
12371237
RETURN_THROWS();
12381238
}
12391239

12401240
if (type > 10) {
1241-
zend_argument_value_error(2, "must be either SOCK_STREAM, SOCK_DGRAM, SOCK_SEQPACKET,"
1241+
zend_argument_value_error(2, "must be one of SOCK_STREAM, SOCK_DGRAM, SOCK_SEQPACKET,"
12421242
" SOCK_RAW, or SOCK_RDM");
12431243
RETURN_THROWS();
12441244
}
@@ -1337,7 +1337,7 @@ PHP_FUNCTION(socket_connect)
13371337
}
13381338

13391339
default:
1340-
zend_argument_value_error(1, "must be either AF_UNIX, AF_INET, or AF_INET6");
1340+
zend_argument_value_error(1, "must be one of AF_UNIX, AF_INET, or AF_INET6");
13411341
RETURN_THROWS();
13421342
}
13431343

@@ -1431,7 +1431,7 @@ PHP_FUNCTION(socket_bind)
14311431
}
14321432
#endif
14331433
default:
1434-
zend_argument_value_error(1, "must be either AF_UNIX, AF_INET, or AF_INET6");
1434+
zend_argument_value_error(1, "must be one of AF_UNIX, AF_INET, or AF_INET6");
14351435
RETURN_THROWS();
14361436
}
14371437

@@ -1625,7 +1625,7 @@ PHP_FUNCTION(socket_recvfrom)
16251625
break;
16261626
#endif
16271627
default:
1628-
zend_argument_value_error(1, "must be either AF_UNIX, AF_INET, or AF_INET6");
1628+
zend_argument_value_error(1, "must be one of AF_UNIX, AF_INET, or AF_INET6");
16291629
RETURN_THROWS();
16301630
}
16311631

@@ -1705,7 +1705,7 @@ PHP_FUNCTION(socket_sendto)
17051705
break;
17061706
#endif
17071707
default:
1708-
zend_argument_value_error(1, "must be either AF_UNIX, AF_INET, or AF_INET6");
1708+
zend_argument_value_error(1, "must be one of AF_UNIX, AF_INET, or AF_INET6");
17091709
RETURN_THROWS();
17101710
}
17111711

@@ -1987,12 +1987,12 @@ PHP_FUNCTION(socket_create_pair)
19871987
&& domain != AF_INET6
19881988
#endif
19891989
&& domain != AF_UNIX) {
1990-
zend_argument_value_error(1, "must be either AF_UNIX, AF_INET6 or AF_INET");
1990+
zend_argument_value_error(1, "must be one of AF_UNIX, AF_INET6, or AF_INET");
19911991
RETURN_THROWS();
19921992
}
19931993

19941994
if (type > 10) {
1995-
zend_argument_value_error(2, "must be either SOCK_STREAM, SOCK_DGRAM, SOCK_SEQPACKET,"
1995+
zend_argument_value_error(2, "must be one of SOCK_STREAM, SOCK_DGRAM, SOCK_SEQPACKET,"
19961996
" SOCK_RAW, or SOCK_RDM");
19971997
RETURN_THROWS();
19981998
}
@@ -2402,7 +2402,7 @@ PHP_FUNCTION(socket_addrinfo_bind)
24022402
default:
24032403
close(php_sock->bsd_socket);
24042404
zval_ptr_dtor(return_value);
2405-
zend_argument_value_error(1, "must be either AF_UNIX, AF_INET, or AF_INET6");
2405+
zend_argument_value_error(1, "must be one of AF_UNIX, AF_INET, or AF_INET6");
24062406
RETURN_THROWS();
24072407
}
24082408

@@ -2463,7 +2463,7 @@ PHP_FUNCTION(socket_addrinfo_connect)
24632463
break;
24642464
}
24652465
default:
2466-
zend_argument_value_error(1, "socket type must be either AF_UNIX, AF_INET, or AF_INET6");
2466+
zend_argument_value_error(1, "socket type must be one of AF_UNIX, AF_INET, or AF_INET6");
24672467
close(php_sock->bsd_socket);
24682468
zval_ptr_dtor(return_value);
24692469
RETURN_THROWS();

ext/sockets/tests/socket_create_pair-wrongparams-win32.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ try {
2727
?>
2828
--EXPECT--
2929
bool(true)
30-
socket_create_pair(): Argument #1 ($domain) must be either AF_UNIX, AF_INET6 or AF_INET
31-
socket_create_pair(): Argument #2 ($type) must be either SOCK_STREAM, SOCK_DGRAM, SOCK_SEQPACKET, SOCK_RAW, or SOCK_RDM
30+
socket_create_pair(): Argument #1 ($domain) must be one of AF_UNIX, AF_INET6, or AF_INET
31+
socket_create_pair(): Argument #2 ($type) must be one of SOCK_STREAM, SOCK_DGRAM, SOCK_SEQPACKET, SOCK_RAW, or SOCK_RDM
3232
--CREDITS--
3333
Till Klampaeckel, till@php.net
3434
Berlin TestFest 2009

ext/sockets/tests/socket_create_pair-wrongparams.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ try {
2929
--EXPECTF--
3030
Warning: socket_create_pair(): Unable to create socket pair [%d]: %s not supported in %s on line %d
3131
bool(false)
32-
socket_create_pair(): Argument #1 ($domain) must be either AF_UNIX, AF_INET6 or AF_INET
33-
socket_create_pair(): Argument #2 ($type) must be either SOCK_STREAM, SOCK_DGRAM, SOCK_SEQPACKET, SOCK_RAW, or SOCK_RDM
32+
socket_create_pair(): Argument #1 ($domain) must be one of AF_UNIX, AF_INET6, or AF_INET
33+
socket_create_pair(): Argument #2 ($type) must be one of SOCK_STREAM, SOCK_DGRAM, SOCK_SEQPACKET, SOCK_RAW, or SOCK_RDM
3434
--CREDITS--
3535
Till Klampaeckel, till@php.net
3636
Berlin TestFest 2009

ext/standard/file.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ PHPAPI void php_flock_common(php_stream *stream, zend_long operation,
333333

334334
act = operation & PHP_LOCK_UN;
335335
if (act < 1 || act > 3) {
336-
zend_argument_value_error(operation_arg_num, "must be either LOCK_SH, LOCK_EX, or LOCK_UN");
336+
zend_argument_value_error(operation_arg_num, "must be one of LOCK_SH, LOCK_EX, or LOCK_UN");
337337
RETURN_THROWS();
338338
}
339339

ext/standard/tests/file/flock.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,4 @@ int(0)
6060
bool(true)
6161
int(0)
6262
bool(true)
63-
flock(): Argument #2 ($operation) must be either LOCK_SH, LOCK_EX, or LOCK_UN
63+
flock(): Argument #2 ($operation) must be one of LOCK_SH, LOCK_EX, or LOCK_UN

ext/standard/tests/file/flock_error.phpt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,13 @@ unlink($file);
5656
--EXPECT--
5757
*** Testing error conditions ***
5858
--- Iteration 0 ---
59-
flock(): Argument #2 ($operation) must be either LOCK_SH, LOCK_EX, or LOCK_UN
59+
flock(): Argument #2 ($operation) must be one of LOCK_SH, LOCK_EX, or LOCK_UN
6060
--- Iteration 1 ---
61-
flock(): Argument #2 ($operation) must be either LOCK_SH, LOCK_EX, or LOCK_UN
61+
flock(): Argument #2 ($operation) must be one of LOCK_SH, LOCK_EX, or LOCK_UN
6262
--- Iteration 2 ---
63-
flock(): Argument #2 ($operation) must be either LOCK_SH, LOCK_EX, or LOCK_UN
63+
flock(): Argument #2 ($operation) must be one of LOCK_SH, LOCK_EX, or LOCK_UN
6464
--- Iteration 3 ---
65-
flock(): Argument #2 ($operation) must be either LOCK_SH, LOCK_EX, or LOCK_UN
65+
flock(): Argument #2 ($operation) must be one of LOCK_SH, LOCK_EX, or LOCK_UN
6666
--- Iteration 4 ---
6767
flock(): Argument #2 ($operation) must be of type int, array given
6868
--- Iteration 5 ---

ext/zlib/tests/007.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ var_dump(gzencode($string, 9, ZLIB_ENCODING_DEFLATE));
4242
--EXPECTF--
4343
gzencode(): Argument #2 ($level) must be between -1 and 9
4444
gzencode(): Argument #2 ($level) must be between -1 and 9
45-
gzencode(): Argument #3 ($encoding) must be either ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP, or ZLIB_ENCODING_DEFLATE
45+
gzencode(): Argument #3 ($encoding) must be one of ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP, or ZLIB_ENCODING_DEFLATE
4646
string(%d) "%a"
4747
string(%d) "%a"
48-
gzencode(): Argument #3 ($encoding) must be either ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP, or ZLIB_ENCODING_DEFLATE
48+
gzencode(): Argument #3 ($encoding) must be one of ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP, or ZLIB_ENCODING_DEFLATE
4949
string(%d) "%a"
5050
string(%d) "%a"

ext/zlib/tests/deflate_init_error.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ try {
4141

4242
?>
4343
--EXPECT--
44-
deflate_init(): Argument #1 ($encoding) must be either ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP, or ZLIB_ENCODING_DEFLATE
44+
deflate_init(): Argument #1 ($encoding) must be one of ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP, or ZLIB_ENCODING_DEFLATE
4545
deflate_init(): "level" option must be between -1 and 9
4646
deflate_init(): "level" option must be between -1 and 9
4747
deflate_init(): "memory" option must be between 1 and 9

0 commit comments

Comments
 (0)