Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ PHP NEWS
- Soap:
. Soap::__setCookie() when cookie name is a digit is now not stored and
represented as a string anymore but a int. (David Carlier)
. Fixed bug GH-21421 (SoapClient typemap property breaks engine assumptions).
(ndossche)

- Sockets:
. Added the TCP_USER_TIMEOUT constant for Linux to set the maximum time in
Expand Down
2 changes: 0 additions & 2 deletions ext/bz2/bz2.c
Original file line number Diff line number Diff line change
Expand Up @@ -594,10 +594,8 @@ static void php_bz2_error(INTERNAL_FUNCTION_PARAMETERS, int opt)
switch (opt) {
case PHP_BZ_ERRNO:
RETURN_LONG(errnum);
break;
case PHP_BZ_ERRSTR:
RETURN_STRING((char*)errstr);
break;
case PHP_BZ_ERRBOTH:
array_init(return_value);

Expand Down
3 changes: 0 additions & 3 deletions ext/calendar/calendar.c
Original file line number Diff line number Diff line change
Expand Up @@ -574,14 +574,11 @@ PHP_FUNCTION(jddayofweek)
switch (mode) {
case CAL_DOW_LONG:
RETURN_STRING(daynamel);
break;
case CAL_DOW_SHORT:
RETURN_STRING(daynames);
break;
case CAL_DOW_DAYNO:
default:
RETURN_LONG(day);
break;
}
}
/* }}} */
Expand Down
4 changes: 0 additions & 4 deletions ext/date/php_date.c
Original file line number Diff line number Diff line change
Expand Up @@ -4266,10 +4266,8 @@ PHP_FUNCTION(timezone_offset_get)
break;
case TIMELIB_ZONETYPE_OFFSET:
RETURN_LONG(tzobj->tzi.utc_offset);
break;
case TIMELIB_ZONETYPE_ABBR:
RETURN_LONG(tzobj->tzi.z.utc_offset + (tzobj->tzi.z.dst * 3600));
break;
}
}
/* }}} */
Expand Down Expand Up @@ -5545,10 +5543,8 @@ static void php_do_date_sunrise_sunset(INTERNAL_FUNCTION_PARAMETERS, bool calc_s
case SUNFUNCS_RET_STRING:
retstr = strpprintf(0, "%02d:%02d", (int) N, (int) (60 * (N - (int) N)));
RETURN_NEW_STR(retstr);
break;
case SUNFUNCS_RET_DOUBLE:
RETURN_DOUBLE(N);
break;
}
}
/* }}} */
Expand Down
2 changes: 0 additions & 2 deletions ext/enchant/enchant.c
Original file line number Diff line number Diff line change
Expand Up @@ -346,12 +346,10 @@ PHP_FUNCTION(enchant_broker_set_dict_path)
case PHP_ENCHANT_MYSPELL:
enchant_broker_set_param(pbroker->pbroker, "enchant.myspell.dictionary.path", value);
RETURN_TRUE;
break;

case PHP_ENCHANT_ISPELL:
enchant_broker_set_param(pbroker->pbroker, "enchant.ispell.dictionary.path", value);
RETURN_TRUE;
break;

default:
RETURN_FALSE;
Expand Down
1 change: 0 additions & 1 deletion ext/exif/exif.c
Original file line number Diff line number Diff line change
Expand Up @@ -4026,7 +4026,6 @@ static bool exif_scan_thumbnail(image_info_type *ImageInfo)
case M_EOI:
exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_WARNING, "Could not compute size of thumbnail");
return false;
break;

