]> granicus.if.org Git - php/log
php
4 years agoDrop check for HAVE_NSLDAP
George Peter Banyard [Fri, 15 May 2020 22:40:37 +0000 (00:40 +0200)]
Drop check for HAVE_NSLDAP

This constant is never defined thus useless

4 years agoUse ZEND_FCI_INITIALIZED macro
George Peter Banyard [Mon, 11 May 2020 16:42:46 +0000 (18:42 +0200)]
Use ZEND_FCI_INITIALIZED macro

Instead of manually checking that the fci.size is different than 0

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Fri, 15 May 2020 09:05:00 +0000 (11:05 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fixed bug #79600

4 years agoFixed bug #79600
Nikita Popov [Fri, 15 May 2020 09:03:05 +0000 (11:03 +0200)]
Fixed bug #79600

Missed unsetting of DO_INIT in one case.

4 years agoRemove some uses of zend_inline_hash_func
Nikita Popov [Fri, 15 May 2020 08:13:38 +0000 (10:13 +0200)]
Remove some uses of zend_inline_hash_func

There's no need to force-inline the hashing for all of these.

4 years agoMerge branch 'master' of git.php.net:php-src
Dmitry Stogov [Fri, 15 May 2020 07:44:14 +0000 (10:44 +0300)]
Merge branch 'master' of git.php.net:php-src

* 'master' of git.php.net:php-src:
  fixed typo of bug id (#79599)
  master doesn't been affected since we are not passing errcontext now
  Fixed bug #97599 (coredump in set_error_handler)
  Fix #79557: extension_dir = ./ext now use current directory for base
  Fix #79596: MySQL FLOAT truncates to int some locales
  [ci skip] Fix NEWS

4 years agoMerge branch 'PHP-7.4'
Xinchen Hui [Fri, 15 May 2020 07:44:02 +0000 (15:44 +0800)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  fixed typo of bug id (#79599)

4 years agofixed typo of bug id (#79599)
Xinchen Hui [Fri, 15 May 2020 07:43:38 +0000 (15:43 +0800)]
fixed typo of bug id (#79599)

4 years agomaster doesn't been affected since we are not passing errcontext now
Xinchen Hui [Fri, 15 May 2020 07:40:53 +0000 (15:40 +0800)]
master doesn't been affected since we are not passing errcontext now

4 years agoMerge branch 'PHP-7.4'
Xinchen Hui [Fri, 15 May 2020 07:40:43 +0000 (15:40 +0800)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fixed bug #97599 (coredump in set_error_handler)

Conflicts:
Zend/zend.c

4 years agoMerge branch 'PHP-7.4' of git.php.net:/php-src into PHP-7.4
Xinchen Hui [Fri, 15 May 2020 07:36:51 +0000 (15:36 +0800)]
Merge branch 'PHP-7.4' of git.php.net:/php-src into PHP-7.4

* 'PHP-7.4' of git.php.net:/php-src:
  Fix #79557: extension_dir = ./ext now use current directory for base
  Fix #79596: MySQL FLOAT truncates to int some locales
  [ci skip] Fix NEWS

4 years agoFixed bug #97599 (coredump in set_error_handler)
Xinchen Hui [Fri, 15 May 2020 07:36:00 +0000 (15:36 +0800)]
Fixed bug #97599 (coredump in set_error_handler)

4 years agoMerge branch 'PHP-7.4'
Christoph M. Becker [Fri, 15 May 2020 07:24:07 +0000 (09:24 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fix #79557: extension_dir = ./ext now use current directory for base

4 years agoFix #79557: extension_dir = ./ext now use current directory for base
Christoph M. Becker [Mon, 4 May 2020 12:55:24 +0000 (14:55 +0200)]
Fix #79557: extension_dir = ./ext now use current directory for base

For some reason, `ImageLoad()` fails to load images with a relative
path starting with `.\`  or `./`.  We work around this issue by
stripping those leading characters.

4 years agoMerge branch 'PHP-7.4'
Christoph M. Becker [Fri, 15 May 2020 07:12:56 +0000 (09:12 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fix #79596: MySQL FLOAT truncates to int some locales

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Fri, 15 May 2020 07:11:19 +0000 (09:11 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #79596: MySQL FLOAT truncates to int some locales

4 years agoFix #79596: MySQL FLOAT truncates to int some locales
Christoph M. Becker [Fri, 15 May 2020 07:09:41 +0000 (09:09 +0200)]
Fix #79596: MySQL FLOAT truncates to int some locales

We must not do locale aware float to string conversion here; instead
we using our `snprintf()` implementation with the `F` specifier.

4 years agoMerge branch 'PHP-7.4'
Christoph M. Becker [Fri, 15 May 2020 06:59:55 +0000 (08:59 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  [ci skip] Fix NEWS

4 years ago[ci skip] Fix NEWS
Christoph M. Becker [Fri, 15 May 2020 06:53:58 +0000 (08:53 +0200)]
[ci skip] Fix NEWS

We add the missing release dates, the NEWS regarding the latest CVE
fixes, and move the entry for bug #79536 to 7.4.7 because it didn't
make it into 7.4.6.

4 years agoAdded HALT symbol
Dmitry Stogov [Thu, 14 May 2020 22:06:47 +0000 (01:06 +0300)]
Added HALT symbol

4 years agoRemove unused variable
Christoph M. Becker [Thu, 14 May 2020 15:55:31 +0000 (17:55 +0200)]
Remove unused variable

4 years agoImprove error message for deprecated methods
Máté Kocsis [Fri, 24 Apr 2020 08:58:10 +0000 (10:58 +0200)]
Improve error message for deprecated methods

4 years agoRemove generated zend_jit_x86.c upon make distclean
Bob Weinand [Thu, 14 May 2020 14:59:54 +0000 (16:59 +0200)]
Remove generated zend_jit_x86.c upon make distclean

4 years agoMerge branch 'PHP-7.4'
Christoph M. Becker [Thu, 14 May 2020 13:59:34 +0000 (15:59 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Check compatibility with proper runtime DLL

4 years agoCheck compatibility with proper runtime DLL
Christoph M. Becker [Thu, 14 May 2020 13:39:00 +0000 (15:39 +0200)]
Check compatibility with proper runtime DLL

In practise, this likely does not matter, because usually these DLLs
are installed side by side, but still we should check the proper DLL.

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Thu, 14 May 2020 12:16:22 +0000 (14:16 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Canonicalize bison error during ini parsing

4 years agoCanonicalize bison error during ini parsing
Nikita Popov [Thu, 14 May 2020 10:54:20 +0000 (12:54 +0200)]
Canonicalize bison error during ini parsing

Bison 3.6 seems to use "end of file" rather than "$end" for this.
Force the same on older bison versions to be consistent.

4 years agoAdd stubs for some SAPIs
Máté Kocsis [Thu, 14 May 2020 11:31:52 +0000 (13:31 +0200)]
Add stubs for some SAPIs

For apache2handler, fpm, litespeed, phpdbg, specifically.
Partially implements GH-5295

4 years agoTracing JIT support for delayed call chain
Dmitry Stogov [Thu, 14 May 2020 11:21:46 +0000 (14:21 +0300)]
Tracing JIT support for delayed call chain

4 years agoConvert resource to object in Sysvmsg
Máté Kocsis [Fri, 8 May 2020 15:18:39 +0000 (17:18 +0200)]
Convert resource to object in Sysvmsg

Closes GH-5546

4 years agoAvoid duplicating the proc_open cleanup logic
Nikita Popov [Thu, 14 May 2020 08:35:33 +0000 (10:35 +0200)]
Avoid duplicating the proc_open cleanup logic

Use a slightly ugly "goto unreachable" pattern to share this code,
so we don't have to duplicate cleanup logic for the success and
the failure cases.

4 years agoFurther refactoring of proc_open.c
Alex Dowad [Tue, 12 May 2020 06:43:29 +0000 (08:43 +0200)]
Further refactoring of proc_open.c

This time a number of comments have been added to make it easy for new devs to understand
what is going on. Also adjusted error message to use colons rather than dashes.

4 years agoDon't leak memory if wrong resource type is passed to proc_open
Alex Dowad [Sat, 9 May 2020 16:16:45 +0000 (18:16 +0200)]
Don't leak memory if wrong resource type is passed to proc_open

proc_open can accept stream resources in the descriptorspec, like this:

    proc_open("command", array(0 => $resource), $pipes);

Previously, if a resource which was *not* of type "stream" was passed, proc_open would
return without freeing dynamically allocated memory. It's fixed now.

4 years agoAdd PTY support to proc_open (again after 16 long years)
Alex Dowad [Sun, 3 May 2020 15:54:06 +0000 (17:54 +0200)]
Add PTY support to proc_open (again after 16 long years)

Back in 2004, a feature was added to proc_open which allowed it to open a PTY,
connecting specific FDs in the child process to the slave end of the PTY and returning
the master end of the PTY (wrapped as a PHP stream) in the `$pipes` array. However,
this feature was disabled just about a month later. Little information is available
about why this was done, but from talking to the original implementer, it seems there
were portability problems with some rare flavors of Unix.

Re-enable this feature with a simplified implementation which uses openpty(). No
attempt is made to support PTYs if the platform does not have openpty(). The configure
script checks if linking with -lutil is necessary to use openpty(), but if anything
else is required, like including some special header or linking with some other library,
PTY support will be disabled.

The original PTY support for proc_open automatically daemonized the child process
(disassociating it from the TTY session and process group of the parent). However,
I don't think this is a good idea. Just because a user opens a child process in a
PTY, it doesn't mean they want it to continue running even when the parent process
is killed. Of course, if the child process is some kind of server, it will likely
daemonize itself; but we have no reason to preempt that decision.

It turns out that since 2015, there has been one test case for PTY support in
proc_open() in the test suite. This test was added in GitHub PR #1588
(https://github.com/php/php-src/pull/1588). That PR mentioned that the PHP
binary in the Debian/Ubuntu repositories is patched to *enable* PTY support. Checking
the Debian PHP repository (https://salsa.debian.org/php-team/php.git) shows that this
is still true. Debian's patch does not modify the implementation from 2004 in any
way; it just removes the #if 0 line which disables it.

Naturally, the test case is skipped if PTY support is not enabled. This means that ever
since it was added, every test run against the 'vanilla' PHP codebase has skipped it.

Interestingly, the test case which was added in 2015 fails on my Linux Mint PC... both
with this simplified implementation *and* when enabling the original implementation.
Investigation reveals the reason: when the child process using the slave end of the
PTY exits and its FDs are all closed, and all buffered data is read from the master
end of the PTY, any further attempt to read from the master end fails with EIO. The
test case seems to expect that reading from the master end will always return an
empty string if no data is available.

Likely this is because PHP's fread() was updated to report errors from the underlying
system calls only recently.

One way out of this dilemma: IF at least one FD referring to the slave end of the PTY is
kept open *in the parent process*, the failure with EIO will not occur even after the child
process exits. However, that would raise another issue: we would need a way to ensure the FD
will be closed eventually in long-running programs.

Another discovery made while testing this code is that fread() does not always return
all the data written to the slave end of the PTY in a single call, even if the data was
written with a single syscall and it is only a few bytes long.

Specifically, when the child process in the test case writes "foo\n" to the PTY, the parent
sometimes receives "foo" (3 bytes) and sometimes "foo\r\n" (5 bytes). (The "\r" is from the
TTY line discipline converting "\n" to "\r\n".) A second call to fread() does return the
remaining bytes, though sometimes all the data is read in the first call, and by the time
the second call is made, the child process has already exited. It seems that liberal use
of the @ operator is needed when using fread() on pipes.

Thanks to Nikita Popov for suggesting that we should just use openpty() rather than
grantpt(), unlockpt(), etc.

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Thu, 14 May 2020 07:39:03 +0000 (09:39 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fix lcov genhtml: ERROR: cannot read [file]
  Properly detect CRC32 APIs on aarch64 from configure

4 years agoFix lcov genhtml: ERROR: cannot read [file]
Gerard Roche [Wed, 13 May 2020 18:57:54 +0000 (19:57 +0100)]
Fix lcov genhtml: ERROR: cannot read [file]

lcov is emitting several errors for generated regex files that have no code
coverage data. The fix is to add the files to the lcov exlusion list.

This is not an issue for CI because it uses gcovr to generate code coverage.

The errors:

    Processing ext/date/lib/parse_date.gcda
    geninfo: WARNING: could not open /home/code/vendor/php/php-src/parse_date.re
    geninfo: WARNING: could not open /home/code/vendor/php/php-src/<stdout>
    geninfo: WARNING: some exclusion markers may be ignored
    Processing ext/date/lib/parse_tz.gcda
    Processing ext/date/lib/tm2unixtime.gcda
    Processing ext/date/lib/parse_iso_intervals.gcda
    geninfo: WARNING: could not open /home/code/vendor/php/php-src/<stdout>
    geninfo: WARNING: could not open /home/code/vendor/php/php-src/parse_iso_intervals.re
    geninfo: WARNING: some exclusion markers may be ignored
    ...
    genhtml: ERROR: cannot read /home/code/vendor/php/php-src/parse_date.re
    Processing file /home/code/vendor/php/php-src/parse_date.re
    make: *** [Makefile:443: lcov-html] Error 2

Closes GH-5568.

4 years agoProperly detect CRC32 APIs on aarch64 from configure
Ondřej Surý [Wed, 13 May 2020 06:22:29 +0000 (08:22 +0200)]
Properly detect CRC32 APIs on aarch64 from configure

The CRC32 APIs are optional for armv8-a. They became mandatory since
armv8.1-a.

Closes GH-5564.

4 years agoRemoved pure zpp tests in the imap extension
Jens de Nies [Wed, 13 May 2020 18:15:39 +0000 (20:15 +0200)]
Removed pure zpp tests in the imap extension

Closes GH-5569.

4 years agoMerge branch 'PHP-7.4'
Christoph M. Becker [Wed, 13 May 2020 21:31:09 +0000 (23:31 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fix brittle shmop test

4 years agoFix brittle shmop test
Christoph M. Becker [Wed, 13 May 2020 21:09:57 +0000 (23:09 +0200)]
Fix brittle shmop test

To solve bug #70886, the test uses random keys to prevent collisions;
however, this is not guaranteed, and as such it may even collide with
other tests in the shmop test suite.  The proper solution would be to
use a single key (which could be randomly generated), but to actually
`shmop_close()` after each `shmop_delete()`.  This would, however, not
work on Windows due to bug #65987.  Therefore we use three different
keys for now.

4 years agoAllow null callback to array_filter()
Nikita Popov [Wed, 13 May 2020 15:24:13 +0000 (17:24 +0200)]
Allow null callback to array_filter()

With same behavior as not passing it.

4 years agoSet "hybrid_ret_counters" only after links to "function entry" traces.
Dmitry Stogov [Wed, 13 May 2020 14:45:48 +0000 (17:45 +0300)]
Set "hybrid_ret_counters" only after links to "function entry" traces.

4 years agoRevert "doc for enchant Object move"
Remi Collet [Wed, 13 May 2020 13:56:18 +0000 (15:56 +0200)]
Revert "doc for enchant Object move"

This reverts commit 2c63324a4eabf3f8bdf9585c8dae4527dca2e41f.

4 years agoRevert "convert enchant resources to objects of new classes - EnchantBroker - Enchant...
Remi Collet [Wed, 13 May 2020 13:56:14 +0000 (15:56 +0200)]
Revert "convert enchant resources to objects of new classes - EnchantBroker - EnchantDict add OO interface deprecate enchant_broker_free* (use unset instead) deprecate ENCHANT_MYSPELL and ENCHANT_ISPELL constants"

This reverts commit 7db4c24a37c96b3961cb1989ab71941e115b0fac.

4 years agoRevert "add myself as enchant maintainer"
Remi Collet [Wed, 13 May 2020 13:56:10 +0000 (15:56 +0200)]
Revert "add myself as enchant maintainer"

This reverts commit f987219c69360aa2f9364f826c71ef6a1c78f7d9.

4 years agodoc for enchant Object move
Remi Collet [Wed, 13 May 2020 13:23:07 +0000 (15:23 +0200)]
doc for enchant Object move

4 years agoconvert enchant resources to objects of new classes - EnchantBroker - EnchantDict...
Remi Collet [Wed, 6 May 2020 11:24:38 +0000 (13:24 +0200)]
convert enchant resources to objects of new classes - EnchantBroker - EnchantDict add OO interface deprecate enchant_broker_free* (use unset instead) deprecate ENCHANT_MYSPELL and ENCHANT_ISPELL constants

4 years agoAssert on unknown type in zend_get_type_by_const()
Nikita Popov [Wed, 13 May 2020 13:02:33 +0000 (15:02 +0200)]
Assert on unknown type in zend_get_type_by_const()

4 years agoFixed JIT with ON_HOT_COUNTERS trigger (opcache.jit=1235)
Dmitry Stogov [Wed, 13 May 2020 13:00:25 +0000 (16:00 +0300)]
Fixed JIT with ON_HOT_COUNTERS trigger (opcache.jit=1235)

4 years agoUse zend_zval_type_name() API where possible
Nikita Popov [Wed, 13 May 2020 12:55:08 +0000 (14:55 +0200)]
Use zend_zval_type_name() API where possible

Rather than zend_get_type_by_const(Z_TYPE_P()).

4 years agoRename zend_zval_get_type() API
Nikita Popov [Wed, 13 May 2020 12:46:15 +0000 (14:46 +0200)]
Rename zend_zval_get_type() API

We have a bunch of APIs for getting type names and it's sometimes
hard to keep them apart ... make it clear that this is the one
you definitely do not want to use.

4 years agoConvert resource to object in XML-RPC extension
Máté Kocsis [Sat, 25 Apr 2020 10:14:59 +0000 (12:14 +0200)]
Convert resource to object in XML-RPC extension

Closes GH-5457

4 years agoBetter trace_buffer packing
Dmitry Stogov [Wed, 13 May 2020 12:45:42 +0000 (15:45 +0300)]
Better trace_buffer packing

4 years agoHonor script time limit when calling shutdown functions
Alex Dowad [Wed, 6 May 2020 20:02:57 +0000 (22:02 +0200)]
Honor script time limit when calling shutdown functions

A time limit can be set on PHP script execution via `set_time_limit` (or .ini file).
When the time limit is reached, the OS will notify PHP and `timed_out` and `vm_interrupt`
flags are set. While these flags are regularly checked when executing PHP code, once the
end of the script is reached, they are not checked while invoking shutdown functions
(registered via `register_shutdown_function`).

Of course, if the shutdown functions are implemented *in* PHP, then the interrupt flag
will be checked while the VM is running PHP bytecode and the timeout will take effect.
But if the shutdown functions are built-in (implemented in C), it will not.

Since the shutdown functions are invoked through `zend_call_function`, add a check of the
`vm_interrupt` flag there. Then, the script time limit will be respected when *entering*
each shutdown function. The fact still remains that if a shutdown function is built-in and
runs for a long time, script execution will not time out until it finishes and the
interpreter tries to invoke the next one.

Still, the behavior of scripts with execution time limits will be more consistent after
this patch. To make the execution time-out feature work even more precisely, it would
be necessary to scrutinize all the built-in functions and add checks of the `vm_interrupt`
flag in any which can run for a long time. That might not be worth the effort, though.

It should be mentioned that this patch does not solely affect shutdown functions, neither
does it solely allow for interruption of running code due to script execution timeout.
Anything else which causes `vm_interrupt` to be set, such as the PHP interpreter receiving
a signal, will take effect when exiting from an internal function. And not just internal
functions which are called because they were registered to run at shutdown; there are
other cases where a series of internal functions might run in the midst of a script. In
all such cases, it will be possible to interrupt the interpreter now.

Closes GH-5543.

4 years agoRevert "Fixed crash if jit.trigger is counter based with preload scripts"
Xinchen Hui [Wed, 13 May 2020 10:35:00 +0000 (18:35 +0800)]
Revert "Fixed crash if jit.trigger is counter based with preload scripts"

This reverts commit 3d4e23aa928ae1451da360d64b849a0720412f7e.

4 years agoMerge branch 'master' of git.php.net:/php-src
Xinchen Hui [Wed, 13 May 2020 10:23:55 +0000 (18:23 +0800)]
Merge branch 'master' of git.php.net:/php-src

* 'master' of git.php.net:/php-src:
  Use new Fast ZPP macros for string|int parar types
  utime is always available on Windows

4 years agoFixed crash if jit.trigger is counter based with preload scripts
Xinchen Hui [Wed, 13 May 2020 10:22:29 +0000 (18:22 +0800)]
Fixed crash if jit.trigger is counter based with preload scripts

4 years agoUse new Fast ZPP macros for string|int parar types
George Peter Banyard [Sat, 2 May 2020 17:07:59 +0000 (19:07 +0200)]
Use new Fast ZPP macros for string|int parar types

Closes GH-5512

4 years agoutime is always available on Windows
George Peter Banyard [Tue, 12 May 2020 22:29:17 +0000 (00:29 +0200)]
utime is always available on Windows

Therefore drop useless preprocessor if check

Closes GH-5563

4 years agoMerge branch 'master' of git.php.net:/php-src
Xinchen Hui [Wed, 13 May 2020 10:01:16 +0000 (18:01 +0800)]
Merge branch 'master' of git.php.net:/php-src

* 'master' of git.php.net:/php-src:
  skip when mbstring missing (no warning)

4 years agoFixed #79582 (Crash seen when opcache.jit=1235 and opcache.jit_debug=2)
Xinchen Hui [Wed, 13 May 2020 09:59:39 +0000 (17:59 +0800)]
Fixed #79582 (Crash seen when opcache.jit=1235 and opcache.jit_debug=2)

4 years agoskip when mbstring missing (no warning)
Remi Collet [Wed, 13 May 2020 08:56:10 +0000 (10:56 +0200)]
skip when mbstring missing (no warning)

4 years agorun-tests: extract usage message
Gerard Roche [Tue, 12 May 2020 12:21:12 +0000 (13:21 +0100)]
run-tests: extract usage message

Put the usage message near the top of the script,
into a separate function.

Closes GH-5558.

4 years agorun-tests: cs fixes (cleanup)
Gerard Roche [Tue, 12 May 2020 16:24:21 +0000 (17:24 +0100)]
run-tests: cs fixes (cleanup)

I used php-cs-fixer to do the cs fixes. The configuration I used is
posted below. The reason I disabled some of the rules is because they
create too much noise and would make it difficult to review. But please
feel free to close this PR and run the php-cs-fixer yourself.

    <?php

    $config = PhpCsFixer\Config::create();
    $config->setRiskyAllowed(false);
    $config->setRules([
        '@PSR2' => true,
        '@Symfony' => true,
        'array_syntax' => false,
        'binary_operator_spaces' => false,
        'blank_line_before_statement' => false,
        'concat_space' => false,
        'increment_style' => false,
        'phpdoc_align' => false,
        'single_quote' => false,
        'trailing_comma_in_multiline_array' => false,
        'unary_operator_spaces' => false,
        'yoda_style' => false,
    ]);

    $finder = PhpCsFixer\Finder::create();
    $finder->in(getcwd());

    $finder->exclude('Zend');
    $finder->exclude('build');
    $finder->exclude('ext');
    $finder->exclude('pear');
    $finder->exclude('sapi');
    $finder->exclude('scripts');
    $finder->exclude('win32');

    $config->setFinder($finder);

    return $config;

Closes GH-5557.

4 years agoReplace zend_jit_trace_info.loop_kind by zend_jit_trace_info.flags
Dmitry Stogov [Tue, 12 May 2020 21:56:04 +0000 (00:56 +0300)]
Replace zend_jit_trace_info.loop_kind by zend_jit_trace_info.flags

4 years agoFixed invalid index
Dmitry Stogov [Tue, 12 May 2020 20:45:34 +0000 (23:45 +0300)]
Fixed invalid index

4 years agoPrevent usage of uninitialized class entry
Dmitry Stogov [Tue, 12 May 2020 20:34:07 +0000 (23:34 +0300)]
Prevent usage of uninitialized class entry

4 years agoFix [-Wundef] warning in PHPDBG SAPI
George Peter Banyard [Tue, 12 May 2020 15:54:25 +0000 (17:54 +0200)]
Fix [-Wundef] warning in PHPDBG SAPI

4 years agoFix [-Wundef] warning in CLI SAPI
George Peter Banyard [Tue, 12 May 2020 15:54:02 +0000 (17:54 +0200)]
Fix [-Wundef] warning in CLI SAPI

4 years agoFix [-Wundef] warning in FPM SAPI
George Peter Banyard [Tue, 12 May 2020 15:53:41 +0000 (17:53 +0200)]
Fix [-Wundef] warning in FPM SAPI

4 years agoFix [-Wundef] warning in Zend folder
George Peter Banyard [Tue, 12 May 2020 15:52:53 +0000 (17:52 +0200)]
Fix [-Wundef] warning in Zend folder

4 years agoFix [-Wundef] warning in streams implementation
George Peter Banyard [Tue, 12 May 2020 15:50:12 +0000 (17:50 +0200)]
Fix [-Wundef] warning in streams implementation

4 years agoFix [-Wundef] warning in main folder
George Peter Banyard [Tue, 12 May 2020 15:50:35 +0000 (17:50 +0200)]
Fix [-Wundef] warning in main folder

4 years agoMerge branch 'PHP-7.4'
Christoph M. Becker [Tue, 12 May 2020 17:50:16 +0000 (19:50 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fix #79588: Boolean opcache settings ignore on/off values

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Tue, 12 May 2020 17:47:13 +0000 (19:47 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #79588: Boolean opcache settings ignore on/off values

4 years agoFix #79588: Boolean opcache settings ignore on/off values
Christoph M. Becker [Tue, 12 May 2020 14:14:54 +0000 (16:14 +0200)]
Fix #79588: Boolean opcache settings ignore on/off values

We should display boolean INI settings as boolean.

4 years agoTest setting SplDoublyLinkedList iterator mode to IT_MODE_LIFO
Alex Dowad [Thu, 23 Apr 2020 09:13:12 +0000 (11:13 +0200)]
Test setting SplDoublyLinkedList iterator mode to IT_MODE_LIFO

4 years agoSplDoublyLinkedList uses iteration flags in iterator struct
Alex Dowad [Thu, 23 Apr 2020 08:45:20 +0000 (10:45 +0200)]
SplDoublyLinkedList uses iteration flags in iterator struct

The 'flags' field in spl_dllist_it was formerly unused. This means that if one started to
iterate over an SplDoublyLinkedList using 'foreach', and then *changed* the iteration mode
halfway, the 'foreach' loop would start iterating in the opposite direction. Probably this
was not what was intended.

Therefore, use the 'flags' field in spl_dllist_it for iteration via 'foreach'. For explicit
iteration using methods like '::next()' and '::current()', continue to use the flags in
the SplDoublyLinkedList object itself.

4 years agoRemove useless prototype for spl_dllist_get_iterator
Alex Dowad [Thu, 23 Apr 2020 08:36:59 +0000 (10:36 +0200)]
Remove useless prototype for spl_dllist_get_iterator

4 years agoDisplay errors in shutdown function timeout test
Nikita Popov [Mon, 11 May 2020 08:41:33 +0000 (10:41 +0200)]
Display errors in shutdown function timeout test

4 years agozend_timeout is not a signal handler function
Alex Dowad [Wed, 6 May 2020 20:22:07 +0000 (22:22 +0200)]
zend_timeout is not a signal handler function

The 'int dummy' parameter to this function makes it appear that it was intended as a
signal handler, but it is not being used as such. So remove the redundant parameter.

4 years agoDrop multi_convert_* APIs
Nikita Popov [Tue, 12 May 2020 15:10:06 +0000 (17:10 +0200)]
Drop multi_convert_* APIs

These are no longer used internally, and I'd rather they weren't
used externally either.

4 years agoTrim trailing whitespaces and fix code style
Rod Elias [Mon, 11 May 2020 14:08:17 +0000 (11:08 -0300)]
Trim trailing whitespaces and fix code style

Closes GH-5554.

4 years agorun-tests: remove use of FILE_BINARY constant
Gerard Roche [Tue, 12 May 2020 09:07:18 +0000 (10:07 +0100)]
run-tests: remove use of FILE_BINARY constant

The FILE_BINARY (and FILE_TEXT) constants are not really valid or useful
constants. It looks like they were added in 5.2.7 and have "no effect,
and are only available for forward compatibility."

See: https://www.php.net/manual/en/filesystem.constants.php

The default value of the file_put_contents() flags parameter is 0 and
FILE_BINARY is set to 0, so removing it doesn't change functionality.

P.S. Maybe those constants should be deprecated or removed in 8.0.

Closes GH-5556.

4 years agoRemove zend_qsort
Nikita Popov [Tue, 12 May 2020 14:57:53 +0000 (16:57 +0200)]
Remove zend_qsort

This has been superseded by zend_sort and is no longer used.

4 years agoMerge branch 'PHP-7.4'
Christoph M. Becker [Tue, 12 May 2020 11:33:06 +0000 (13:33 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Skip test on big-endian architectures

4 years agoSkip test on big-endian architectures
Christoph M. Becker [Tue, 12 May 2020 11:31:53 +0000 (13:31 +0200)]
Skip test on big-endian architectures

Due to the memory layout on BE architectures, the address would be
`0x2a00000000` instead of `0x2a` on little-endian architectures.

4 years agoAvoid useless manual instruction encoding
Dmitry Stogov [Tue, 12 May 2020 11:24:13 +0000 (14:24 +0300)]
Avoid useless manual instruction encoding

4 years agoMove EG(vm_interrupt) checks at the end of the trace loops
Dmitry Stogov [Tue, 12 May 2020 10:35:38 +0000 (13:35 +0300)]
Move EG(vm_interrupt) checks at the end of the trace loops

4 years agoMerge branch 'PHP-7.4'
Christoph M. Becker [Tue, 12 May 2020 09:49:04 +0000 (11:49 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fix #79489: .user.ini does not inherit

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Tue, 12 May 2020 09:48:11 +0000 (11:48 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #79489: .user.ini does not inherit

4 years agoFix #79489: .user.ini does not inherit
Christoph M. Becker [Tue, 5 May 2020 08:36:16 +0000 (10:36 +0200)]
Fix #79489: .user.ini does not inherit

On Windows, PATH_TRANSLATED may contain backslashes as well as slashes,
so we must not only check for `DEFAULT_SLASH`.

4 years agoMerge branch 'PHP-7.4'
Christoph M. Becker [Tue, 12 May 2020 09:19:10 +0000 (11:19 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  [ci skip] Update NEWS

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Tue, 12 May 2020 09:17:33 +0000 (11:17 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  [ci skip] Update NEWS

4 years ago[ci skip] Update NEWS
Christoph M. Becker [Tue, 12 May 2020 09:16:55 +0000 (11:16 +0200)]
[ci skip] Update NEWS

4 years agoMerge branch 'PHP-7.4'
Remi Collet [Tue, 12 May 2020 07:19:51 +0000 (09:19 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  bump version to 7.2.32-dev
  Update NEWS

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Remi Collet [Tue, 12 May 2020 07:19:36 +0000 (09:19 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  bump version to 7.2.32-dev
  Update NEWS

4 years agoMerge branch 'PHP-7.2' into PHP-7.3
Remi Collet [Tue, 12 May 2020 07:19:11 +0000 (09:19 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  bump version to 7.2.32-dev
  Update NEWS

4 years agobump version to 7.2.32-dev
Remi Collet [Tue, 12 May 2020 07:16:01 +0000 (09:16 +0200)]
bump version to 7.2.32-dev

4 years agoUpdate NEWS
Stanislav Malyshev [Mon, 11 May 2020 21:28:51 +0000 (14:28 -0700)]
Update NEWS