Commit Graph

117030 Commits

Author SHA1 Message Date
Nikita Popov
7ce531f2c2 Make constant() error handling consistent with plain const lookup
This means we get an Error exception and a much better error
message indicating the root cause (e.g. accessing a private class
constant).
2020-01-10 13:39:56 +01:00
Nikita Popov
0a2f6c5527 Move undefined constant error into get_constant_ex
All the other error conditions are already handled in there, so
this one should be as well.
2020-01-10 11:48:10 +01:00
George Peter Banyard
b79efec994 Remove unused delimiter parameter in php_fgetcsv_lookup_trailing_spaces subroutine. 2020-01-10 03:38:16 +01:00
Christoph M. Becker
f6c9319bec Merge branch 'PHP-7.4'
* PHP-7.4:
  Silence potential taskkill error messages
2020-01-09 19:03:43 +01:00
Christoph M. Becker
bf629baa9c Silence potential taskkill error messages
That test is still intermittently failing, because failure to kill the
child process is reported.  Therefore we silence these error messages.
2020-01-09 19:01:37 +01:00
Nikita Popov
55618ff118 Convert infallible mysqli checks to asserts 2020-01-09 18:56:30 +01:00
Nikita Popov
307dd465c1 Remove unused MYSQLI_STATUS_CLEARED 2020-01-09 18:56:30 +01:00
Christoph M. Becker
c13077a895 Fix test
The typo in the echoed string had been fixed in master; fix the
expectation as well.
2020-01-09 18:40:58 +01:00
Christoph M. Becker
b2aac6cc3a Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix useless tests
2020-01-09 17:44:41 +01:00
Christoph M. Becker
cfa9e5e05e Fix useless tests
These tests are certainly not supposed to fail due to a typo in the
class names, but expect this failure.  We fix the typos and the
expectations.
2020-01-09 17:42:22 +01:00
Christoph M. Becker
f1e00033e6 Allows further tests to run on Windows 2020-01-09 12:04:29 +01:00
Christoph M. Becker
718fc4cefd Use IS_WINDOWS 2020-01-09 12:04:28 +01:00
Christoph M. Becker
10c420f84a Replace fakemail with minimal PHP script 2020-01-09 12:04:28 +01:00
Christoph M. Becker
64633044c5 Unify mail related tests for *nix and Windows
Currently mail related tests are split for *nix and Windows (if there
are even Windows versions).  The basic difference is that the *nix
variants set the INI directive sendmail_path to just write the email to
disk, while the Windows tests use ext/imap.  The latter tests are way
more verbose, and such duplicated tests are generally a pain point.
Furthermore, the Windows tests are much slower, and could not be run
without ext/imap being available.

We therefore introduce a small fakemail application, which basically
works like `tee <path> >/dev/null`, and which will be shipped with the
Windows tests packs.  fakemail.exe would also need to be added to the
PHP binary SDK, so these tests could be run during developments.

To cater to the remaining differences, we also introduce support for
`{MAIL:<path>}` placeholders in the INI sections to run-tests.php.  How
to use this can be seen in mail_basic.phpt, which is currently the only
modified test case, because these tests are yet supposed to fail on
Windows, due to the missing fakemail.exe in the PHP SDK.
2020-01-09 12:04:28 +01:00
Nikita Popov
0a9bdd6e7b Merge branch 'PHP-7.4'
* PHP-7.4:
  Increase select timeout in FPM tester
2020-01-09 10:20:28 +01:00
Nikita Popov
b3cc30adf8 Increase select timeout in FPM tester
Let's see if that helps with the recent failure spree on Azure.
2020-01-09 10:19:02 +01:00
Christoph M. Becker
aa5a24d6fc Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #79086: Bump version not applied
2020-01-09 09:26:58 +01:00
Christoph M. Becker
d684f5fdc0 Fix #79086: Bump version not applied
We must not forget to update the version in configure.ac as well.
2020-01-09 09:25:52 +01:00
George Peter Banyard
b670823749 Convert some warnings to Errors in BZip2
Closes GH-4984
2020-01-09 00:58:12 +01:00
George Peter Banyard
928afd8fb7 Convert some warnings to Error in zlib extension
Closes GH-4985
2020-01-09 00:56:58 +01:00
George Peter Banyard
66659d6cf6 [ci skip] Update UPGRADING 2020-01-09 00:38:47 +01:00
Christoph M. Becker
5836c7063b Avoid superfluous assignments
These values are already set via the initializers.
2020-01-09 00:17:14 +01:00
Christoph M. Becker
3c6a230b71 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #79078: Hypothetical use-after-free in curl_multi_add_handle()
2020-01-08 18:43:35 +01:00
Christoph M. Becker
b2864b7cfd Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #79078: Hypothetical use-after-free in curl_multi_add_handle()
2020-01-08 18:31:38 +01:00
Christoph M. Becker
0dda4a844e Fix #79078: Hypothetical use-after-free in curl_multi_add_handle()
To avoid this, we have to verify the handlers already in
`curl_multi_add_handle()`, not only in `curl_multi_exec()`.
2020-01-08 18:29:10 +01:00
Christoph M. Becker
21426793b9 Merge branch 'PHP-7.4'
* PHP-7.4:
  Bump version
