Commit Graph

131477 Commits

Author SHA1 Message Date
Alex Dowad
e447036dc6 Merge branch 'PHP-8.2'
* PHP-8.2:
  Propagate error checks for mbfl_filt_conv_illegal_output()
  Use CK() macro to check the output function in mbfilter_unicode2sjis_emoji_sb()
  Make error checks on encoding methods for docomo, kddi, sb consistent
2023-03-02 23:12:09 +02:00
Alex Dowad
3142829562 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Propagate error checks for mbfl_filt_conv_illegal_output()
  Use CK() macro to check the output function in mbfilter_unicode2sjis_emoji_sb()
  Make error checks on encoding methods for docomo, kddi, sb consistent
2023-03-02 22:50:37 +02:00
nielsdos
d66ca5dabb Propagate error checks for mbfl_filt_conv_illegal_output() 2023-03-02 22:36:00 +02:00
nielsdos
263655a520 Use CK() macro to check the output function in mbfilter_unicode2sjis_emoji_sb() 2023-03-02 22:36:00 +02:00
nielsdos
69543e6a10 Make error checks on encoding methods for docomo, kddi, sb consistent
Some places use an if check, which implicitly checks for a non-zero
value, and some places use > 0. The > 0 is the correct one because at
least some of those functions already use the CK() macro to return -1 on
error. Because -1 != 0 this is wrongly interpreted as a success instead
of a failure.
2023-03-02 22:36:00 +02:00
Ilija Tovilo
86669774ae
Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix missing readonly modification error with inc/dec in JIT
2023-03-02 11:31:42 +01:00
Ilija Tovilo
7934a0fcfb
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix missing readonly modification error with inc/dec in JIT
2023-03-02 11:31:29 +01:00
Ilija Tovilo
df93146a15
Fix missing readonly modification error with inc/dec in JIT
Closes GH-10746
2023-03-02 11:29:53 +01:00
Ilija Tovilo
4ea869901f
[skip ci] Skip failing mbstring test on Windows x86 32-bit 2023-03-02 00:07:23 +01:00
Ilija Tovilo
5859297f7f
Merge branch 'PHP-8.2'
* PHP-8.2:
  Add Windows GitHub actions build
