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

123858 Commits

Author SHA1 Message Date
Nikita Popov
7b7a192d76 Merge branch 'PHP-8.0'
* PHP-8.0:
  Remove custom curl build on community job
2021-05-07 12:40:43 +02:00
Nikita Popov
9bf1224d07 Remove custom curl build on community job
This should no longer be necessary now that we're on Ubuntu 20.04.
2021-05-07 12:40:28 +02:00
Nikita Popov
50b4a7adf9 Property handle unset name on ReflectionClassConstant
While the typed property ensures that the value is a string,
we should make sure that we handle an unset property gracefully.

Do this by throwing the same error we would normally throw if
you access an uninitializde typed property.
2021-05-07 12:39:17 +02:00
Nikita Popov
26860c6b6a Fix -Wmaybe-uninitialized warning in intl uchar
This variable can indeed be uninitialized when passed to convert_cp,
though it will not actually be used if uninitialized. This is
still UB though, so let's fix it.
2021-05-07 12:20:16 +02:00
George Peter Banyard
c757c61a8c Remove unnecessary error handler replacement in SPL
Document why it is needed in the remaining cases
Drive-by refactoring

Closes GH-6955
2021-05-07 11:17:56 +01:00
Nikita Popov
9eb295fc4c Fix -Wreturn-local-addr warning
zend_string_dup() can return the original string if it is interned.
Of course, the string can't be interned here, but GCC doesn't know
that and throws a warning in release builds.

