]> granicus.if.org Git - php/log
php
4 years agoInline a ZEND_NUM_ARGS() variable
Nikita Popov [Mon, 6 Apr 2020 09:41:44 +0000 (11:41 +0200)]
Inline a ZEND_NUM_ARGS() variable

4 years agoClean up constructor handling in com_dotnet
Christoph M. Becker [Mon, 6 Apr 2020 08:51:10 +0000 (10:51 +0200)]
Clean up constructor handling in com_dotnet

We substitute the construction magic with standard constructors, move
the ZPP checks to the beginning of the ctors, and also let the function
entries be generated from the stubs.

4 years agoImprove some ValueError messages
Máté Kocsis [Wed, 1 Apr 2020 21:32:39 +0000 (23:32 +0200)]
Improve some ValueError messages

Closes GH-5340

4 years agoGenerate function entries for another batch of extensions
Máté Kocsis [Sun, 5 Apr 2020 19:15:30 +0000 (21:15 +0200)]
Generate function entries for another batch of extensions

Closes GH-5352

4 years agoAdd missing stub for xmlrpc_get_type()
Máté Kocsis [Sun, 5 Apr 2020 18:09:58 +0000 (20:09 +0200)]
Add missing stub for xmlrpc_get_type()

4 years agoPromote invalid case mode to ValueError in mb_case_converter
George Peter Banyard [Sun, 5 Apr 2020 01:33:08 +0000 (03:33 +0200)]
Promote invalid case mode to ValueError in mb_case_converter

Add assertions to check the return value is not NULL as this indicates a bug.
Add identical assertion to mb_strtoupper and mb_strtolower.
This means these functions can't return false anymore, ammend stubs accordingly.

4 years agomb_scrub() can't return false anymore
George Peter Banyard [Fri, 3 Apr 2020 17:20:26 +0000 (19:20 +0200)]
mb_scrub() can't return false anymore

Also drop the intermediary function which was only used here

4 years agoPromote some warnings to ValueError in mbstring
George Peter Banyard [Fri, 3 Apr 2020 17:14:42 +0000 (19:14 +0200)]
Promote some warnings to ValueError in mbstring

Promoted warnings are:
 * Empty encoding lists
 * Unknown language
 * Start and Width out of bound

4 years agoConvert some if blocks to assertions
George Peter Banyard [Fri, 3 Apr 2020 16:20:43 +0000 (18:20 +0200)]
Convert some if blocks to assertions

4 years agoGenerate functions entries from stubs for another set of extensions
Máté Kocsis [Sat, 4 Apr 2020 21:51:10 +0000 (23:51 +0200)]
Generate functions entries from stubs for another set of extensions

Closes GH-5351

4 years agoMove variable declaration closer to its usage
Máté Kocsis [Sat, 4 Apr 2020 22:03:08 +0000 (00:03 +0200)]
Move variable declaration closer to its usage

4 years agoImprove gen_stub.php
Máté Kocsis [Sat, 4 Apr 2020 19:26:46 +0000 (21:26 +0200)]
Improve gen_stub.php

Closes GH-5350
Add support for generating deprecated function entries, as well as forward declaration
of function aliases.

4 years agoGenerate function entries from stubs for a couple of extensions
Máté Kocsis [Sat, 4 Apr 2020 18:41:42 +0000 (20:41 +0200)]
Generate function entries from stubs for a couple of extensions

Closes GH-5347

4 years agoAnnotate function aliases in stubs
Máté Kocsis [Sat, 4 Apr 2020 11:03:16 +0000 (13:03 +0200)]
Annotate function aliases in stubs