2020-01-08 18:27:53 +01:00
Christoph M. Becker
7ea4f0e47e Bump version 2020-01-08 18:26:14 +01:00
Christoph M. Becker
8f185d3586 Merge branch 'PHP-7.4'
* PHP-7.4:
  Extract function
2020-01-08 16:56:28 +01:00
Christoph M. Becker
a6d385a8e8 Extract function
As suggested by Nikita[1].

[1] <https://github.com/php/php-src/pull/5045#discussion_r364265013>
2020-01-08 16:55:13 +01:00
Nikita Popov
d5f26de63d Merge branch 'PHP-7.4'
* PHP-7.4:
  Revert "Display a message if select in FPM test timeouts"
2020-01-08 16:32:00 +01:00
Nikita Popov
4b860c06ed Revert "Display a message if select in FPM test timeouts"
This reverts commit e2361498d5.

Ooops, this occurs normally during some tests, but I didn't notice
because I have slow tests disabled...
2020-01-08 16:31:33 +01:00
Nikita Popov
c669a1a4da Merge branch 'PHP-7.4'
* PHP-7.4:
  Display a message if select in FPM test timeouts
2020-01-08 15:57:21 +01:00
Nikita Popov
e2361498d5 Display a message if select in FPM test timeouts 2020-01-08 15:57:05 +01:00
Nikita Popov
d0d1654a34 Fix #49555: Improve "function must be a string" error message
Be more specific for the individual cases and provide relevant
type information.
2020-01-08 14:32:11 +01:00
Nikita Popov
33476ec301 Refer to method rather than function name in error message 2020-01-08 14:26:27 +01:00
Nikita Popov
ae5d7604f6 Fix #65274: Add class name to undef class constant error 2020-01-08 14:18:14 +01:00
George Peter Banyard
4cac97bfb9 Add warning and convert to exception in string offset assignment:
Convert the empty string assignment to an Error as per RFC [1]
Add a warning that only the first byte will be assigned to the offset if provided
a needle that is longer than one byte.

[1] https://wiki.php.net/rfc/engine_warnings

Closes GH-5063
2020-01-07 22:55:43 +01:00
George Peter Banyard
483efc7e50 Allow empty needles in mb_strpos and mb_strstr function family.
MBstring analogous implementation to 6d578482a9

Closes GH-4977
2020-01-07 22:53:35 +01:00
George Peter Banyard
bfe3f934a3 Add warning and convert to exception in string offset assignment:
Convert the empty string assignment to an Error as per RFC [1]
Add a warning that only the first byte will be assigned to the offset if provided
a needle that is longer than one byte.

[1] https://wiki.php.net/rfc/engine_warnings
2020-01-07 21:54:42 +01:00
Christoph M. Becker
b8609e2fa7 Merge branch 'PHP-7.4'
* PHP-7.4:
  Make test more resilient
2020-01-07 15:29:51 +01:00
Christoph M. Becker
eaa93f6b8a Make test more resilient
Depending on the libcurl version and perhaps configuration, it may show
additional info (due to `CURLOPT_VERBOSE` being activated), which we
have to ignore, to avoid spurious test failures.
2020-01-07 15:28:48 +01:00
Nikita Popov
1e4920c119 Renumber zval types, clarify allowed overlap
Make it clear that types used for type declarations can overlap
with the rest, and can also overlap in MAY_BE space.

This makes things more robust against the addition of new primitive
types.
2020-01-07 14:55:52 +01:00
Christoph M. Becker
da48d25ea2 Merge branch 'PHP-7.4'
* PHP-7.4:
  Increase sleep() time in test case
2020-01-07 14:27:34 +01:00
Christoph M. Becker
896f7533ee Increase sleep() time in test case
Apparently, the former increase to `sleep(2)` helped somewhat, but
still the test fails occassionally.
2020-01-07 14:26:31 +01:00
Christoph M. Becker
3e075cadfb Merge branch 'PHP-7.4'
* PHP-7.4:
  Bump version
2020-01-07 11:13:24 +01:00
Christoph M. Becker
1eb2379aa3 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Bump version
2020-01-07 11:10:55 +01:00
Christoph M. Becker
38c0a53b60 Bump version 2020-01-07 11:03:19 +01:00
Nikita Popov
9b6c0bdcd6 Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove support for preloading on Windows
2020-01-06 22:42:31 +01:00
Nikita Popov
59c3ddab13 Remove support for preloading on Windows
Due to ASLR restrictions, preloading on Windows does not work with
any code that has preloading dependencies on internal classes.
This effectively makes it unusable for any non-trivial codebase.

Instead of pretending like preloading is going to work, only to
make people realize that it really doesn't once they get beyond
a dummy example, we disable support for preloading on Windows
entirely.

Closes GH-4999.
2020-01-06 22:41:55 +01:00
Nikita Popov
b22daa3a06 Merge branch 'PHP-7.4'
* PHP-7.4:
  Throw Error when referencing uninit typed prop in __sleep
2020-01-06 18:47:44 +01:00