]> granicus.if.org Git - php/commitdiff
Consolidate the usage of "either" and "one of" in error messages
authorMáté Kocsis <kocsismate@woohoolabs.com>
Sun, 20 Sep 2020 08:41:10 +0000 (10:41 +0200)
committerMáté Kocsis <kocsismate@woohoolabs.com>
Sun, 20 Sep 2020 17:41:47 +0000 (19:41 +0200)
Closes GH-6173

34 files changed:
ext/ftp/php_ftp.c
ext/ftp/tests/ftp_get_option.phpt
ext/ftp/tests/ftp_set_option_errors.phpt
ext/gd/gd.c
ext/intl/grapheme/grapheme_string.c
ext/intl/tests/bug62083.phpt
ext/ldap/ldap.c
ext/mbstring/mbstring.c
ext/mbstring/tests/mb_convert_case_various_mode.phpt
ext/mbstring/tests/mb_http_input.phpt
ext/mysqli/mysqli_api.c
ext/mysqli/mysqli_nonapi.c
ext/mysqli/tests/mysqli_query.phpt
ext/mysqli/tests/mysqli_stmt_attr_set.phpt
ext/pdo_odbc/pdo_odbc.c
ext/reflection/php_reflection.c
ext/reflection/tests/ReflectionParameter_invalidMethodInConstructor.phpt
ext/snmp/snmp.c
ext/snmp/tests/snmp-object-setSecurity_error.phpt
ext/snmp/tests/snmp3-error.phpt
ext/soap/soap.c
ext/sockets/sockets.c
ext/sockets/tests/socket_create_pair-wrongparams-win32.phpt
ext/sockets/tests/socket_create_pair-wrongparams.phpt
ext/standard/file.c
ext/standard/tests/file/flock.phpt
ext/standard/tests/file/flock_error.phpt
ext/zlib/tests/007.phpt
ext/zlib/tests/deflate_init_error.phpt
ext/zlib/tests/gzcompress_error1.phpt
ext/zlib/tests/gzdeflate_error1.phpt
ext/zlib/tests/gzencode_error1.phpt
ext/zlib/zlib.c
sapi/phpdbg/phpdbg.c

index 0a185ef27294f1b6686d92a33f67d0ac66d328d6..a6dca8c874bf7dc8595ee5b6f5425bdef99c322c 100644 (file)
@@ -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();
        }
 }
index 336243d64ba75546eb0bf1cbd0ac5fdf14d124ac..13ed76fff15f3b308d94ae28378a1e92143aa380 100644 (file)
@@ -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
index 03c387975e0b9e5c1ff3410b49482fd01e47ce16..3f5476f6c32f032aa943dbbb66074f2ef4a36337 100644 (file)
@@ -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
index d425b83109a11ea8fef182d72ebfa4d61ceab58b..6f1ab3cf42b112e0929bba0c600f72987d52e68f 100644 (file)
@@ -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();
        }
 
index 8706381e588258b417c8b34c8c4aeeaf0870e889..e987c176e1a79875f3f0e0b16c19fca1a34e35e8 100644 (file)
@@ -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();
        }
 
index 5b0f36e4f0872fb8fa8630993c27f9ddf1d4d3e2..9896cea79fd8483f4c6bf1410cfd092d46780652 100644 (file)
@@ -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
index 03926e5a0794f7f53f9a6a20405c9fb2ec65d4eb..a50882486ad0ba13d1eb68d495adfdc63f6c13bf 100644 (file)
@@ -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();
                                        }
 
index 274feec35ef5bc2b9ee488c80d72cd0d6f18fdc6..ba992af930be68374d8797bba9981045c938bfa9 100644 (file)
@@ -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();
        }
 
index cd278ae52fff89973a6a122164a8c1e6349fa544..50653687aacd763be83f6e6bcc4b6e702e51623e 100644 (file)
@@ -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
index e6bb0528ec428e09025795a2f8dfebbcbbf71445..d1fba60f3ff49873fe67249dc3b680644821e9c6 100644 (file)
@@ -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"
index 2263c75434e34cb93795b67af6df9bc341bf0e95..928031f82e78d4327f4a9d457425a95eecf86bbe 100644 (file)
@@ -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();
                }
