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
1 change: 0 additions & 1 deletion ext/intl/spoofchecker/spoofchecker_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ PHP_METHOD(Spoofchecker, setChecks)
/* }}} */

#if U_ICU_VERSION_MAJOR_NUM >= 58
/* TODO Document this method on PHP.net */
/* {{{ Set the loosest restriction level allowed for strings. */
PHP_METHOD(Spoofchecker, setRestrictionLevel)
{
Expand Down
2 changes: 0 additions & 2 deletions ext/standard/array.c
Original file line number Diff line number Diff line change
Expand Up @@ -3869,7 +3869,6 @@ static inline Bucket* find_bucket_at_offset(HashTable* ht, zend_long offset)
ZEND_ASSERT(offset >= 0 && offset <= ht->nNumOfElements);
if (HT_IS_WITHOUT_HOLES(ht)) {
/* There's no need to iterate over the array to filter out holes if there are no holes */
/* This properly handles both packed and unpacked arrays. */
return ht->arData + offset;
}
/* Otherwise, this code has to iterate over the HashTable and skip holes in the array. */
Expand All @@ -3896,7 +3895,6 @@ static inline zval* find_packed_val_at_offset(HashTable* ht, zend_long offset)
ZEND_ASSERT(offset >= 0 && offset <= ht->nNumOfElements);
if (HT_IS_WITHOUT_HOLES(ht)) {
/* There's no need to iterate over the array to filter out holes if there are no holes */
/* This properly handles both packed and unpacked arrays. */
return ht->arPacked + offset;
}
/* Otherwise, this code has to iterate over the HashTable and skip holes in the array. */
Expand Down
14 changes: 9 additions & 5 deletions main/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ PHPAPI char *php_get_version(sapi_module_struct *sapi_module)
{
smart_string version_info = {0};
smart_string_append_printf(&version_info,
"PHP %s (%s) (built: %s) (%s)\n",
PHP_VERSION, sapi_module->name, php_build_date,
"PHP " PHP_VERSION " (%s) (built: %s) (%s)\n",
sapi_module->name, php_build_date,
#ifdef ZTS
"ZTS"
#else
Expand All @@ -148,8 +148,12 @@ PHPAPI char *php_get_version(sapi_module_struct *sapi_module)
#endif
);
smart_string_appends(&version_info, "Copyright (c) The PHP Group\n");
if (php_build_provider()) {
smart_string_append_printf(&version_info, "Built by %s\n", php_build_provider());

const char *build_provider = php_build_provider();
if (build_provider) {
smart_string_appends(&version_info, "Built by ");
smart_string_appends(&version_info, build_provider);
smart_string_appendc(&version_info, '\n');
}
smart_string_appends(&version_info, get_zend_version());
smart_string_0(&version_info);
Expand All @@ -160,7 +164,7 @@ PHPAPI char *php_get_version(sapi_module_struct *sapi_module)
PHPAPI void php_print_version(sapi_module_struct *sapi_module)
{
char *version_info = php_get_version(sapi_module);
php_printf("%s", version_info);
PHPWRITE(version_info, strlen(version_info));
efree(version_info);
}

Expand Down