1
0
mirror of https://github.com/php/php-src.git synced 2026-04-17 13:01:02 +02:00
Commit Graph

118480 Commits

Author SHA1 Message Date
Christoph M. Becker
6086343a91 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #79561: dns_get_record() fails with DNS_ALL
2020-05-04 23:02:00 +02:00
Christoph M. Becker
ed6bf0bc69 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #79561: dns_get_record() fails with DNS_ALL
2020-05-04 23:00:56 +02:00
Christoph M. Becker
c40a494406 Fix #79561: dns_get_record() fails with DNS_ALL
Since Windows has its own definitions of the `PHP_DNS_*` macros, we
have to use these when registering the PHP constants.
2020-05-04 22:59:38 +02:00
AllenJB
50752401a7 Change the default PDO error mode to exceptions
According to <https://www.php.net/manual/en/pdo.error-handling.php>.
2020-05-04 22:51:47 +02:00
Nikita Popov
8ffbd4653e Perform isupper check using sse2 as well
Rather than just vectorizing the lowering, also vectorize the
check for uppercase characters, using the same method.
2020-05-04 19:19:54 +02:00
Nikita Popov
4c24545aab Merge branch 'PHP-7.4'
* PHP-7.4:
  Fixed bug #79548
2020-05-04 16:30:34 +02:00
Nikita Popov
21a9ad910b Fixed bug #79548
When duplicating user functions with static variables, make sure
that we init a new map ptr slot for the static variables.
2020-05-04 16:27:45 +02:00
Nikita Popov
2dc4481fa9 Extract one more function from proc_open() implementation 2020-05-04 15:24:23 +02:00
Alex Dowad
51b0494e2f Clean up proc_open() implementation
Closes GH-5507.
2020-05-04 15:04:58 +02:00
Nikita Popov
66d57bf8d6 Remove unused is_persistent flag
I dropped the assignment to it before, but did not drop the
struct member.
2020-05-04 14:59:35 +02:00
Nikita Popov
f55b413d60 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fixed bug #79535
2020-05-04 14:52:42 +02:00
Nikita Popov
733d84dbdf Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fixed bug #79535
2020-05-04 14:52:18 +02:00
Nikita Popov
7c1316ec6a Fixed bug #79535
We did not allocate a cache slot for FETCH_CLASS. This is already
fixed on newer PHP versions.
2020-05-04 14:51:18 +02:00
Nikita Popov
7561f91796 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix i386 build on Azure
2020-05-04 14:35:33 +02:00
Nikita Popov
9c5d9b4925 Fix i386 build on Azure
Disabling postgresql entirely for now, because I can't figure out
how to fix it. Something broke big time with i386 packages on
Azure pipelines.
2020-05-04 14:35:16 +02:00
George Peter Banyard
8d346f7679 Use ZPP int|string and add ValueError for Windows codepages
Closes GH-5517
2020-05-04 12:44:54 +02:00
Christoph M. Becker
2787d0f8dd Merge branch 'PHP-7.4'
* PHP-7.4:
  Add basic sapi_windows_cp_conv() test
2020-05-04 11:52:01 +02:00
Christoph M. Becker
ef54899fd1 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Add basic sapi_windows_cp_conv() test
2020-05-04 11:50:50 +02:00
Christoph M. Becker
d950969e59 Add basic sapi_windows_cp_conv() test
This function is lacking any tests so far.
2020-05-04 11:50:03 +02:00
Christoph M. Becker
54cf9a26c1 Use libenchant2 if available on Windows
This is basically the same as commit 3427545[1], but for Windows.

[1] <http://git.php.net/?p=php-src.git;a=commitdiff;h=342754575237da912874f781a24eefe76434ce5a>
2020-05-04 11:27:00 +02:00
Remi Collet
3427545752 Use libenchant-2 when available 2020-05-04 08:27:31 +02:00
Christoph M. Becker
69888c3ff1 Fix #79467: data:// wrappers are writable
Despite the docs claiming that data: wrappers would not be writable[1],
they are implemented as writing to a memory stream.  That does not seem
to be particularly sensible, so we disallow writing altogether.

[1] <https://www.php.net/manual/en/wrappers.data.php#refsect1-wrappers.data-options>
2020-05-03 12:19:37 +02:00
George Peter Banyard
34f727e637 Use ZPP check for string|int|null arguments in array_column() 2020-05-02 19:50:51 +02:00
George Peter Banyard
7b74fc7a7b Add Fast ZPP string|int type check 2020-05-02 19:50:51 +02:00
Christoph M. Becker
5a628402a0 Don't raise bogus warning if writing completely failed 2020-05-02 16:32:29 +02:00
Nikita Popov
ba54a46df4 Remove is_persistent flag from proc_open implementation
We don't support persistent proc_open handles and have no plan
to suppor them. The mixture of persistent and non-persistent
allocations functions in this code is somewhat confusing to read.
2020-05-02 15:33:29 +02:00
Máté Kocsis
ffcc8135e2 Convert UNKNOWN default values to null in ext/date
Closes GH-5509
2020-05-02 11:05:37 +02:00
Máté Kocsis
089d8cb03c Convert UNKNOWN default values to null in ext/calendar 2020-05-02 11:05:27 +02:00
Máté Kocsis
8a41c9e025 Convert UNKNOWN default values to null in ext/bcmath 2020-05-02 11:05:19 +02:00
Tyson Andre
d63eca285a Fix miscellaneous typos in code comments/var names
Closes GH-5501
2020-05-01 15:49:05 +02:00
Máté Kocsis
31a626cf7e Remove the deprecated is_real() function
Closes GH-5506
2020-05-01 15:33:58 +02:00
Christoph M. Becker
1d20443679 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #79528: Different object of the same xml between 7.4.5 and 7.4.4
2020-05-01 12:42:09 +02:00
Christoph M. Becker
9b9252c667 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #79528: Different object of the same xml between 7.4.5 and 7.4.4
2020-05-01 12:40:37 +02:00
Christoph M. Becker
54148fd686 Fix #79528: Different object of the same xml between 7.4.5 and 7.4.4
Revert "Fix #61597: SXE properties may lack attributes and content"