index 85c08c5b2f7da7bc0355ae28a6854863eb3c50e4..5bbb1d38888cd191363e5c98d69b7b786763a33d 100644 (file)
@@ -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
index 90fc24cf9c852963d041ac7abdc10203b7310a5e..e2f6de3995dfe3add23115d0f3530cbb8b4608d3 100644 (file)
@@ -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!
index 16d789f37f7fd0352bfc206d0000bea9cd720430..40018305caafdbf82f463e140709a295c1ede489 100644 (file)
@@ -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!
index d0c2f913ff9aa8988dca71971c2b2087aaf20049..21654d4062782ae9efea58b7ad41eff53cfb9def 100644 (file)
@@ -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;
        }
 
index 292e1901e4da9c342dede788cf6e2491acb447c2..470b52e6c7b5b340f9b5e5297aabbde3a0b1da7f 100644 (file)
@@ -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();
        }
 
index 917f079fd9049615efbeefd367d54d43aabfe5fe..aa88c45449e75c3e51540b002348f104e340e5d4 100644 (file)
@@ -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.
index 5eb8d0b33870d58b568df4a45587a0254bf65399..0ca49fc208cd229c2c893babe97ea898359d7e6d 100644 (file)
@@ -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);
        }
index b0bf03bd3d5e2153434abdca9c6ce11021eb691b..7d5f1912daee50f61e512473aa977c223537f688 100644 (file)
@@ -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)
index 7c07d13fa957fa3634eec7767036ce5d31c536f6..20b4ede70e50d95a563d4b9728421365dd85e2f7 100644 (file)
@@ -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)
index 446436db5f87c7f164df8bf7bac313af02b9c2d2..b79a6f531cdb9e995dde1690fbfd72518eba8068 100644 (file)
@@ -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();
                }
        }
index 21c107adecfc7b70365b5104e81ab10db63cc4d5..729477ab59f3ecbf5b464886d26845cb61cb985a 100644 (file)
@@ -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();
index 1abab2a1e775c3c18601b250a73228122b1ed892..ff4dd5de064eabdcd15cdd81133c5dc94eaf8d9b 100644 (file)
@@ -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
index 8dc56d1e366ad3613407bd1a70bb3146810e6644..57111c83f19014373653b1045cb67b2eedfd2617 100644 (file)
@@ -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
index 224e69ffdd553ea2a3580c87f51263b15ea2abff..458b66432b9fe1186dc13c1162f21e40e480532a 100644 (file)
@@ -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();
        }
 
index 68e0f3fd309b89a4b615e64809a207428be9c781..346029c7cab271c8f832cb64c651291e3b4e1439 100644 (file)
@@ -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
index 52dd5179bede8ee40cda22783443f4d2c9949685..add22959816dc7a935c9150662e14b896903a8f2 100644 (file)
@@ -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 ---
index b9255557ff08ec085fa2bed2bd7a57a280e9bf31..6783b44f4d922de780847bcf1e3066e29433041f 100644 (file)
@@ -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"
index b31a16be9accf48275f39990df514739fa1f7b58..104d8552e3cfbbb2f2c28bce0294eb34d35a972a 100644 (file)
@@ -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
index ff09d6568affc6c976ac7a149f3710943ed5e710..e740de6d0c870112c46a69f9e62f45a23151d83f 100644 (file)
@@ -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
index fea4dfec002a7a12049ceb98a1b873395d084711..5081f66dc4d17f925b7a4a2248347fc9164051a9 100644 (file)
@@ -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
index 951437b98a085d758acf6729df7ac670f954cf15..00d70f93982b8c11bd4cd46c47eace44e8a2309e 100644 (file)
@@ -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
index 6ddda3d7a2649be1cfd63414ed76d92e62501b1d..eab3b02ca575bd6e12d49d804d1ff11b43e49046 100644 (file)
@@ -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();
        }
 
index 54d06a84c7703be81ea83d1611c05b77f1137624..efd2270601ef8ba19f24947e3bebafbeb2c39bf6 100644 (file)
@@ -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");
        }
 } /* }}} */