1
0
mirror of https://github.com/php/php-src.git synced 2026-04-27 10:16:41 +02:00

790 Commits

Author SHA1 Message Date
David Carlier 188d520972 ext/gd: calls with array types check strengthening.
close GH-18005
2026-04-08 18:54:02 +01:00
Jakub Zelenka 358d9c54a6 Fix bug #49874: ftell() and fseek() inconsistency when using stream filters (#19981)
Currently filter seeking does not work correctly for most streams. The
idea is to extend API to allow seeking for some streams. There are
couple of cases:

- filter is always seekable - e.g. string.rot13, string.toupper,
  string.tolower
- filter is seekable only when sought to start or when it re-run the
  data from the start (it means when there is some data buffered) -
  this is for pretty much all other filters that keep some state.
- user filters are seekable by default for BC reason but if new
  seek method is implemented, then it is called and based on the
  bool result the seeking either fails or succeed.
2026-03-30 10:27:34 +02:00
Ilija Tovilo 073dcf66bb Merge branch 'PHP-8.5'
* PHP-8.5:
  Add RUN_RESOURCE_HEAVY_TESTS env var
2026-02-27 15:05:28 +01:00
Ilija Tovilo 07e29acbd4 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Add RUN_RESOURCE_HEAVY_TESTS env var
2026-02-27 15:05:21 +01:00
Ilija Tovilo 6f91209260 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Add RUN_RESOURCE_HEAVY_TESTS env var
2026-02-27 15:05:14 +01:00
Ilija Tovilo c6ad84fb9e Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Add RUN_RESOURCE_HEAVY_TESTS env var
2026-02-27 15:04:24 +01:00
Ilija Tovilo 3a57b4ced5 Add RUN_RESOURCE_HEAVY_TESTS env var
Disable resource-heavy tests by default (>1GB of memory usage), unless the
RUN_RESOURCE_HEAVY_TESTS env variable is set.

Fixes GH-20762
Closes GH-20935
2026-02-27 15:00:35 +01:00
David Carlier 8504b18a34 Merge branch 'PHP-8.5'
* PHP-8.5:
  Fix GH-20622: imagestring/imagestringup overflow/underflow.
2025-12-04 23:16:22 +00:00
David Carlier 400aa844a6 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Fix GH-20622: imagestring/imagestringup overflow/underflow.
2025-12-04 23:16:08 +00:00
David Carlier 2c2852ae8e Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-20622: imagestring/imagestringup overflow/underflow.
2025-12-04 23:14:01 +00:00
David Carlier 9f654decdc Fix GH-20622: imagestring/imagestringup overflow/underflow.
close GH-20623
2025-12-04 23:13:29 +00:00
David Carlier dddd050486 Merge branch 'PHP-8.5'
* PHP-8.5:
  Fix GH-20602: imagescale() overflow with large height values.
2025-11-29 13:33:04 +00:00
David Carlier 848269d6a8 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Fix GH-20602: imagescale() overflow with large height values.
2025-11-29 13:32:18 +00:00
David Carlier 6d5490861f Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-20602: imagescale() overflow with large height values.
2025-11-29 13:31:38 +00:00
David Carlier c8e13af455 Fix GH-20602: imagescale() overflow with large height values.
close GH-20605
2025-11-29 13:30:49 +00:00
David Carlier 94e65d301b Merge branch 'PHP-8.5'
* PHP-8.5:
  Fix GH-20551: imagegammacorrect out of range gamma value.
2025-11-22 22:23:53 +00:00
David Carlier 4d71d8a454 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Fix GH-20551: imagegammacorrect out of range gamma value.
2025-11-22 22:23:41 +00:00
David Carlier 30cb1998ae Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-20551: imagegammacorrect out of range gamma value.
2025-11-22 22:22:50 +00:00
David Carlier f88d247ce2 Fix GH-20551: imagegammacorrect out of range gamma value.
close GH-20552
2025-11-22 22:22:27 +00:00
David Carlier 7ba7b308ce Merge branch 'PHP-8.5'
* PHP-8.5:
  ext/gd: Fix GH-19955 unit test.
2025-10-27 17:46:02 +00:00
David Carlier 1b220cb243 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  ext/gd: Fix GH-19955 unit test.
2025-10-27 17:45:52 +00:00
David Carlier f1a5c53544 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  ext/gd: Fix GH-19955 unit test.
2025-10-27 17:45:40 +00:00
David Carlier 3c063abba1 ext/gd: Fix GH-19955 unit test.
Adding guard for imagefttext() availability.