4 years agoMerge branch 'PHP-7.4'
George Peter Banyard [Fri, 3 Apr 2020 20:23:03 +0000 (22:23 +0200)]
Merge branch 'PHP-7.4'

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
George Peter Banyard [Fri, 3 Apr 2020 20:10:56 +0000 (22:10 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

4 years agoWent to fast and forgot to update tests
George Peter Banyard [Fri, 3 Apr 2020 20:03:00 +0000 (22:03 +0200)]
Went to fast and forgot to update tests

However due to the really lax conversion to integer all strings pass as 0

4 years agoMerge branch 'PHP-7.4'
George Peter Banyard [Fri, 3 Apr 2020 19:30:35 +0000 (21:30 +0200)]
Merge branch 'PHP-7.4'

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
George Peter Banyard [Fri, 3 Apr 2020 19:28:07 +0000 (21:28 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

4 years agoFix Bug #79448 0 is a valid Unicode codepoint, but mb_substitute_character(0) fails
George Peter Banyard [Fri, 3 Apr 2020 19:16:04 +0000 (21:16 +0200)]
Fix Bug #79448 0 is a valid Unicode codepoint, but mb_substitute_character(0) fails

4 years agoFix stub for zend_terminate_string()
Nikita Popov [Fri, 3 Apr 2020 16:21:40 +0000 (18:21 +0200)]
Fix stub for zend_terminate_string()

4 years agoVerify that all stubs have a return type
Nikita Popov [Fri, 3 Apr 2020 14:49:11 +0000 (16:49 +0200)]
Verify that all stubs have a return type

4 years agoStubs: Store information per-class
Nikita Popov [Fri, 3 Apr 2020 14:18:47 +0000 (16:18 +0200)]
Stubs: Store information per-class

We'll need this if we want to generate method entries.

4 years agoRemove now unnecessary PHP_FUNCTION() declarations
Nikita Popov [Fri, 3 Apr 2020 13:10:30 +0000 (15:10 +0200)]
Remove now unnecessary PHP_FUNCTION() declarations

4 years agoGenerate function entries from stubs
Nikita Popov [Fri, 21 Feb 2020 14:08:56 +0000 (15:08 +0100)]
Generate function entries from stubs

If @generate-function-entries is specified in the stub file,
also generate function entries for the extension.

Currently limited to free functions only.

4 years agoDo not include the same stub multiple times
Máté Kocsis [Sun, 29 Mar 2020 18:24:16 +0000 (20:24 +0200)]
Do not include the same stub multiple times

Closes GH-5322

4 years agoFix #68690: Hypothetical off-by-one condition
Christoph M. Becker [Fri, 3 Apr 2020 12:11:04 +0000 (14:11 +0200)]
Fix #68690: Hypothetical off-by-one condition

We fix this, even though `filter->cache == jisx0213_u2_tbl_len` can
never be true here.

4 years agoPromote unknown encoding throws in encoding array/string list
George Peter Banyard [Wed, 1 Apr 2020 12:40:15 +0000 (14:40 +0200)]
Promote unknown encoding throws in encoding array/string list

For the string list we emit still emit a warning by comparing arg_num to 0

Closes GH-5337

4 years agoadd some output when generating arginfo
Remi Collet [Thu, 2 Apr 2020 14:48:43 +0000 (16:48 +0200)]
add some output when generating arginfo

4 years agoMove gen_stub.php to build directory and install it so phpize can take care of it...
Remi Collet [Thu, 2 Apr 2020 14:34:05 +0000 (16:34 +0200)]
Move gen_stub.php to build directory and install it so phpize can take care of it, and thus extension can use it as it is already in Makefile

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Fri, 3 Apr 2020 08:06:52 +0000 (10:06 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fix incorrect free for last_message

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Fri, 3 Apr 2020 08:06:09 +0000 (10:06 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix incorrect free for last_message

4 years agoFix incorrect free for last_message
Qianqian Bu [Fri, 3 Apr 2020 07:44:41 +0000 (15:44 +0800)]
Fix incorrect free for last_message

In commit a7305eb539596e175bd6c3ae9a20953358c5d677 the last_message
field of the connection object was changed to be always non-persistent.
But there is a place on change_user path that still treats it
depending on conn->persistent flag. This will cause PHP crash after
com_change_user success when there is last_message set

4 years agoRefactor mb_substr_count()
George Peter Banyard [Thu, 2 Apr 2020 20:38:28 +0000 (22:38 +0200)]
Refactor mb_substr_count()

Promote empty needle warning to ValueError
Convert if branch into an assertion as if mbfl_substr_count fails this now implies a bug
Thus mb_substr_count() can only return int now, fix stubs accordingly

4 years agoConvert if branch to assertion in mb_strlen
George Peter Banyard [Thu, 2 Apr 2020 20:10:02 +0000 (22:10 +0200)]
Convert if branch to assertion in mb_strlen

This operation should never fail, therefore it's converted to an assertion.
Thus this mb_strlen() can now only return int, fix stubs accordingly

4 years agoPromote mb_str_split warning to ValueError
George Peter Banyard [Thu, 2 Apr 2020 19:57:38 +0000 (21:57 +0200)]
Promote mb_str_split warning to ValueError

Also add a TODO about documenting this funcion on PHP.net
Convert some checks to assertions as if they don't hold something went wrong during memory allocation
Due to these changes this function cannot return false anymore, fix stubs accordingly

4 years agoMerge mb_strstr() variants under a common implementation
George Peter Banyard [Thu, 2 Apr 2020 18:48:09 +0000 (20:48 +0200)]
Merge mb_strstr() variants under a common implementation

This reduces heavy ducplicate code

4 years agoImprove code flow
George Peter Banyard [Thu, 2 Apr 2020 17:41:30 +0000 (19:41 +0200)]
Improve code flow

These nested if-else blocks are unnecessary since we return early.

4 years agoUse ZEND_NUM_ARGS() macro instead of custom variable
George Peter Banyard [Thu, 2 Apr 2020 16:43:57 +0000 (18:43 +0200)]
Use ZEND_NUM_ARGS() macro instead of custom variable

Also why on earth would someone do this?

4 years agoPromote empty string warning to ValueError in mb_ord()
George Peter Banyard [Thu, 2 Apr 2020 16:35:20 +0000 (18:35 +0200)]
Promote empty string warning to ValueError in mb_ord()

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Thu, 2 Apr 2020 14:34:51 +0000 (16:34 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fixed bug #79434

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Thu, 2 Apr 2020 14:34:21 +0000 (16:34 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fixed bug #79434

4 years agoFixed bug #79434
Nikita Popov [Thu, 2 Apr 2020 14:32:57 +0000 (16:32 +0200)]
Fixed bug #79434

4 years agoMerge branch 'PHP-7.4'
Matteo Beccati [Thu, 2 Apr 2020 14:17:24 +0000 (16:17 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Skip fpm tests not designed to be run as root
  Allow fpm tests to be run with long socket path

4 years agoSkip fpm tests not designed to be run as root
Matteo Beccati [Wed, 1 Apr 2020 16:28:34 +0000 (18:28 +0200)]
Skip fpm tests not designed to be run as root

When running as root with TEST_FPM_RUN_AS_ROOT=1

4 years agoAllow fpm tests to be run with long socket path
Matteo Beccati [Wed, 1 Apr 2020 16:14:25 +0000 (18:14 +0200)]
Allow fpm tests to be run with long socket path

Socket path is restricted to ~100 bytes, so we can use
the system temp dir if the path ends up too long.

4 years agonews / UPGRADING for zip 1.19.0
Remi Collet [Thu, 2 Apr 2020 12:58:13 +0000 (14:58 +0200)]
news / UPGRADING for zip 1.19.0

4 years ago- add ZipArchive::EM_UNKNOWN constant - add ZipArchive::EM_TRAD_PKWARE constant ...
Remi Collet [Thu, 2 Apr 2020 12:40:05 +0000 (14:40 +0200)]
- add ZipArchive::EM_UNKNOWN constant - add ZipArchive::EM_TRAD_PKWARE constant - cleanup hack for libzip 1.3.1 (have only exist for a few days) - add ZipArchive::isCompressionMethodSupported() method (libzip 1.7.0) - add ZipArchive::isEncryptionMethodSupported() method (libzip 1.7.0) - bump version to 1.19.0-dev

4 years agoFix #47983: mixed LF and CRLF line endings in mail()
Christoph M. Becker [Thu, 2 Apr 2020 11:06:19 +0000 (13:06 +0200)]
Fix #47983: mixed LF and CRLF line endings in mail()

Email headers are supposed to be separated with CRLF.  Period.

4 years agoPrevent imap mail tests from borking instead of skipping
Christoph M. Becker [Thu, 2 Apr 2020 10:50:38 +0000 (12:50 +0200)]
Prevent imap mail tests from borking instead of skipping

As of commit e49593a[1], run-tests.php is rather picky regarding the
output of SKIPIF sections, so we have to suppress warnings for failing
imap_open().

[1] <http://git.php.net/?p=php-src.git;a=commit;h=e49593a7c3159a5673ce74b4e5133f1264dc313f>

4 years agouse a better setter for zip_error_t
Remi Collet [Thu, 2 Apr 2020 10:26:34 +0000 (12:26 +0200)]
use a better setter for zip_error_t

4 years agoRemove <default> prefix from reflection dump
Nikita Popov [Thu, 2 Apr 2020 09:25:41 +0000 (11:25 +0200)]
Remove <default> prefix from reflection dump

This really doesn't add anything, and only makes for confusing
terminology. Only marking properties as dynamic is sufficient.

4 years agoDisplay property default value in reflection dumps
Nikita Popov [Thu, 2 Apr 2020 09:21:48 +0000 (11:21 +0200)]
Display property default value in reflection dumps

4 years agoShow property type in reflection export
Nikita Popov [Thu, 2 Apr 2020 09:05:04 +0000 (11:05 +0200)]
Show property type in reflection export

4 years agoAvoid control flow warning
Nikita Popov [Thu, 2 Apr 2020 08:54:32 +0000 (10:54 +0200)]
Avoid control flow warning

4 years agoMerge branch 'PHP-7.4'
Christoph M. Becker [Wed, 1 Apr 2020 17:21:46 +0000 (19:21 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Enable error diagnostic for check_default_conf_path.phpt

4 years agoEnable error diagnostic for check_default_conf_path.phpt
Christoph M. Becker [Wed, 1 Apr 2020 17:20:35 +0000 (19:20 +0200)]
Enable error diagnostic for check_default_conf_path.phpt

Otherwise we have no clue why the test failed, if the regex didn't
match.

4 years agoRemove unnecessary check in runtime_compile_time_binary_operands.phpt
Nikita Popov [Wed, 1 Apr 2020 12:49:52 +0000 (14:49 +0200)]
Remove unnecessary check in runtime_compile_time_binary_operands.phpt

Now that operator errors are detected more accurately, we no longer
have any cases where we throw a compile-time error instead of a
run-time exception, so we can drop this check now.

4 years agoMake division by zero error check more accurate
Nikita Popov [Wed, 1 Apr 2020 12:47:21 +0000 (14:47 +0200)]
Make division by zero error check more accurate

For division (rather than modulus) we should check the double
value, otherwise the result might be zero after integer truncation,
but not zero as a floating point value.

4 years agoUnify checks for binary operator errors for ct eval
Nikita Popov [Wed, 1 Apr 2020 11:02:58 +0000 (13:02 +0200)]
Unify checks for binary operator errors for ct eval

Move everything into one function and share it with opcache.
This fixes some discrepancies.

4 years agoDon't convert binop operand types in opcache
Nikita Popov [Wed, 1 Apr 2020 12:35:01 +0000 (14:35 +0200)]
Don't convert binop operand types in opcache

This may produce different behavior if operator overloading is
involved, and may change the error message.

If there's strong interest, this could be done in the DFA pass
with available type information. It does not look particularly
practically useful to me though.

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Wed, 1 Apr 2020 12:23:07 +0000 (14:23 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fix literal compaction collision between string and double

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Wed, 1 Apr 2020 12:21:59 +0000 (14:21 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix literal compaction collision between string and double

4 years agoFix literal compaction collision between string and double
Nikita Popov [Wed, 1 Apr 2020 12:20:59 +0000 (14:20 +0200)]
Fix literal compaction collision between string and double

For the sake of simplicity I'm using a separate hashtable, rather
than trying to do hash perturabation on the double strings.

4 years agoImprove "unsupported operands" error
Nikita Popov [Wed, 1 Apr 2020 08:05:26 +0000 (10:05 +0200)]
Improve "unsupported operands" error

By mentioning the operand types. We can do that now, as the
original operand types now remain available.

Closes GH-5330.

4 years agoRemove op_func from TRY_BINARY_OP1 macro
Nikita Popov [Wed, 1 Apr 2020 08:15:03 +0000 (10:15 +0200)]
Remove op_func from TRY_BINARY_OP1 macro

And move the operator overloading helpers into zend_operators.c,
there's no reason for them to be in the header.

4 years agoMerge branch 'PHP-7.4'
Christoph M. Becker [Wed, 1 Apr 2020 07:29:07 +0000 (09:29 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Add NEWS entryc [ci skip]

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Wed, 1 Apr 2020 07:28:39 +0000 (09:28 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Add NEWS entryc [ci skip]

4 years agoAdd NEWS entryc [ci skip]
Christoph M. Becker [Wed, 1 Apr 2020 07:26:20 +0000 (09:26 +0200)]
Add NEWS entryc [ci skip]

4 years agoMerge branch 'PHP-7.4'
George Peter Banyard [Wed, 1 Apr 2020 02:55:35 +0000 (04:55 +0200)]
Merge branch 'PHP-7.4'

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
George Peter Banyard [Wed, 1 Apr 2020 02:34:09 +0000 (04:34 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

4 years agoFix bug 79441
George Peter Banyard [Wed, 1 Apr 2020 02:29:20 +0000 (04:29 +0200)]
Fix bug 79441

4 years agoPromote unsupported encoding warnings to ValueError
George Peter Banyard [Tue, 31 Mar 2020 22:54:36 +0000 (00:54 +0200)]
Promote unsupported encoding warnings to ValueError

4 years agoUse php_mb_get_encoding instead of mbfl_name2encoding to get encoding
George Peter Banyard [Tue, 31 Mar 2020 16:55:31 +0000 (18:55 +0200)]
Use php_mb_get_encoding instead of mbfl_name2encoding to get encoding

This reduces the number of places where the error message template is used.
Also promote the mb_check_encoding() warning to ValueError and add a test to cover the behaviour.

4 years agoMove encoding fetching out of php_mb_convert_encoding()
Nikita Popov [Tue, 31 Mar 2020 19:47:55 +0000 (21:47 +0200)]
Move encoding fetching out of php_mb_convert_encoding()

4 years agoRemove unnecesary check in php_mb_check_encoding()
Nikita Popov [Tue, 31 Mar 2020 19:01:42 +0000 (21:01 +0200)]
Remove unnecesary check in php_mb_check_encoding()

The caller makes sure that this is not NULL.

4 years agoRefactor operator implementations
Nikita Popov [Tue, 31 Mar 2020 16:03:30 +0000 (18:03 +0200)]
Refactor operator implementations

Instead of looping, use straight-line code with the following
layout:

1. Try to apply the base operation on the dereferenced operands.
2. Try overloaded object operations.
3. Try to convert operands to number, else error out.
4. Apply the base operation on the converted operands.

This makes the code easier to reason about and fixes some edge-case
bugs:

1. We should only try invoking operator overloading once prior to
   type conversion. Previously it was invoked both before and after
   type conversion.
2. We should not modify any values if an exception is thrown.
   Previously we sometimes modified the LHS of a compound assignment
   operator.
3. If conversion of the first operand fails, we no longer try to
   convert the second operand. I think the previous behavior here
   was fine as well, but this still seems a more typical.

This will also make some followup changes I have in mind simpler.

4 years agoUse explicit helper
George Peter Banyard [Tue, 31 Mar 2020 18:23:57 +0000 (20:23 +0200)]
Use explicit helper

4 years agoEncoding argument is always MBREX(current_mbctype)
George Peter Banyard [Tue, 31 Mar 2020 18:02:00 +0000 (20:02 +0200)]
Encoding argument is always MBREX(current_mbctype)

4 years agoAdd additional operator exception handling tests
Nikita Popov [Tue, 31 Mar 2020 16:35:17 +0000 (18:35 +0200)]
Add additional operator exception handling tests

These show that we may lose the old value of the LHS of a compound
assignment operator in some cases.

4 years agoRemove unused argument form convert_object_to_type()
Nikita Popov [Tue, 31 Mar 2020 15:31:14 +0000 (17:31 +0200)]
Remove unused argument form convert_object_to_type()

4 years agoDisplay nullability in type error messages for internal functions
Máté Kocsis [Mon, 30 Mar 2020 20:49:55 +0000 (22:49 +0200)]
Display nullability in type error messages for internal functions

Closes GH-5327

4 years agoClean up silent/noisy flag in convert_to_number
Nikita Popov [Tue, 31 Mar 2020 12:52:59 +0000 (14:52 +0200)]
Clean up silent/noisy flag in convert_to_number

4 years agoConvert some unknown encoding warnings to ValueErrors in ext/mbstring
George Peter Banyard [Sat, 28 Mar 2020 19:31:18 +0000 (20:31 +0100)]
Convert some unknown encoding warnings to ValueErrors in ext/mbstring

Promotes only the warnings where the encoding comes only from a string.
Functions which accept an array of encodings will be fixed at a later stage.

Closes GH-5317

4 years agoPromote some warnings to Errors in Zend basic functions
George Peter Banyard [Sun, 29 Mar 2020 22:40:18 +0000 (00:40 +0200)]
Promote some warnings to Errors in Zend basic functions

Closes GH-5325

4 years agoMerge branch 'PHP-7.4'
Derick Rethans [Tue, 31 Mar 2020 14:01:07 +0000 (15:01 +0100)]
Merge branch 'PHP-7.4'

4 years agoThe 7.4 branch is now for 7.4.6
Derick Rethans [Tue, 31 Mar 2020 13:57:12 +0000 (14:57 +0100)]
The 7.4 branch is now for 7.4.6

4 years agoMake cast_object handler required
Nikita Popov [Tue, 31 Mar 2020 10:17:32 +0000 (12:17 +0200)]
Make cast_object handler required

Avoid subtle differences in behavior depending on whether the
handler is absent or returns FAILURE.

If you previously set cast_object to NULL, create a handler that
always returns FAILURE instead.

4 years agoImprove undefined variable error messages
Máté Kocsis [Mon, 30 Mar 2020 15:23:03 +0000 (17:23 +0200)]
Improve undefined variable error messages

Closes GH-5312

4 years agoClarify SimpleXML comparison logic
Nikita Popov [Tue, 31 Mar 2020 10:48:57 +0000 (12:48 +0200)]
Clarify SimpleXML comparison logic

4 years agoAdd a ZEND_UNCOMPARABLE value
Nikita Popov [Tue, 31 Mar 2020 10:36:48 +0000 (12:36 +0200)]
Add a ZEND_UNCOMPARABLE value

To explicitly indicate that objects are uncomparable. For now
this has no functional difference from the usual 1 return value,
but makes intent clearer.

4 years agoReport object cast failures internally
Nikita Popov [Tue, 31 Mar 2020 10:04:59 +0000 (12:04 +0200)]
Report object cast failures internally

Make cast_object return FAILURE for casts to int/float, rather than
throwing a notice and returning SUCCESS. Instead move the emission
of the notice to the code invoking cast_object. This will allow us
to customize the behavior per call-site.

This change is written to be NFC, and the code in
zend_std_compare_objects() should illustrate the current behavior
doesn't make a lot of sense.

4 years agoMake sure php_get_internal_encoding() returns non-empty
Nikita Popov [Tue, 31 Mar 2020 09:06:15 +0000 (11:06 +0200)]
Make sure php_get_internal_encoding() returns non-empty

Even if default_charset is set to "", we should still return
"UTF-8" as the default value here. Setting default_charset to ""
suppresses the header emission, but shouldn't change anything
about our encoding defaults.

4 years agoMake sure mbstring.internal_encoding deprecation is always thrown
Nikita Popov [Tue, 31 Mar 2020 08:46:44 +0000 (10:46 +0200)]
Make sure mbstring.internal_encoding deprecation is always thrown

It was not thrown if the setting was specified via -d at least.

4 years agoMerge branch 'PHP-7.4'
Christoph M. Becker [Tue, 31 Mar 2020 08:26:01 +0000 (10:26 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Next is 7.3.18

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Tue, 31 Mar 2020 08:24:15 +0000 (10:24 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Next is 7.3.18

4 years agoNext is 7.3.18
Christoph M. Becker [Tue, 31 Mar 2020 08:22:55 +0000 (10:22 +0200)]
Next is 7.3.18

4 years agoMerge branch 'PHP-7.4'
Christoph M. Becker [Tue, 31 Mar 2020 06:41:08 +0000 (08:41 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fix #79413: session_create_id() fails for active sessions

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Tue, 31 Mar 2020 06:39:34 +0000 (08:39 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #79413: session_create_id() fails for active sessions

4 years agoFix #79413: session_create_id() fails for active sessions
Christoph M. Becker [Thu, 26 Mar 2020 18:01:33 +0000 (19:01 +0100)]
Fix #79413: session_create_id() fails for active sessions

The comment on `PS_VALIDATE_SID_FUNC(files)` is very clear that the
function is supposed to return `SUCCESS` if the session already exists.
So to detect a collision, we have to check for `SUCCESS`, not
`FAILURE`.

We also fix the wrong condition in session_regenerate_id() as well.