Commit Graph

118657 Commits

Author SHA1 Message Date
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
Dmitry Stogov
65934d31d1 Improved tracing JIT for nested calls 2020-04-29 18:24:18 +03:00
Nikita Popov
0e0c608ce0 Merge branch 'PHP-7.4'
* PHP-7.4:
  Reduce test parallelism on ARM64 CI
2020-04-29 15:16:36 +02:00
Nikita Popov
7e14e03374 Reduce test parallelism on ARM64 CI
Let's go from 32 to 16 parallel jobs. We can reduce this further
if necessary.

Closes GH-5426.
2020-04-29 15:15:57 +02:00
Remi Collet
c3d6a0ac02 manage ZEND_DEP_FALIAS in gen_stub 2020-04-29 14:37:06 +02:00
Christoph M. Becker
daaaf2b4ff Merge branch 'PHP-7.4'
* PHP-7.4:
  Pass worker ID to clean scripts
2020-04-29 13:33:32 +02:00
Christoph M. Becker
9a98569efe Pass worker ID to clean scripts
On Windows, reusing/sharing of OPcache instances with different
configuration is not necessarily supported, so we have to make that it
does not happen for the clean scripts, by using `$orig_ini_settings`
instead of `$clean_params`.
2020-04-29 13:30:28 +02:00
Xinchen Hui
acee66ae8c Merge branch 'PHP-7.4'
* PHP-7.4:
  Fixed bug #79536 (zend_clear_exception prevent exception's destructor to be called).
2020-04-29 18:59:01 +08:00
Xinchen Hui
5d3b7ac92c 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 #79532: sizeof off_t can be wrong
  Make 045.phpt busy wait
  Revert "Fix #79065: DOM classes do not expose properties to Reflection"
  Bump version
  Fix #79065: DOM classes do not expose properties to Reflection
  Fix #79470: PHP incompatible with 3rd party file system on demand
2020-04-29 18:58:48 +08:00
Xinchen Hui
8555c2bff0 Fixed bug #79536 (zend_clear_exception prevent exception's destructor to be called). 2020-04-29 18:58:28 +08:00
Dmitry Stogov
faa57abe71 white space fixes 2020-04-29 13:29:01 +03:00
Nikita Popov
17d763ff47 JIT: Save opline before calling zend_timeout
tests/045.phpt started segfaulting, because the opline is not set
when zend_timeout is invoked.
2020-04-29 10:58:39 +02:00
Christoph M. Becker
38ecfe0245 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #79532: sizeof off_t can be wrong
2020-04-29 10:43:35 +02:00
Christoph M. Becker
67f9b0b754 Fix #79532: sizeof off_t can be wrong
We have to actually determine the proper `SIZEOF_OFF_T`.
Interestingly, it is `4` on Windows x64.

We also have to prevent the redefinition in pg_config.h.  The clean
solution would likely be to not include pg_config.h at all, but that's
out of scope for BC reasons for now.
2020-04-29 10:40:59 +02:00
Nikita Popov
533669f7c4 Remove redundant addref+dtor 2020-04-29 10:27:35 +02:00
Nikita Popov
dad5110860 Remove dead code
As pointed out by Girgias, index is always non-NULL here.
2020-04-29 10:22:11 +02:00
Nikita Popov
ef72b8f4ac Merge branch 'PHP-7.4'
* PHP-7.4:
  Make 045.phpt busy wait
2020-04-29 10:14:35 +02:00
Nikita Popov
b1b98e08d0 Make 045.phpt busy wait
The timeout is only real-time based on Windows. Make this use
a busy wait loop instead. If hard_timeout is broken, this will
fail with a run-tests enforced timeout instead.
2020-04-29 10:12:53 +02:00
Nikita Popov
8e411fe54e Revert "Merge branch 'sse2_strtolower' of https://github.com/laruence/php-src"
This reverts commit 5a6373f904, reversing
changes made to 45cb42166d.

This breaks strtolower-win32.phpt.
2020-04-29 09:49:01 +02:00
Christoph M. Becker
0b04b9347f Enclose contents of CLEAN sections in PHP tags
We also place the CLEAN sections before EXPECT(F), and remove
extraneous clean-ups.
2020-04-29 09:07:53 +02:00
Xinchen Hui
5a6373f904 Merge branch 'sse2_strtolower' of https://github.com/laruence/php-src
* 'sse2_strtolower' of https://github.com/laruence/php-src:
  Use ascii lowercase if locale is default C
2020-04-29 12:26:06 +08:00
Nikita Popov
45cb42166d Insert one more debug output 2020-04-28 21:06:32 +02:00
Gabriel Caruso
34c460f329
Check __set_state structure
Fix Bug #79521.

Closes GH-5462.
2020-04-28 17:02:03 +02:00
Nikita Popov
f545ee2c6c Allow optional trailing comma in parameter list
RFC: https://wiki.php.net/rfc/trailing_comma_in_parameter_list

Closes GH-5306.
2020-04-28 16:11:08 +02:00
Christoph M. Becker
5eb4ab07f2 Show eventual output of clean sections
This is a hack to investigate why mysqli_insert_packet_overflow.phpt
intermittently fails on AppVeyor, and will be reverted in due time.
See <https://github.com/php/php-src/pull/5447#issuecomment-620508790>.
2020-04-28 16:08:17 +02:00
Nikita Popov
88a701aa02 Less conservative fix
I think it's reasonable to assume that the only possible types
are those that are declared, and null, because null is what
return_value is initialized to.
2020-04-28 15:55:02 +02:00
Nikita Popov
0da38cda6e Fix JIT segfaults in FFI tests
Conservative fix that just disables this optimization.
2020-04-28 15:43:52 +02:00