default:
/* just skip */
Expand Down
3 changes: 0 additions & 3 deletions ext/ffi/ffi.c
Original file line number Diff line number Diff line change
Expand Up @@ -2086,7 +2086,6 @@ static HashTable *zend_ffi_cdata_get_debug_info(zend_object *obj, int *is_temp)
zend_hash_str_add(ht, "cdata", sizeof("cdata")-1, &tmp);
*is_temp = 1;
return ht;
break;
case ZEND_FFI_TYPE_POINTER:
if (*(void**)ptr == NULL) {
ZVAL_NULL(&tmp);
Expand Down Expand Up @@ -2141,7 +2140,6 @@ static HashTable *zend_ffi_cdata_get_debug_info(zend_object *obj, int *is_temp)
// TODO: function name ???
*is_temp = 1;
return ht;
break;
default:
ZEND_UNREACHABLE();
break;
Expand Down Expand Up @@ -7086,7 +7084,6 @@ static zend_result zend_ffi_nested_type(zend_ffi_type *type, zend_ffi_type *nest
nested_type->size = nested_type->array.length * ZEND_FFI_TYPE(nested_type->array.type)->size;
nested_type->align = ZEND_FFI_TYPE(nested_type->array.type)->align;
return SUCCESS;
break;
case ZEND_FFI_TYPE_FUNC:
/* "char" is used as a terminator of nested declaration */
if (nested_type->func.ret_type == &zend_ffi_type_char) {
Expand Down
4 changes: 0 additions & 4 deletions ext/gd/gd.c
Original file line number Diff line number Diff line change
Expand Up @@ -764,19 +764,15 @@ PHP_FUNCTION(imagecolormatch)
case -1:
zend_argument_value_error(1, "must be TrueColor");
RETURN_THROWS();
break;
case -2:
zend_argument_value_error(2, "must be Palette");
RETURN_THROWS();
break;
case -3:
zend_argument_value_error(2, "must be the same size as argument #1 ($im1)");
RETURN_THROWS();
break;
case -4:
zend_argument_value_error(2, "must have at least one color");
RETURN_THROWS();
break;
}

RETURN_TRUE;
Expand Down
5 changes: 0 additions & 5 deletions ext/intl/normalizer/normalizer_normalize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,14 @@ static const UNormalizer2 *intl_get_normalizer(zend_long form, UErrorCode *err)
{
case NORMALIZER_FORM_C:
return unorm2_getNFCInstance(err);
break;
case NORMALIZER_FORM_D:
return unorm2_getNFDInstance(err);
break;
case NORMALIZER_FORM_KC:
return unorm2_getNFKCInstance(err);
break;
case NORMALIZER_FORM_KD:
return unorm2_getNFKDInstance(err);
break;
case NORMALIZER_FORM_KC_CF:
return unorm2_getNFKCCasefoldInstance(err);
break;
}

*err = U_ILLEGAL_ARGUMENT_ERROR;
Expand Down
1 change: 0 additions & 1 deletion ext/odbc/php_odbc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1667,7 +1667,6 @@ PHP_FUNCTION(odbc_result)
}
ZSTR_VAL(field_str)[ZSTR_LEN(field_str)] = '\0';
RETURN_NEW_STR(field_str);
break;

default:
if (result->values[field_ind].vallen == SQL_NULL_DATA) {
Expand Down
2 changes: 0 additions & 2 deletions ext/opcache/ZendAccelerator.c
Original file line number Diff line number Diff line change
Expand Up @@ -3323,15 +3323,13 @@ static zend_result accel_post_startup(void)
accel_startup_ok = false;
zend_accel_error_noreturn(ACCEL_LOG_FATAL, "Failure to initialize shared memory structures - cannot reattach to exiting shared memory.");
return SUCCESS;
break;
#if ENABLE_FILE_CACHE_FALLBACK
case ALLOC_FALLBACK:
zend_shared_alloc_lock();
file_cache_only = true;
fallback_process = true;
zend_shared_alloc_unlock();
goto file_cache_fallback;
break;
#endif
}

Expand Down
10 changes: 0 additions & 10 deletions ext/openssl/openssl_backend_v1.c
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,6 @@ const EVP_MD *php_openssl_get_evp_md_from_algo(zend_long algo)
#endif
default:
return NULL;
break;
}
return mdtype;
}
Expand All @@ -653,40 +652,31 @@ const EVP_CIPHER *php_openssl_get_evp_cipher_from_algo(zend_long algo)
#ifndef OPENSSL_NO_RC2
case PHP_OPENSSL_CIPHER_RC2_40:
return EVP_rc2_40_cbc();
break;
case PHP_OPENSSL_CIPHER_RC2_64:
return EVP_rc2_64_cbc();
break;
case PHP_OPENSSL_CIPHER_RC2_128:
return EVP_rc2_cbc();
break;
#endif

#ifndef OPENSSL_NO_DES
case PHP_OPENSSL_CIPHER_DES:
return EVP_des_cbc();
break;
case PHP_OPENSSL_CIPHER_3DES:
return EVP_des_ede3_cbc();
break;
#endif

#ifndef OPENSSL_NO_AES
case PHP_OPENSSL_CIPHER_AES_128_CBC:
return EVP_aes_128_cbc();
break;
case PHP_OPENSSL_CIPHER_AES_192_CBC:
return EVP_aes_192_cbc();
break;
case PHP_OPENSSL_CIPHER_AES_256_CBC:
return EVP_aes_256_cbc();
break;
#endif


default:
return NULL;
break;
}
}