Replace zend_string_dup() (which is a bad API anyway) with a direct
call to zend_string_init(), which makes it more obvious that the
original alloca'd string cannot be reused.
2021-05-07 12:11:52 +02:00
George Peter Banyard
2f1d0f2bc3 Throw directly instead of replacing error handler in ext/date (#6954) 2021-05-07 11:10:39 +01:00
Nikita Popov
b9cfd288e5 Merge branch 'PHP-8.0'
* PHP-8.0:
  Update community, coverage and file cache jobs to Ubuntu 20.04
2021-05-07 11:31:36 +02:00
Nikita Popov
674b884c7a Update community, coverage and file cache jobs to Ubuntu 20.04
This fixes the issue with apt, and seems like a good idea in
general. The msan job is now the only one on 18.04, but that one
needs more work.
2021-05-07 11:29:34 +02:00
Nikita Popov
91dc10c906 Store SplFileObject open_mode as zend_string 2021-05-07 11:23:05 +02:00
Nikita Popov
9602db3b4a Fix open_mode for SplTempFileObject
open_mode was initialized to "wb", but the length set only to 1.
The effect of this was that the stream is opened using "wb", but
we only report "w".

Fix the length to report the actually used open_mode.
2021-05-07 11:18:51 +02:00
Nikita Popov
3b3f6de782 Use zend_string_concat3 in one place
A bit nicer than snprintf + passing the same length around three
times.
2021-05-07 10:43:40 +02:00
Nikita Popov
06e8ed5c86 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix azure build
2021-05-07 10:27:15 +02:00
Nikita Popov
bcea74fd13 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix azure build
2021-05-07 10:26:59 +02:00
Nikita Popov
8deadfa31b Fix azure build
This is only needed on ubuntu-18.04, it works fine on ubuntu-20.04.
2021-05-07 10:26:04 +02:00
Calvin Buckley
207666ee84 Implement server type/version for PDO_ODBC getAttr (#6935)
As an example using the IBM Db2i ODBC driver:

    PDO::ATTR_SERVER_INFO: DB2/400 SQL
    PDO::ATTR_SERVER_VERSION: 07.02.0015
2021-05-06 20:15:13 -05:00
George Peter Banyard
2cd5a200f5 Refactor php_date_initialize_from_hash()
Use early returns
Formalize return type to bool
2021-05-06 21:48:52 +01:00
Ayesh Karunaratne
251da73a9a [skip-ci] Update UPGRADING file with new IMAP namespace
Followed by the bundled extension namespace RFC, #6925 updated the `IMAPConnection` class to `IMAP\Connection`.

This updates the UPGRADING file to reflect that change.
2021-05-06 20:57:56 +01:00
Nikita Popov
ed33262dbb Disable destructors on fuzzer bailout
This is what we normally do for fatal errors. The reason why this
became necessary now, is that a bailout can switch from a fiber
back to the main stack. In that case we do not want to try
destroying the fiber.

Fixes oss-fuzz #33917.
2021-05-06 18:42:38 +02:00
Remi Collet
e5b6f43ec7 get rid of inet_addr usage 2021-05-06 16:32:06 +02:00
Remi Collet
9ba3c367f7 fix litespeed build 2021-05-06 15:57:38 +02:00
K
efe79e0de6 Simplify unpack logic (#6908)
- move endiannes check to compile time
- remove php_unpack function
- the compiler take care of sign extension
2021-05-06 15:20:05 +02:00
Christoph M. Becker
66ad7095b0 Merge branch 'PHP-8.0'
* PHP-8.0:
  Add simple Firebird payload fake server to test suite
2021-05-06 14:51:02 +02:00
Christoph M. Becker
fb2bf8bd58 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Add simple Firebird payload fake server to test suite
2021-05-06 14:50:22 +02:00
Christoph M. Becker
f95f8a3c1e Add simple Firebird payload fake server to test suite
This is meant to test against certain fixed responses of Firebird
servers.  For now we add just a most basic test which verifies a
connection attempt.

Closes GH-6940.
2021-05-06 14:47:57 +02:00
Nikita Popov
9ff8d362b3 Merge branch 'PHP-8.0'
* PHP-8.0:
  opcache: more reliable way to get the current binary on solaris/illumos
2021-05-06 14:34:28 +02:00
David Carlier
d87d2f006c opcache: more reliable way to get the current binary on solaris/illumos
Closes GH-6920.
2021-05-06 14:33:53 +02:00
Remi Collet
f9547f2b47 get rid of inet_aton and inet_ntoa use inet_ntop iand inet_pton where available standardize buffer size 2021-05-06 13:39:58 +02:00
KsaR
01b3fc03c3 Update http->https in license (#6945)
1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https.
2. Update few license 3.0 to 3.01 as 3.0 states "php 5.1.1, 4.1.1, and earlier".
3. In some license comments is "at through the world-wide-web" while most is without "at", so deleted.
4. fixed indentation in some files before |
2021-05-06 12:16:35 +02:00
Nikita Popov
13467bdcc0 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fixed bug #81015
2021-05-06 10:47:22 +02:00
Nikita Popov
dd3e56ba24 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fixed bug #81015
2021-05-06 10:46:30 +02:00
Nikita Popov
178bbe3478 Fixed bug #81015
Make sure that the previous opline is part of the same block,
otherwise it may be non-dominating.

The test case does not fail on PHP-7.4, but I think the general
problem can appear on 7.4 as well, so I'm applying the patch to
that branch.
2021-05-06 10:46:00 +02:00
Aaron Piotrowski
779fe8e43a Check current_execute_data instead of flags in fiber destructor
Checking EG(current_exectue_data) throws into the previous fiber instead of triggering a fatal error during shutdown. A fatal error is triggered only if the throwing destroyed fiber was resumed from {main}.
2021-05-05 10:48:30 -05:00
Nikita Popov
f9ac667b98 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fixed bug #81007
2021-05-05 16:54:06 +02:00
Nikita Popov
bf9dc53435 Fixed bug #81007
Backport a change from the master branch. We usually test 32-bit
using -m32 from an x86-64 host, probably nobody tried using an
actual 32-bit host.
2021-05-05 16:53:43 +02:00
Máté Kocsis
7df7867624 Merge branch 'PHP-8.0'
* Fix the signature of PDOStatement::fetchObject()
2021-05-05 16:51:23 +02:00
Máté Kocsis
068c8db276 Fix the signature of PDOStatement::fetchObject()
The ?array $ctorArgs = null parameter is changed to array $constructorArgs = [], and an additional memory leak revealed by the new test case is fixed.

Closes GH-6937

Co-Authored-By: Nikita Popov <nikita.ppv@gmail.com>
2021-05-05 16:48:22 +02:00
Christoph M. Becker
1779f6838d Merge branch 'PHP-8.0'
* PHP-8.0:
  Add CONFLICTS file for PDO firebird tests
2021-05-05 15:26:23 +02:00
Christoph M. Becker
9e51b487f3 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Add CONFLICTS file for PDO firebird tests
2021-05-05 15:24:58 +02:00
Nikita Popov
896e4d3428 Add CONFLICTS file for PDO firebird tests
Just in case anybody executes these test in parallel on PHP 7.4.

(cherry picked from commit b4ffe54174)

Closes GH-6943.
2021-05-05 15:24:30 +02:00
George Peter Banyard
27d40da95d Convert IMAPConnection to IMAP\Connection 2021-05-05 14:22:43 +01:00
Christoph M. Becker
f932d3d356 Merge branch 'PHP-8.0'
* PHP-8.0:
  Update version in php_version.h as well
2021-05-05 15:21:21 +02:00
Christoph M. Becker
8294ad3295 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Update version in php_version.h as well
2021-05-05 15:20:37 +02:00
Christoph M. Becker
125fc0b8d4 Update version in php_version.h as well
The version there is automatically updated during `./configure`, but
not on Windows.
2021-05-05 15:18:46 +02:00
Nikita Popov
fb374f56a7 Rethrow exceptions in fiber destructor
We need to make sure that HANDLE_EXCEPTION is set when the fiber
throws during destruction.

Fixes oss-fuzz #33875.
2021-05-05 12:49:47 +02:00
Nikita Popov
c15dc63ad2 Merge branch 'PHP-8.0'
* PHP-8.0:
  openssl_pkcs7_read: input is data not filename
2021-05-05 09:50:11 +02:00
Vincent JARDIN
bb0107b63d openssl_pkcs7_read: input is data not filename
The argument should be an input string and not a filename.

Fix: https://github.com/php/doc-en/pull/559
Suggested-by: George Peter Banyard <girgias@php.net>

Closes GH-6942.
2021-05-05 09:49:53 +02:00
Sara Golemon
230ccda431 Merge branch 'PHP-8.0'
* PHP-8.0:
  Reset for 8.0.7
2021-05-04 17:18:40 +00:00
Sara Golemon
f020d537b0 Reset for 8.0.7 2021-05-04 17:17:20 +00:00
Christoph M. Becker
592cfa309e Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix #81011: mb_convert_encoding removes references from arrays
2021-05-04 18:40:23 +02:00