This reverts commit 7c081db885.
2020-05-01 12:37:39 +02:00
Alex Dowad
7b32d176d2 Avoid spurious failures of MySQL INSERT packet overflow test
This test creates a MySQL table called 'test'. In several cases, I have seen a spurious
test failure (in CI) with an error message saying: "table 'test' already exists".

It may be that another test had used a table with the same name and not cleaned it out
correctly. Or maybe we have multiple tests running in parallel in some CI environments,
or the same test DB being used for multiple runs of the test suite.

In any case, change the table name so it is exclusive to this test case only. Also, if
the test table exists at the beginning of the test, drop it.

Closes GH-5479
2020-05-01 12:25:42 +02:00
Alex Dowad
86ed93c230 Try to make regression test for Bug #69900 consistent
It has been observed that in rare cases, this regression test has spurious failures in CI.
Try increasing the threshold for failure a bit and see if this makes it pass consistently.
2020-05-01 12:25:30 +02:00
Tyson Andre
54febdbc7d Fix other typos in param name/code comments
Closes GH-5502
2020-05-01 12:23:16 +02:00
Tyson Andre
1dbf923866 [skip ci] Fix a typo in UPGRADING
Confirmed that php_zip.c checks for `"enc_password"`

Closes GH-5503
2020-05-01 12:22:24 +02:00
Dmitry Stogov
968c31a43c Better handling of IS_UNDEF variables 2020-04-30 17:07:35 +03:00
Dmitry Stogov
3c04ce43ed Replace ZEND_ASSERT() by conditional compilation abort.
Prevent endless loop through ESCAPE code.
2020-04-30 15:32:01 +03:00
Xinchen Hui
f5fe4c3c38 Use ascii lowercase if locale is default C 2020-04-30 18:43:09 +08:00
Nikita Popov
c4ad8beaa8 Do not inherit LC_CTYPE locale from environment
Treatment of locales in PHP is currently inconsistent: The LC_ALL
locale is set to "C", as is standard behavior on program startup.
The LC_CTYPE locale is set to "", which will inherit it from the
environment. However, the inherited LC_CTYPE locale will only be
used in some cases, while in other cases it is necessary to perform
an explicit setlocale() call in PHP first. This is the case for
the locale-sensitive handling in the PCRE extension.

Make things consistent by *never* inheriting any locales from the
environment. LC_ALL, including LC_CTYPE will be "C" on startup.
A locale can be set or inherited through an explicit setlocale()
call, at which point the behavior will be fully consistent and
predictable.

Closes GH-5488.
2020-04-30 10:22:51 +02:00
Nikita Popov
707cb18276 Revert "Insert one more debug output"
This reverts commit 45cb42166d.
2020-04-30 09:55:25 +02:00
Nikita Popov
53eee290b6 Completely remove disabled functions from function table
Currently, disabling a function only replaces the internal
function handler with one that throws a warning, and a few
places in the engine special-case such functions, such as
function_exists. This leaves us with a Schrödinger's function,
which both does not exist (function_exists returns false) and
does exist (you cannot define a function with the same name).
In particular, this prevents the implementation of robust
polyfills, as reported in https://bugs.php.net/bug.php?id=79382:

    if (!function_exists('getallheaders')) {
        function getallheaders(...) { ... }
    }

If getallheaders() is a disabled function, this code will break.

This patch changes disable_functions to remove the functions from
the function table completely. For all intents and purposes, it
will look like the function does not exist.

This also renders two bits of PHP functionality obsolete and thus
deprecated:

 * ReflectionFunction::isDisabled(), as it will no longer be
   possible to construct the ReflectionFunction of a disabled
   function in the first place.
 * get_defined_functions() with $exclude_disabled=false, as
   get_defined_functions() now never returns disabled functions.

Fixed bug #79382.

Closes GH-5473.
2020-04-30 09:53:57 +02:00
Christoph M. Becker
8cb237345a Revert "Show eventual output of clean sections"
This reverts commit 5eb4ab07f2.
The temporary hack has served its purpose.
2020-04-30 09:51:10 +02:00
Remi Collet
1b98151734 doc enchant changes 2020-04-30 09:40:46 +02:00
Remi Collet
66d42e9884 remove deprecated call and deprecate function to be removed in libenchant v2
add LIBENCHANT_VERSION constant
2020-04-30 09:32:00 +02:00
Alex Dowad
8ddaf13ed3 Code tweaks: Remove unneeded semicolons 2020-04-29 23:17:40 +02:00
Nikita Popov
90705d44e3 Treat invalid characters in basename() consistently
Always simply ignore (pass through) them. Previously the behavior
depended on where the invalid character occurred, as it messed
up the state management.
2020-04-29 18:43:09 +02:00
Nikita Popov
d50a12629d Clean up naming in basename() implementation 2020-04-29 18:43:09 +02:00