2023-03-01 23:05:24 +01:00
Ilija Tovilo
603367946b
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Add Windows GitHub actions build
2023-03-01 23:05:17 +01:00
Michael Voříšek
916b132ea0
Add Windows GitHub actions build
Closes GH-10664
2023-03-01 23:02:03 +01:00
Niels Dossche
2b15061fbb
Use zend_result in ext/spl where appropriate (#10734)
* Convert functions in spl_heap to return zend_result

* Convert functions in spl_iterators to return zend_result
2023-03-01 18:58:17 +01:00
Ilija Tovilo
da4167b918
Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix unescaped {TMP} variables in tests
2023-03-01 13:25:34 +01:00
Ilija Tovilo
2b5aac9303
Fix unescaped {TMP} variables in tests
On Windows {TMP} can return ~, which will result in a parse error
2023-03-01 13:24:39 +01:00
Ilija Tovilo
8c9c6787cc
Temporarily disable failing zlib tests on travis (#10738) 2023-03-01 02:19:29 +01:00
Máté Kocsis
3bcf2c3755
Allow readonly properties to be reinitialized once during cloning (#10389)
RFC: https://wiki.php.net/rfc/readonly_amendments
2023-02-28 22:54:38 +01:00
Ilija Tovilo
b1ccbc8210
Update to Ubuntu 20.04 for travis build 2023-02-28 21:56:56 +01:00
Patrick Allaert
6b1dde73b0
Merge branch 'PHP-8.2' 2023-02-28 21:38:48 +01:00
Patrick Allaert
c7e8326217
Merge branch 'PHP-8.1' into PHP-8.2 2023-02-28 21:38:25 +01:00
Patrick Allaert
729f006de8
PHP-8.1 is now for PHP 8.1.18-dev 2023-02-28 21:37:52 +01:00
Dmitry Stogov
28be84a146 Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix Zend/tests/type_declarations/variance/class_order_autoload1.phpt test failre introduced by 44e5c04e55
2023-02-28 23:05:40 +03:00
Dmitry Stogov
dcf2810cd1 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix Zend/tests/type_declarations/variance/class_order_autoload1.phpt test failre introduced by 44e5c04e55
2023-02-28 23:05:30 +03:00
Dmitry Stogov
18b43d2950 Fix Zend/tests/type_declarations/variance/class_order_autoload1.phpt
test failre introduced by 44e5c04e55

This ASSERT-ion path was never reached becuase of the bug fixed by
44e5c04e55. It's possible in case of
circular class dependencies that may resolved by __autoload().
Unfortunately these circular dependencies can't be stored in the
inheritace cahce.
2023-02-28 22:57:52 +03:00
Sergey Panteleev
c8437ed55e
Merge branch 'PHP-8.2'
* PHP-8.2:
  PHP-8.2 is now for PHP 8.2.5-dev
2023-02-28 18:37:59 +03:00
Sergey Panteleev
23ce3423c1
PHP-8.2 is now for PHP 8.2.5-dev 2023-02-28 18:15:20 +03:00
George Peter Banyard
f13d541ca6
Fix GCC 12 compiler warnings (#10713)
* Fix -Wunused-but-set-variable compiler warning in ext/mysqli

* Fix -Wstrict-prototypes compiler warning in ext/mysqlnd

* Fix -Wstrict-prototypes compiler warning in ext/soap

* Fix -Wunused-but-set-variable compiler warning in ext/exif

However, this code looks really sketchy...

* Fix -Wstrict-prototypes compiler warning in ext/openssl

* Fix -Wstrict-prototypes compiler warning in ext/dba

Add void to our bundled libraries

* Refactor bundled BCMath library

Fix -Wdeprecated-non-prototype compiler warnings
Use bool instead of char/int
Cleanup some useless header includes
2023-02-28 14:21:01 +00:00
David Carlier
02ec4c5071 Fix GH-10727: Spoofchecker constant updates.
- Adding MIXED_NUMBERS from ICU 58.
- Adding HIDDEN_OVERLAY from ICU 62.

Closes GH-10730.
2023-02-28 12:27:38 +00:00
Niels Dossche
4177257178
3 minor cleanups in ext/session (#10722)
* sid can never be NULL because it was NULL-checked earlier

* Change namelen to size_t because it is always unsigned and less in size than size_t

* Remove redundant check on ser

It can't be NULL, and even if it could, the ser++ would be UB.
2023-02-28 12:29:40 +01:00
Niels Dossche
f247e48def
Remove always-false check in CLI (#10723)
This is the case c == 'i', so c == '?' is always false, hence the result
is always 0.
2023-02-28 12:24:09 +01:00
Bob Weinand
145602f38e Fix bug in zend_test assuming null not being the first type
(I agree that null should come last, but then it should rather throw with a proper message than emit an undefined key warning.)

Signed-off-by: Bob Weinand <bobwei9@hotmail.com>
2023-02-28 12:01:41 +01:00
David CARLIER
fbaa2eb059 ext/sockets: add TCP_REPAIR to silently close a connection.
Closes GH-10724.
2023-02-27 22:56:06 +00:00
Max Kellermann
c7637ed1c0 Zend/zend_type_code: remove hard-coded integer values and
remove unused macro ZEND_SAME_FAKE_TYPE
Zend/zend_variables: add _Static_assert on the size zend_rc_dtor_func
_Static_assert is C11, but has been supported since GCC 4.6.

Also removing the comment about keeping those values in sync with
`zend_variables.c` which was obsoleted by commit 0460420205
(designated initializers).

Closes GH-10714.
2023-02-27 20:52:17 +00:00
David Carlier
3db32439f9 Merge branch 'PHP-8.2' 2023-02-27 19:49:01 +00:00
David Carlier
4c2db35b05 Merge branch 'PHP-8.1' into PHP-8.2 2023-02-27 19:48:13 +00:00
Niels Dossche
0f21cbc57c Fix GH-10715: phpdbg heap buffer overflow -- by misuse of the option "--run"
Fixes GH-10715

When a string starting with a NUL character is passed to
phpdbg_vprint(), the vasprintf() will return that 0 characters have been
printed. This causes msglen == 0. When phpdbg_process_print() is called
with a message of length 0, the -1 to check for '\n' will perform an out
of bounds read. Since nothing is printed anyway for msglen == 0, it
seems best to just skip the printing routine for this case.

Closes GH-10720.
2023-02-27 19:47:55 +00:00
Dmitry Stogov
9d9b8bad47 Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix incorrect inheritance cache update (#10719)
2023-02-27 21:47:55 +03:00
Dmitry Stogov
db7358ccc9 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix incorrect inheritance cache update (#10719)
2023-02-27 21:47:46 +03:00
Dmitry Stogov
44e5c04e55 Fix incorrect inheritance cache update (#10719) 2023-02-27 21:47:29 +03:00
Dmitry Stogov
c7a9190124 Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix incorrect inheritance cache update (#10719)
2023-02-27 21:39:53 +03:00
Dmitry Stogov
2e3fc8c0ff
Fix incorrect inheritance cache update (#10719) 2023-02-27 21:39:18 +03:00
Bob Weinand
81abd8dc37 Allow gen_stub.php to parse and ignore extended docblock types
Extended docblock types, according to psalm or phpstan conventions may include array shapes, callable signatures etc.. These are now ignored by ignoring any nested parenthesized expression (followed by optional :type) at the end of the type.
2023-02-27 17:30:28 +01:00
Niels Dossche
edacfbd1d4
Remove unnecessary checks in ftp_fopen_wrapper.c (#10711)
* resource is always non-NULL at this point because we check for NULL
  right after its creation.
* resource->path is always set at this point because of the check right
  above the code where it's used. It was also confusing to see "/" being
  considered as a "default".
2023-02-27 13:20:37 +00:00
Max Kellermann
371ae12d89 Zend/zend_fibers: change return value to zend_result
According to @nikic:

> The current guideline for use of bool and zend_result in php-src is
> that bool is an appropriate return value for "is" or "has" style
> functions, which return a yes/no answer. zend_result is an
> appropriate return value for functions that perform some operation
> that may succeed or fail.

Closes GH-10622.
2023-02-26 15:07:08 +00:00
George Peter Banyard
81e59c6497
Improve handling of XML options
Mark boolean options as such
Warn on invalid types
Stubs info

Closes GH-10675
2023-02-26 14:34:39 +00:00
George Peter Banyard
524391bcf6
Merge branch 'PHP-8.2'
* PHP-8.2:
  Fixed ValueError message in count_chars()
  Fixed ValueError message in substr_compare()
  The userland constants do not start with PHP_
2023-02-26 14:28:49 +00:00
George Peter Banyard
f440911057
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fixed ValueError message in count_chars()
  Fixed ValueError message in substr_compare()
  The userland constants do not start with PHP_
2023-02-26 14:28:22 +00:00
George Peter Banyard
adc5edd411
Fixed ValueError message in count_chars()
The value of the mode argument must be between 0 and 4 inclusive, not 1 and 4.
2023-02-26 14:27:46 +00:00
George Peter Banyard
2133970152
Fixed ValueError message in substr_compare()
It used some random argument name instead of
2023-02-26 14:25:02 +00:00
George Peter Banyard
6a5b3f0ff9
The userland constants do not start with PHP_ 2023-02-26 14:18:12 +00:00