1
0
mirror of https://github.com/php/php-src.git synced 2026-04-27 18:23:26 +02:00
Commit Graph

122195 Commits

Author SHA1 Message Date
Christoph M. Becker 8591bb70a4 Return early from php_search_array() 2020-12-04 01:17:26 +01:00
George Peter Banyard fec771db87 Merge branch 'PHP-8.0'
* PHP-8.0:
  Standardize behaviour for int message number between functions
  Add tests for passing a UID instead of a message number
2020-12-03 17:44:47 +00:00
George Peter Banyard 426fe2f20c Standardize behaviour for int message number between functions 2020-12-03 17:43:08 +00:00
George Peter Banyard e45cc31c41 Add tests for passing a UID instead of a message number 2020-12-03 16:38:22 +00:00
Nikita Popov 97338ba853 Merge branch 'PHP-8.0'
* PHP-8.0:
  Upload coverage data to codecov.io
2020-12-03 12:05:19 +01:00
Nikita Popov 724ee93ce6 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Upload coverage data to codecov.io
2020-12-03 12:05:14 +01:00
Paul Crovella 8f8e6f95af Upload coverage data to codecov.io
Closes GH-6486.
2020-12-03 12:04:50 +01:00
Nikita Popov a5dea658bf Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix mysqli_expire_password test for mariadb
2020-12-03 11:02:16 +01:00
Nikita Popov 1a1eeee716 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix mysqli_expire_password test for mariadb
2020-12-03 11:02:11 +01:00
Nikita Popov 0f6c41c6f8 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix mysqli_expire_password test for mariadb
2020-12-03 11:01:57 +01:00
Daniel Black 0697a64f7e Fix mysqli_expire_password test for mariadb
In MariaDB-10.4.3 EXPIRE passwords where supported for
MariaDB. This only behaves like MySQL when the system
variable disconnect_on_expired_passwords=1.

MariaDB if there was no password it could not be considered
expired. So the test is adjusted to use actual passwords.
(MariaDB commit a94b20a8e0d9e64eeaabdaaa7a3e03fcdb8a686e)

The error codes produced my MariaDB are different
however still conforming to the SQL specification.

Closes GH-6480.
2020-12-03 10:56:00 +01:00
Nikita Popov c0ea8363a6 Merge branch 'PHP-8.0'
* PHP-8.0:
  fix mysqli_stmt_get_result_metadata_fetch_field test for mariadb
2020-12-03 10:45:32 +01:00
Nikita Popov 98cccd304a Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  fix mysqli_stmt_get_result_metadata_fetch_field test for mariadb
2020-12-03 10:45:27 +01:00
Daniel Black 5d5c1cea5f fix mysqli_stmt_get_result_metadata_fetch_field test for mariadb
MariaDB extended the default decimal field to 39 characters
instead of MySQL's 31 characters.

This small change allows the test to pass on MySQL and MariaDB.

Closes GH-6484.
2020-12-03 10:45:11 +01:00
Nikita Popov aff9a850a1 Merge branch 'PHP-8.0'
* PHP-8.0:
  Remove PHP 5 mysqli tests
  Fix typos in mysql tests
2020-12-03 10:43:16 +01:00
Dharman 261faa62da Remove PHP 5 mysqli tests
These tests all require functions that no longer exist.
2020-12-03 10:42:46 +01:00
Dharman 53f7bddbeb Fix typos in mysql tests
%d because of line endings on Windows
2020-12-03 10:42:39 +01:00
Nikita Popov 52d3666863 Merge branch 'PHP-8.0'
* PHP-8.0:
  Backport fix for bug #78750
2020-12-03 10:22:27 +01:00
Nikita Popov 8d2a1c8966 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Backport fix for bug #78750
2020-12-03 10:22:21 +01:00
Peter Kokot d386ed1e6b Backport fix for bug #78750
Cherry-picks
fe2afef36f
and
86e2b7bb70.
2020-12-03 10:07:09 +01:00
Nikita Popov 15a33bc1e0 Merge branch 'PHP-8.0'
* PHP-8.0:
  Make is_file() and friends return false when path contains 0-byte
2020-12-03 09:45:23 +01:00
Christian Schneider 7bc7a80445 Make is_file() and friends return false when path contains 0-byte
These functions now return false silently:
is_writable, is_readable, is_executable, is_file, is_dir, is_link,
file_exists

These functions now throw a warning an return false (rather than
throwing a ValueError):
fileperms, fileinode, filesize, fileowner, filegroup, filetype,
fileatime, filemtime, filectime, lstat, stat

See also https://externals.io/message/112333.

Closes GH-6478.
2020-12-03 09:43:15 +01:00
Christoph M. Becker 52bd07e204 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix failing VirtualProtect() calls
2020-12-02 16:53:43 +01:00
Christoph M. Becker 72cd5793be Fix failing VirtualProtect() calls
Whenever JIT is disabled due to incompatibilities, we also need to set
`JIT_G(on)` to zero.

