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 @@ -154,6 +154,8 @@ PHP NEWS
(David Carlier)
. Passing an invalid flag value to the second argument of scandir() will now
throw a ValueError. (alexandre-daubois)
. array_change_key_case() now raises a ValueError when an invalid $case
argument value is passed. (Girgias)

- Streams:
. Added so_keepalive, tcp_keepidle, tcp_keepintvl and tcp_keepcnt stream
Expand Down
76 changes: 38 additions & 38 deletions UPGRADING
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,29 @@ PHP 8.6 UPGRADE NOTES
1. Backward Incompatible Changes
========================================

- GD:
. imagesetstyle(), imagefilter() and imagecrop() filter their
array arguments types/values and raise a TypeError/ValueError
accordingly.

- PCNTL:
. pcntl_alarm() now raises a ValueError if the seconds argument is
lower than zero or greater than platform's UINT_MAX.

- PCRE:
. preg_grep() now returns false instead of a partial array when a PCRE
execution error occurs (e.g. malformed UTF-8 input with the /u modifier).
This is consistent with other preg_* functions.

- Phar:
. Invalid values now throw in Phar::mungServer() instead of being silently
ignored.
. Phar::mungServer() now raises a ValueError when an invalid
argument value is passed instead of being silently ignored.

- Posix:
. posix_access() now raises a ValueError when an invalid $flags
argument value is passed.
. posix_mkfifo() now raises a ValueError when an invalid $permissions
argument value is passed.

- Session:
. A ValueError is not thrown if $name is a string containing null bytes in
Expand All @@ -45,10 +60,21 @@ PHP 8.6 UPGRADE NOTES
logic in their updateTimestamp() method.

- Standard:
. Invalid mode values now throw in array_filter() instead of being silently
defaulted to 0.
. Form feed (\f) is now added in the default trimmed characters of trim(),
rtrim() and ltrim(). RFC: https://wiki.php.net/rfc/trim_form_feed
. array_filter() now raises a ValueError when an invalid $mode
argument value is passed.
. array_change_key_case() now raises a ValueError when an invalid $case
argument value is passed.
. pathinfo() now raises a ValueError when an invalid $flag
argument value is passed.
. scandir() now raises a ValueError when an invalid $sorting_order
argument value is passed.

- Zip:
. ZipArchive::extractTo now raises a TypeError for the
files argument if one or more of the entries is not
a string.

========================================
2. New Features
Expand Down Expand Up @@ -103,11 +129,6 @@ PHP 8.6 UPGRADE NOTES
5. Changed Functions
========================================

- GD:
. imagesetstyle(), imagefilter() and imagecrop() filter their
array arguments types/values and raise a TypeError/ValueError
accordingly.

- mysqli:
. The return structure of mysqli_get_charset() no longer contains
the undocumented "comment" element. The value of "charsetnr" is
Expand All @@ -118,35 +139,14 @@ PHP 8.6 UPGRADE NOTES
. Output of openssl_x509_parse() contains criticalExtensions listing all
critical certificate extensions.

- PCNTL:
. pcntl_alarm() now throws a ValueError if the seconds argument is
lower than zero or greater than platform's UINT_MAX.

- Phar:
. Phar::mungServer() now supports reference values.

- Posix:
. posix_access() now throws a ValueError exception if the flags
argument is invalid.
. posix_mkfifo() now throws a ValueError exception if the permissions
argument is invalid.

- Sockets:
. socket_addrinfo_lookup() now has an additional optional argument $error
when not null, and on failure, gives the error code (one of the EAI_*
constants).

- Standard:
. pathinfo() now raises a ValueError when an invalid $flag argument
value is passed.
. scandir() now raises a ValueError when an invalid $sorting_order
argument value is passed.

- Zip:
. ZipArchive::extractTo now raises a TypeError for the
files argument if one or more of the entries is not
a string.

========================================
6. New Functions
========================================
Expand Down Expand Up @@ -222,12 +222,19 @@ PHP 8.6 UPGRADE NOTES
. EAI_IDN_ENCODE.

- Standard
. ARRAY_FILTER_USE_KEY.
. ARRAY_FILTER_USE_VALUE.

========================================
11. Changes to INI File Handling
========================================