Expand Down
2 changes: 0 additions & 2 deletions ext/openssl/xp_ssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -2511,11 +2511,9 @@ static int php_openssl_sockop_set_option(php_stream *stream, int option, int val
case STREAM_XPORT_CRYPTO_OP_SETUP:
cparam->outputs.returncode = php_openssl_setup_crypto(stream, sslsock, cparam);
return PHP_STREAM_OPTION_RETURN_OK;
break;
case STREAM_XPORT_CRYPTO_OP_ENABLE:
cparam->outputs.returncode = php_openssl_enable_crypto(stream, sslsock, cparam);
return PHP_STREAM_OPTION_RETURN_OK;
break;
default:
/* fall through */
break;
Expand Down
1 change: 0 additions & 1 deletion ext/pcntl/pcntl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1481,7 +1481,6 @@ PHP_FUNCTION(pcntl_unshare)
case EINVAL:
zend_argument_value_error(1, "must be a combination of CLONE_* flags, or at least one flag is unsupported by the kernel");
RETURN_THROWS();
break;
#endif
#ifdef ENOMEM
case ENOMEM:
Expand Down
1 change: 0 additions & 1 deletion ext/pdo_firebird/firebird_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,6 @@ static int php_firebird_preprocess(const zend_string* sql, char* sql_out, HashTa
case ttNone:
/* Execute statement preprocess SQL error */
return 0;
break;
}
}
return 1;
Expand Down
10 changes: 0 additions & 10 deletions ext/pgsql/pgsql.c
Original file line number Diff line number Diff line change
Expand Up @@ -1212,7 +1212,6 @@ PHP_FUNCTION(pg_query)
PHP_PQ_ERROR("Query failed: %s", pgsql);
PQclear(pgsql_result);
RETURN_FALSE;
break;
case PGRES_COMMAND_OK: /* successful command that did not return rows */
default:
if (pgsql_result) {
Expand Down Expand Up @@ -1351,7 +1350,6 @@ PHP_FUNCTION(pg_query_params)
PHP_PQ_ERROR("Query failed: %s", pgsql);
PQclear(pgsql_result);
RETURN_FALSE;
break;
case PGRES_COMMAND_OK: /* successful command that did not return rows */
default:
if (pgsql_result) {
Expand Down Expand Up @@ -1437,7 +1435,6 @@ PHP_FUNCTION(pg_prepare)
PHP_PQ_ERROR("Query failed: %s", pgsql);
PQclear(pgsql_result);
RETURN_FALSE;
break;
case PGRES_COMMAND_OK: /* successful command that did not return rows */
default:
if (pgsql_result) {
Expand Down Expand Up @@ -1536,7 +1533,6 @@ PHP_FUNCTION(pg_execute)
PHP_PQ_ERROR("Query failed: %s", pgsql);
PQclear(pgsql_result);
RETURN_FALSE;
break;
case PGRES_COMMAND_OK: /* successful command that did not return rows */
default:
if (pgsql_result) {
Expand Down Expand Up @@ -1648,7 +1644,6 @@ PHP_FUNCTION(pg_last_notice)
zend_hash_clean(notices);
}
RETURN_TRUE;
break;
default:
zend_argument_value_error(2, "must be one of PGSQL_NOTICE_LAST, PGSQL_NOTICE_ALL, or PGSQL_NOTICE_CLEAR");
RETURN_THROWS();
Expand Down Expand Up @@ -3401,7 +3396,6 @@ PHP_FUNCTION(pg_copy_to)
case -2:
PHP_PQ_ERROR("getline failed: %s", pgsql);
RETURN_FALSE;
break;
default:
add_next_index_string(return_value, csv);
PQfreemem(csv);
Expand All @@ -3420,7 +3414,6 @@ PHP_FUNCTION(pg_copy_to)
PQclear(pgsql_result);
PHP_PQ_ERROR("Copy command failed: %s", pgsql);
RETURN_FALSE;
break;
}
}
/* }}} */
Expand Down Expand Up @@ -3551,12 +3544,10 @@ PHP_FUNCTION(pg_copy_from)
RETURN_FALSE;
}
RETURN_TRUE;
break;
default:
PQclear(pgsql_result);
PHP_PQ_ERROR("Copy command failed: %s", pgsql);
RETURN_FALSE;
break;
}
}
/* }}} */
Expand Down Expand Up @@ -5793,7 +5784,6 @@ PHP_FUNCTION(pg_insert)
PHP_PQ_ERROR("Query failed: %s", pg_link);
PQclear(pg_result);
RETURN_FALSE;
break;
case PGRES_COMMAND_OK: /* successful command that did not return rows */
default:
if (pg_result) {
Expand Down
1 change: 0 additions & 1 deletion ext/session/session.c
Original file line number Diff line number Diff line change
Expand Up @@ -1652,7 +1652,6 @@ PHPAPI zend_result php_session_start(void)
case php_session_active:
php_session_session_already_started_error(E_NOTICE, "Ignoring session_start() because a session has already been started");
return FAILURE;
break;

case php_session_disabled: {
const char *value = zend_ini_string(ZEND_STRL("session.save_handler"), false);
Expand Down
57 changes: 28 additions & 29 deletions ext/soap/php_soap.h
Original file line number Diff line number Diff line change
Expand Up @@ -226,35 +226,34 @@ static zend_always_inline zval *php_soap_deref(zval *zv) {
#define Z_CLIENT_TRACE_P(zv) OBJ_PROP_NUM(Z_OBJ_P(zv), 4)
#define Z_CLIENT_COMPRESSION_P(zv) OBJ_PROP_NUM(Z_OBJ_P(zv), 5)
#define Z_CLIENT_SDL_P(zv) OBJ_PROP_NUM(Z_OBJ_P(zv), 6)
#define Z_CLIENT_TYPEMAP_P(zv) OBJ_PROP_NUM(Z_OBJ_P(zv), 7)
#define Z_CLIENT_HTTPSOCKET_P(zv) OBJ_PROP_NUM(Z_OBJ_P(zv), 8)
#define Z_CLIENT_HTTPURL_P(zv) OBJ_PROP_NUM(Z_OBJ_P(zv), 9)
#define Z_CLIENT_LOGIN_P(zv) OBJ_PROP_NUM(Z_OBJ_P(zv), 10)
#define Z_CLIENT_PASSWORD_P(zv) OBJ_PROP_NUM(Z_OBJ_P(zv), 11)
#define Z_CLIENT_USE_DIGEST_P(zv) OBJ_PROP_NUM(Z_OBJ_P(zv), 12)
#define Z_CLIENT_DIGEST_P(zv) OBJ_PROP_NUM(Z_OBJ_P(zv), 13)
#define Z_CLIENT_PROXY_HOST_P(zv) OBJ_PROP_NUM(Z_OBJ_P(zv), 14)
#define Z_CLIENT_PROXY_PORT_P(zv) OBJ_PROP_NUM(Z_OBJ_P(zv), 15)
#define Z_CLIENT_PROXY_LOGIN_P(zv) OBJ_PROP_NUM(Z_OBJ_P(zv), 16)
#define Z_CLIENT_PROXY_PASSWORD_P(zv) OBJ_PROP_NUM(Z_OBJ_P(zv), 17)
#define Z_CLIENT_EXCEPTIONS_P(zv) OBJ_PROP_NUM(Z_OBJ_P(zv), 18)
#define Z_CLIENT_ENCODING_P(zv) OBJ_PROP_NUM(Z_OBJ_P(zv), 19)
#define Z_CLIENT_CLASSMAP_P(zv) OBJ_PROP_NUM(Z_OBJ_P(zv), 20)
#define Z_CLIENT_FEATURES_P(zv) OBJ_PROP_NUM(Z_OBJ_P(zv), 21)
#define Z_CLIENT_CONNECTION_TIMEOUT_P(zv) OBJ_PROP_NUM(Z_OBJ_P(zv), 22)
#define Z_CLIENT_STREAM_CONTEXT_P(zv) OBJ_PROP_NUM(Z_OBJ_P(zv), 23)
#define Z_CLIENT_USER_AGENT_P(zv) OBJ_PROP_NUM(Z_OBJ_P(zv), 24)
#define Z_CLIENT_KEEP_ALIVE_P(zv) OBJ_PROP_NUM(Z_OBJ_P(zv), 25)
#define Z_CLIENT_SSL_METHOD_P(zv) OBJ_PROP_NUM(Z_OBJ_P(zv), 26)
#define Z_CLIENT_SOAP_VERSION_P(zv) OBJ_PROP_NUM(Z_OBJ_P(zv), 27)
#define Z_CLIENT_USE_PROXY_P(zv) OBJ_PROP_NUM(Z_OBJ_P(zv), 28)
#define Z_CLIENT_COOKIES_P(zv) OBJ_PROP_NUM(Z_OBJ_P(zv), 29)
#define Z_CLIENT_DEFAULT_HEADERS_P(zv) OBJ_PROP_NUM(Z_OBJ_P(zv), 30)
#define Z_CLIENT_SOAP_FAULT_P(zv) OBJ_PROP_NUM(Z_OBJ_P(zv), 31)
#define Z_CLIENT_LAST_REQUEST_P(zv) OBJ_PROP_NUM(Z_OBJ_P(zv), 32)
#define Z_CLIENT_LAST_RESPONSE_P(zv) OBJ_PROP_NUM(Z_OBJ_P(zv), 33)
#define Z_CLIENT_LAST_REQUEST_HEADERS_P(zv) OBJ_PROP_NUM(Z_OBJ_P(zv), 34)
#define Z_CLIENT_LAST_RESPONSE_HEADERS_P(zv) OBJ_PROP_NUM(Z_OBJ_P(zv), 35)
#define Z_CLIENT_HTTPSOCKET_P(zv) OBJ_PROP_NUM(Z_OBJ_P(zv), 7)
#define Z_CLIENT_HTTPURL_P(zv) OBJ_PROP_NUM(Z_OBJ_P(zv), 8)
#define Z_CLIENT_LOGIN_P(zv) OBJ_PROP_NUM(Z_OBJ_P(zv), 9)
#define Z_CLIENT_PASSWORD_P(zv) OBJ_PROP_NUM(Z_OBJ_P(zv), 10)
#define Z_CLIENT_USE_DIGEST_P(zv) OBJ_PROP_NUM(Z_OBJ_P(zv), 11)
#define Z_CLIENT_DIGEST_P(zv) OBJ_PROP_NUM(Z_OBJ_P(zv), 12)
#define Z_CLIENT_PROXY_HOST_P(zv) OBJ_PROP_NUM(Z_OBJ_P(zv), 13)
#define Z_CLIENT_PROXY_PORT_P(zv) OBJ_PROP_NUM(Z_OBJ_P(zv), 14)
#define Z_CLIENT_PROXY_LOGIN_P(zv) OBJ_PROP_NUM(Z_OBJ_P(zv), 15)
#define Z_CLIENT_PROXY_PASSWORD_P(zv) OBJ_PROP_NUM(Z_OBJ_P(zv), 16)
#define Z_CLIENT_EXCEPTIONS_P(zv) OBJ_PROP_NUM(Z_OBJ_P(zv), 17)
#define Z_CLIENT_ENCODING_P(zv) OBJ_PROP_NUM(Z_OBJ_P(zv), 18)
#define Z_CLIENT_CLASSMAP_P(zv) OBJ_PROP_NUM(Z_OBJ_P(zv), 19)
#define Z_CLIENT_FEATURES_P(zv) OBJ_PROP_NUM(Z_OBJ_P(zv), 20)
#define Z_CLIENT_CONNECTION_TIMEOUT_P(zv) OBJ_PROP_NUM(Z_OBJ_P(zv), 21)
#define Z_CLIENT_STREAM_CONTEXT_P(zv) OBJ_PROP_NUM(Z_OBJ_P(zv), 22)
#define Z_CLIENT_USER_AGENT_P(zv) OBJ_PROP_NUM(Z_OBJ_P(zv), 23)
#define Z_CLIENT_KEEP_ALIVE_P(zv) OBJ_PROP_NUM(Z_OBJ_P(zv), 24)
#define Z_CLIENT_SSL_METHOD_P(zv) OBJ_PROP_NUM(Z_OBJ_P(zv), 25)
#define Z_CLIENT_SOAP_VERSION_P(zv) OBJ_PROP_NUM(Z_OBJ_P(zv), 26)
#define Z_CLIENT_USE_PROXY_P(zv) OBJ_PROP_NUM(Z_OBJ_P(zv), 27)
#define Z_CLIENT_COOKIES_P(zv) OBJ_PROP_NUM(Z_OBJ_P(zv), 28)
#define Z_CLIENT_DEFAULT_HEADERS_P(zv) OBJ_PROP_NUM(Z_OBJ_P(zv), 29)
#define Z_CLIENT_SOAP_FAULT_P(zv) OBJ_PROP_NUM(Z_OBJ_P(zv), 30)
#define Z_CLIENT_LAST_REQUEST_P(zv) OBJ_PROP_NUM(Z_OBJ_P(zv), 31)
#define Z_CLIENT_LAST_RESPONSE_P(zv) OBJ_PROP_NUM(Z_OBJ_P(zv), 32)
#define Z_CLIENT_LAST_REQUEST_HEADERS_P(zv) OBJ_PROP_NUM(Z_OBJ_P(zv), 33)
#define Z_CLIENT_LAST_RESPONSE_HEADERS_P(zv) OBJ_PROP_NUM(Z_OBJ_P(zv), 34)

typedef struct soap_url_object {
php_uri *uri;
Expand Down
Loading
Loading