Closes GH-6470.
2020-12-02 16:51:50 +01:00
Nikita Popov 0040e59999 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fixed bug #80457
2020-12-02 11:29:56 +01:00
Nikita Popov 9dda22bd1e Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fixed bug #80457
2020-12-02 11:29:41 +01:00
Nikita Popov f2833ca1be Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fixed bug #80457
2020-12-02 11:29:06 +01:00
Nikita Popov d6fcaf5da4 Fixed bug #80457
On x32 sizeof(size_t) != sizeof(zend_long), so we need to be
careful with sign extension here.

Patch by bruno dot premont at restena dot lu.
2020-12-02 11:26:10 +01:00
Nikita Popov bfa4f8188d Don't disable phpdbg on macos
I'm not sure what the original issue here was, but it seems to
be working fine now, so let's make sure it stays that way...
2020-12-02 11:04:08 +01:00
Nikita Popov fef08723c1 Ensure consistent error message in phpdbg parser
This would be either $end or "end of file" depending on bison
version. Explicitly specify "end of command" instead, which seems
more appropriate in context.
2020-12-02 11:03:58 +01:00
Nikita Popov ecb1592ea6 Merge branch 'PHP-8.0'
* PHP-8.0:
  Don't throw from imagecreatefromstring() with too short string
2020-12-02 10:55:45 +01:00
Nikita Popov a89aaf6c38 Don't throw from imagecreatefromstring() with too short string
If the string is too short, we should treat this the same way as
an unrecognized image type. This function should be usable to
determine whether something is a valid image without doing any
checks beforehand.
2020-12-02 10:51:55 +01:00
Nikita Popov 2dcf71cbfd Merge branch 'PHP-8.0'
* PHP-8.0:
  Fixed bug #80462
2020-12-02 10:19:42 +01:00
Nikita Popov 7a61984a2b Fixed bug #80462 2020-12-02 10:19:32 +01:00
Sara Golemon 1071d85764 Flesh out HashTable insertion APIs
Fills out the array/object-property insert helpers for zend_array, zend_object, and zend_reference.

This adds the following matrix of 18 APIs
add_next_index_T()
add_index_T()
add_assoc_T()
add_assoc_T_ex()
add_property_T()
add_property_T_ex()

Where T in array, object, reference

Converted internal callsites currently doing an explicit object wrap.
2020-12-01 18:36:21 +00:00
George Peter Banyard 0811ccb44d Merge branch 'PHP-8.0'
* PHP-8.0:
  Backport IMAP test modernization to PHP-8.0 branch
2020-12-01 16:39:11 +00:00
George Peter Banyard 5aaffc8095 Backport IMAP test modernization to PHP-8.0 branch
Closes GH-6476
2020-12-01 16:38:08 +00:00
Christoph M. Becker 13eee7712e Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix #73809: Phar Zip parse crash - mmap fail
2020-12-01 17:00:53 +01:00
Christoph M. Becker 83cf4aa13a Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix #73809: Phar Zip parse crash - mmap fail
2020-12-01 17:00:27 +01:00
Christoph M. Becker c283f53b24 Fix #73809: Phar Zip parse crash - mmap fail
Phar signatures practically are of limited size; for the MD5 and SHA
hashes the size is fixed (at most 64 bytes for SHA512); for OpenSSL
public keys there is no size limit in theory, but "64 KiB ought to be
good enough for anybody".  So we check for that limit, to avoid fatal
errors due to out of memory conditions.

Since it is neither possible to have the signature compressed in the
ZIP archive, nor is it possible to manually add a signature via Phar,
we use ZipArchive to create a suitable archive for the test on the fly.

Closes GH-6474.
2020-12-01 16:58:19 +01:00
Dmitry Stogov f71cc45fb8 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fixed bug #80447 (Strange out of memory error when running with JIT)
2020-12-01 16:47:11 +03:00
Dmitry Stogov 44475e70e2 Fixed bug #80447 (Strange out of memory error when running with JIT) 2020-12-01 16:46:41 +03:00
Dmitry Stogov 828f6806f3 Merge branch 'PHP-8.0'
* PHP-8.0:
  Bug #80447 (Strange out of memory error when running with JIT)
2020-12-01 16:43:41 +03:00
Dmitry Stogov 1674c96c0b Bug #80447 (Strange out of memory error when running with JIT) 2020-12-01 16:43:05 +03:00
Nikita Popov b2d7528641 Don't try to open null file
If the loader is not found, directly return null, instead of
trying to open it.
2020-12-01 14:20:36 +01:00
Dmitry Stogov 5b078e7858 Merge branch 'PHP-8.0'
* PHP-8.0:
  Disable stack reuse optimization for x86 PIC code. It may clobber local variable used for Global Offset Table.
2020-12-01 15:26:37 +03:00
Dmitry Stogov 8ad2b59e12 Disable stack reuse optimization for x86 PIC code. It may clobber local variable used for Global Offset Table. 2020-12-01 15:20:06 +03:00
Nikita Popov 3b4fb2ebea Determine run-tests executables consistently 2020-12-01 12:36:25 +01:00
Nikita Popov 6fdc988592 Don't pass null to strlen() 2020-12-01 12:36:18 +01:00
Nikita Popov 715d89e166 Merge branch 'PHP-8.0'
* PHP-8.0:
  Don't use scope when validating Attribute
2020-12-01 11:50:22 +01:00