- Mbstring:
. The mbstring.detect_order INI directive now updates the internal detection
order when changed at runtime via ini_set(). Previously, runtime changes
using ini_set() did not take effect for mb_detect_order(). Setting the
directive to NULL or an empty string at runtime now leaves the previously
configured detection order unchanged.

- Mysqli:
. mysqli.default_port now checks the validity of the value which should be
between 0 and 65535 included.
Expand All @@ -237,13 +244,6 @@ PHP 8.6 UPGRADE NOTES
When used along with ZEND_JIT_DEBUG_TRACE_EXIT_INFO, the source of exit
points is printed in exit info output, in debug builds.

- Mbstring:
. The mbstring.detect_order INI directive now updates the internal detection
order when changed at runtime via ini_set(). Previously, runtime changes
using ini_set() did not take effect for mb_detect_order(). Setting the
directive to NULL or an empty string at runtime now leaves the previously
configured detection order unchanged.

========================================
12. Windows Support
========================================
Expand Down
10 changes: 5 additions & 5 deletions ext/sqlite3/sqlite3.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ ZEND_DECLARE_MODULE_GLOBALS(sqlite3)
static PHP_GINIT_FUNCTION(sqlite3);
static int php_sqlite3_authorizer(void *autharg, int action, const char *arg1, const char *arg2, const char *arg3, const char *arg4);
static void sqlite3_param_dtor(zval *data);
static int php_sqlite3_compare_stmt_free(php_sqlite3_stmt **stmt_obj_ptr, sqlite3_stmt *statement);
static int php_sqlite3_compare_stmt_free(php_sqlite3_stmt **stmt_obj_ptr, php_sqlite3_stmt *statement);
static zend_always_inline void php_sqlite3_fetch_one(int n_cols, php_sqlite3_result *result_obj, zend_long mode, zval *result);

#define SQLITE3_CHECK_INITIALIZED(db_obj, member, class_name) \
Expand Down Expand Up @@ -2120,7 +2120,7 @@ PHP_METHOD(SQLite3Result, finalize)

/* We need to finalize an internal statement */
if (!result_obj->is_prepared_statement) {
zend_llist_del_element(&(result_obj->db_obj->free_list), &result_obj->stmt_obj,
zend_llist_del_element(&(result_obj->db_obj->free_list), result_obj->stmt_obj,
(int (*)(void *, void *)) php_sqlite3_compare_stmt_free);
} else {
sqlite3_reset(result_obj->stmt_obj->stmt);
Expand Down Expand Up @@ -2235,9 +2235,9 @@ static void php_sqlite3_free_list_dtor(void **item)
}
/* }}} */

static int php_sqlite3_compare_stmt_free(php_sqlite3_stmt **stmt_obj_ptr, sqlite3_stmt *statement ) /* {{{ */
static int php_sqlite3_compare_stmt_free(php_sqlite3_stmt **stmt_obj_ptr, php_sqlite3_stmt *statement ) /* {{{ */
{
return ((*stmt_obj_ptr)->initialised && statement == (*stmt_obj_ptr)->stmt);
return ((*stmt_obj_ptr)->initialised && statement == *stmt_obj_ptr);
}
/* }}} */

Expand Down Expand Up @@ -2351,7 +2351,7 @@ static void php_sqlite3_stmt_object_free_storage(zend_object *object) /* {{{ */
}

if (intern->initialised) {
zend_llist_del_element(&(intern->db_obj->free_list), intern->stmt,
zend_llist_del_element(&(intern->db_obj->free_list), intern,
(int (*)(void *, void *)) php_sqlite3_compare_stmt_free);
}

Expand Down
2 changes: 1 addition & 1 deletion ext/standard/basic_functions.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -1879,7 +1879,7 @@ function array_product(array $array): int|float {}

function array_reduce(array $array, callable $callback, mixed $initial = null): mixed {}

function array_filter(array $array, ?callable $callback = null, int $mode = ARRAY_FILTER_USE_KEY): array {}
function array_filter(array $array, ?callable $callback = null, int $mode = ARRAY_FILTER_USE_VALUE): array {}

function array_find(array $array, callable $callback): mixed {}

Expand Down
4 changes: 2 additions & 2 deletions ext/standard/basic_functions_arginfo.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions ext/standard/basic_functions_decl.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.