1
0
mirror of https://github.com/php/php-src.git synced 2026-04-20 06:21:12 +02:00
Commit Graph

53546 Commits

Author SHA1 Message Date
Christoph M. Becker
e7e15450ef Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #78853: preg_match() may return integer > 1
2019-11-22 19:30:43 +01:00
Christoph M. Becker
cfb643ca2b Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #78853: preg_match() may return integer > 1
2019-11-22 19:29:11 +01:00
Christoph M. Becker
e1da72bdf1 Fix #78853: preg_match() may return integer > 1
Commit 54ebebd[1] optimized the match loop, but for this case it has
been overlooked, that we must only loop if we're doing global matching.

[1] <http://git.php.net/?p=php-src.git;a=commit;h=54ebebd686255c5f124af718c966edb392782d4a>
2019-11-22 19:26:26 +01:00
George Peter Banyard
501a72e354 Promote warning to value error in strpbrk()
Closes GH-4598
2019-11-22 00:36:54 +01:00
Christoph M. Becker
424d34d1c0 Make test more resilient
`socket_bind()` may raise `E_WARNING` on failure, which would cause the
test to be marked as borked.  Since we're checking the return value
anyway, we can silence warnings.
2019-11-21 13:40:36 +01:00
Christoph M. Becker
b40799efcd Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #78849: GD build broken with -D SIGNED_COMPARE_SLOW
2019-11-21 10:04:03 +01:00
Christoph M. Becker
b78ec58f09 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #78849: GD build broken with -D SIGNED_COMPARE_SLOW
2019-11-21 10:02:33 +01:00
Christoph M. Becker
b4f501d5a4 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #78849: GD build broken with -D SIGNED_COMPARE_SLOW
2019-11-21 10:01:05 +01:00
Christoph M. Becker
9b92c1d154 Fix #78849: GD build broken with -D SIGNED_COMPARE_SLOW
Apparently, this has not been tested for a long time, and might be a
refactoring relict.  Anyhow, we have to pass the context to
`GIFNextPixel` as well.
2019-11-21 09:59:26 +01:00
Tyson Andre
f7c44ef2a0 Make opcache infer array_key_exists is non-null bool
array_key_exists now throws a TypeError instead of returning null
for invalid arguments after 14bdb0cfc7
2019-11-20 00:11:51 +03:00
Fabien Villepinte
e2a8cc0114 Fix typo with msgfmt_parse_message() 2019-11-19 19:48:13 +01:00
Michael Voříšek
7a5dbcd660 Remove clearstatcache function prototype defned twice 2019-11-18 14:36:10 +01:00
Fabien Villepinte
f67b27fac6 Fix typo in pcntl_sigwaitinfo proto 2019-11-18 12:53:36 +01:00
Fabien Villepinte
2adb1bba17 Fix proto of forward_static_call_array
Closes GH-4928.
2019-11-18 12:46:05 +01:00
Máté Kocsis
c58b12334d Add union return types with one class 2019-11-18 12:44:38 +01:00
Máté Kocsis
100552d4b5 Add stubs for PDO 2019-11-18 12:38:10 +01:00
Craig Duncan
a9e8cd2b6b Convert the example skeleton extension to use arginfo stubs 2019-11-18 11:41:24 +01:00
Dmitry Stogov
8bf663d3b2 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix $x = (bool)$x; for undefined with opcache
2019-11-18 11:29:38 +03:00
Dmitry Stogov
be6fb13873 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix $x = (bool)$x; for undefined with opcache
2019-11-18 11:27:43 +03:00
Dmitry Stogov
e72e3370c6 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix $x = (bool)$x; for undefined with opcache
2019-11-18 11:26:30 +03:00
Tyson Andre
a2c41c0ea6 Fix $x = (bool)$x; for undefined with opcache
And `$x = !$x`

Noticed while working on GH-4912

The included test would not emit undefined variable errors in php 8.0
with opcache enabled. The command used:

```
php -d zend_extension=opcache.so --no-php-ini -d error_reporting=E_ALL \
    -d opcache.file_cache= -d opcache.enable_cli=1  test.php
```
2019-11-18 11:24:03 +03:00
Christoph M. Becker
5b9725e555 Add missing zend_parse_parameters_none() 2019-11-16 18:20:39 +01:00
Máté Kocsis
65db340ae7 Add stubs for the Locale component of Intl 2019-11-16 18:15:03 +01:00
Nikita Popov
292a1aeb59 Support union types for args in gen stubs
Using this requires care! The zpp implementation for this union
must be consistent with the arginfo implementation!