close GH-20309
2025-10-27 17:45:17 +00:00
Gina Peter Banyard 6cb21229f8 ext/gd/imagefilter: Improve wording of ArgCount error
This is done by parsing this as 2 arguments with variadics that are never actually parsed
2025-10-13 23:07:41 +01:00
Gina Peter Banyard 0587da9ef1 ext/gd/imagefilter: Add test case for manual ZPP 2025-10-13 23:07:41 +01:00
Gina Peter Banyard c1d0c61e81 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Fix GH-20070: Return type violation in imagefilter when an invalid filter is provided
2025-10-12 23:09:47 +01:00
Gina Peter Banyard e7aea3db48 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-20070: Return type violation in imagefilter when an invalid filter is provided
2025-10-12 23:09:09 +01:00
Gina Peter Banyard 26f989313e Fix GH-20070: Return type violation in imagefilter when an invalid filter is provided
Closes GH-20071
2025-10-12 23:08:08 +01:00
David Carlier 033dd8a8b7 Merge branch 'PHP-8.4' into PHP-8.5 2025-09-29 23:21:08 +01:00
David Carlier 1015de30f0 Merge branch 'PHP-8.3' into PHP-8.4 2025-09-29 23:20:38 +01:00
David Carlier e029f8f45b Fix GH-19955: imagefttext() memory leak
close GH-19968
2025-09-29 23:20:27 +01:00
David Carlier b697d1bcfa Merge branch 'PHP-8.4' 2025-09-07 18:19:21 +01:00
David Carlier a0b7dab64b Merge branch 'PHP-8.3' into PHP-8.4 2025-09-07 18:19:08 +01:00
David Carlier 93865a4086 Fix GH-19578: imagefilledellipse underflow on width argument.
close GH-19579
2025-09-07 18:18:17 +01:00
Gina Peter Banyard cab46b27b9 ext/standard: Deprecate passing integers outside the interval [0, 255] to chr() (#19441)
RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_passing_integers_outside_the_interval_0_255_to_chr
2025-08-14 20:48:48 +01:00
Daniel Scherzer a68f3d6374 [RFC] Deprecate imagedestroy() (#19454)
https://wiki.php.net/rfc/deprecations_php_8_5
2025-08-12 05:50:09 -07:00
Peter Kokot d40b603856 ext/gd: Make BMP always available (#19115)
- When building with bundled libgd, it has support for BMP
- When building with external libgd, at least 2.1.0 is required, which
  has BMP support.
- The HAVE_GD_PNG moved to PHP_GD_PNG Autoconf macro as it is always
  required when building with bundled libgd.
2025-07-13 15:25:53 +02:00
Peter Kokot ba68cbefc5 ext/gd: Make TGA always available (#19105)
- When building with bundled libgd, it has support for TGA
- When building with external libgd, at least 2.1.0 is required, which
  has TGA support.
2025-07-13 11:45:44 +02:00
Tim Düsterhus 4c5a6b0e8d tree-wide: Remove stacktraces from tests testing throwing clones (#18748)
This is in preparation for the possible future transformation of `clone` into a
function call, but also meaningful on its own, since the purpose of the tests
is not to test the stack trace generation, but rather that an exception was
thrown. It also cleans up some unreachable code in the tests.
2025-06-03 20:08:47 +02:00
David Carlier abf6f8be71 Merge branch 'PHP-8.4' 2025-04-05 15:57:59 +01:00
David Carlier 471995c5f7 Merge branch 'PHP-8.3' into PHP-8.4 2025-04-05 15:57:26 +01:00
David Carlier fe8dffef5d Fixed GH-18243: imagettftext underflow/overflow on size argument.
close GH-18245
2025-04-05 15:56:45 +01:00
David Carlier 18102ec708 Merge branch 'PHP-8.4' 2025-03-28 17:31:50 +00:00
David Carlier 3a5c87f964 Merge branch 'PHP-8.3' into PHP-8.4 2025-03-28 17:31:13 +00:00
David Carlier a1620048fb ext/gd: imagecrop rect argument overflow fixes.
```
ext/gd/libgd/gd.c:2275:14: runtime error: signed integer overflow: 2147483647 + 1 cannot be represented in type 'int'
    #0 0x5d6a2103e1db in php_gd_gdImageCopy /home/dcarlier/Contribs/php-src/ext/gd/libgd/gd.c:2275
    #1 0x5d6a210a2b63 in gdImageCrop /home/dcarlier/Contribs/php-src/ext/gd/libgd/gd_crop.c:57
    #2 0x5d6a21018ca4 in zif_imagecrop /home/dcarlier/Contribs/php-src/ext/gd/gd.c:3575
    #3 0x5d6a21e46e7a in ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER /home/dcarlier/Contribs/php-src/Zend/zend_vm_execute.h:1337
    #4 0x5d6a221188da in execute_ex /home/dcarlier/Contribs/php-src/Zend/zend_vm_execute.h:57246
    #5 0x5d6a221366bd in zend_execute /home/dcarlier/Contribs/php-src/Zend/zend_vm_execute.h:61634
    #6 0x5d6a21d107a6 in zend_execute_scripts /home/dcarlier/Contribs/php-src/Zend/zend.c:1895
    #7 0x5d6a21a63409 in php_execute_script /home/dcarlier/Contribs/php-src/main/main.c:2529
    #8 0x5d6a22516d5e in do_cli /home/dcarlier/Contribs/php-src/sapi/cli/php_cli.c:966
    #9 0x5d6a2251981d in main /home/dcarlier/Contribs/php-src/sapi/cli/php_cli.c:1341
    #10 0x7f10d002a3b7 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #11 0x7f10d002a47a in __libc_start_main_impl ../csu/libc-start.c:360
    #12 0x5d6a20a06da4 in _start (/home/dcarlier/Contribs/php-src/sapi/cli/php+0x2806da4) (BuildId: d9a79c7e0e4872311439d7313cb3a81fe04190a2)
```

close GH-18006
2025-03-28 17:30:25 +00:00
David Carlier ea86442857 Merge branch 'PHP-8.4' 2025-03-07 18:08:30 +00:00
David Carlier bc55177832 Merge branch 'PHP-8.3' into PHP-8.4 2025-03-07 18:07:48 +00:00
David Carlier 07ceadf7d9 Fix GH-17984: gd calls with array arguments.
close GH-17985
2025-03-07 18:07:14 +00:00
David Carlier 06101224b4 Merge branch 'PHP-8.4' 2025-02-24 07:15:08 +00:00
David Carlier fc73da57f4 Merge branch 'PHP-8.3' into PHP-8.4 2025-02-24 07:14:56 +00:00