Apart from array|object, this is probably only the case for
int|float right now.
2019-11-15 17:33:37 +01:00
Nikita Popov
0cec268d15 Support single class unions in gen stubs 2019-11-15 17:19:26 +01:00
Nikita Popov
468ecf295d Fix DateTimeImmutable stubs
These were referencing the arginfo from the functions, instead of
the methods, which isn't right, as the functions have return types.
2019-11-15 16:02:26 +01:00
Nikita Popov
40dcf2bd3d password_hash() can't return false 2019-11-15 12:43:57 +01:00
Nikita Popov
bb41a1b7e7 Fix str_pad rc info
This fixes at least part of bug #78811.
2019-11-15 12:37:24 +01:00
Christoph M. Becker
39d04f15f8 Fix ASLR related invalid opline handler issues
Opcache stores `opline->handler`s in shared memory.  These pointers are
invalid, if the main PHP DLL is loaded at another base address due to
ASLR.  We therefore store the address of `execute_ex` in the mmap base
file, and check on startup whether it matches its current address.  If
not, we fall back on the file cache if enabled, and bail out otherwise.

This still does not address cases where the opline handler is located
inside of another DLL (e.g. for some profilers, debuggers), but there
seems to be no general solution for now.

(cherry picked from commit 8ba10b8fbc)
2019-11-15 09:46:58 +01:00
Christoph M. Becker
2de79f0855 Make the $num_points parameter of php_imagepolygon optional
That parameter is mostly useless in practise, and likely has been
directly ported from the underlying `gdImagePolygon()` and friends,
which require that parameter since the number of elements of the point
array would otherwise be unknown.  Typical usages of `imagepolygon()`,
`imageopenpolygon()` and `imagefilledpolygon()` pass `count($points)/2`
or hard-code this value as literal.  Since explicitly specifying this
parameter is annoying and error-prone, we offer the possibility to omit
it, in which case the `$points` array must have an even number of
elements, and the number of points is calculated as `count($points)/2`.
2019-11-15 09:41:10 +01:00
Fabien Villepinte
d65e59de9b Merge branch 'PHP-7.4' 2019-11-13 21:15:59 +01:00
Fabien Villepinte
92fd96531c Add more CONFLICTS tags
Closes GH-4908.
2019-11-13 20:59:23 +01:00
Dmitry Stogov
36afe4e39e Optimize $x === null into is_null($x) 2019-11-12 13:49:55 +03:00
Dmitry Stogov
bd45881014 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fixed wrong constant usage
2019-11-12 13:00:37 +03:00
Dmitry Stogov
49fcbb4810 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fixed wrong constant usage
2019-11-12 13:00:27 +03:00
Dmitry Stogov
9083e178f6 Fixed wrong constant usage 2019-11-12 12:59:50 +03:00
Dmitry Stogov
d94c27dcca Fixed JIT for TYPE_CHECK opcode (exception handling in case of undefined argument) 2019-11-12 10:42:29 +03:00
Stanislav Malyshev
ad0a3f2886 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix bug #78804 - Segmentation fault in Locale::filterMatches
2019-11-11 23:08:52 -08:00
Stanislav Malyshev
686a24c1eb Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix bug #78804 - Segmentation fault in Locale::filterMatches
2019-11-11 23:08:44 -08:00
Stanislav Malyshev
ea2a125789 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix bug #78804 - Segmentation fault in Locale::filterMatches
2019-11-11 23:08:38 -08:00
Stanislav Malyshev
2c9926f156 Fix bug #78804 - Segmentation fault in Locale::filterMatches 2019-11-11 22:32:35 -08:00
Christoph M. Becker
735c4cab74 Make test more resilient
`socket_bind()` may raise `E_WARNING` on failure, which would cause the
test to fail.
2019-11-11 18:08:54 +01:00
Christoph M. Becker
8c5ca24e11 Fix clean section of test case 2019-11-11 15:57:42 +01:00
Christoph M. Becker
dccd137e1a iconv_strlen() cannot return a string 2019-11-11 15:40:59 +01:00
Máté Kocsis
27e83d0fb8 Add union return types for function stubs 2019-11-11 14:54:55 +01:00
Christoph M. Becker
2804ea6127 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix test case for Windows
2019-11-11 12:56:55 +01:00
Christoph M. Becker
ce047e6091 Fix test case for Windows 2019-11-11 12:49:32 +01:00
Christoph M. Becker
0a33536526 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix test cases which fail on Windows debug builds
2019-11-11 12:34:50 +01:00
Christoph M. Becker
60081ca20d Fix test cases which fail on Windows debug builds
We use the portable {TMP} instead of the hard-coded /tmp, and skip
mysqli_debug_append.phpt on Windows, because unlinking the trace file
while the connection is still open won't work there.
2019-11-11 12:14:38 +01:00
Christoph M. Becker
adcc35916a Properly declare methods
While declaring methods with `PHP_FALIAS` kind of works, it is
semantically confusing, and also doesn't allow to specify access flags.
2019-11-11 10:58:21 +01:00