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

2261 Commits

Author SHA1 Message Date
George Peter Banyard 1ad59b32c2 Update INI validator and displayers depending on INI type
Closes GH-9451
2022-09-06 10:33:34 +01:00
Bob Weinand 94ee4f9834 Port all internally used classes to use default_object_handlers
Signed-off-by: Bob Weinand <bobwei9@hotmail.com>
2022-08-31 16:45:27 +02:00
Máté Kocsis b4ec3e9bc0 Do not generate CONST_CS when registering constants (#9439) 2022-08-28 08:27:19 +02:00
Christoph M. Becker b78c087b32 Fix typo (Paletter → Palette)
This also aligns the error message with upstream[1].

[1] <https://github.com/libgd/libgd/blob/gd-2.3.3/src/gd_webp.c#L182>

Closes GH-9414.
2022-08-24 13:40:16 +02:00
Máté Kocsis 056e968c54 Declare ext/gd constants in stubs (#9180) 2022-07-30 15:18:06 +02:00
Michael Voříšek c756e978c4 Improve tests on 32bit
The watch_*.phpt test apparently no longer fail on 32bit, so we remove
the XFAIL conditions.  bug77269.phpt is practically identical to
bug77272.phpt, and there seems no particular reason to have an
additional test for libgd ≤ 2.2.5.

Closes GH-8448.
2022-06-29 14:04:40 +02:00
Christoph M. Becker 365537fd6d Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix GH-8848: imagecopyresized() error refers to the wrong argument
2022-06-23 15:22:28 +02:00
Christoph M. Becker bc8e52f651 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix GH-8848: imagecopyresized() error refers to the wrong argument
2022-06-23 15:22:09 +02:00
Christoph M. Becker 9405f43ba9 Fix GH-8848: imagecopyresized() error refers to the wrong argument
Closes GH-8849.
2022-06-23 15:20:49 +02:00
Christoph M. Becker 98a4ab2266 Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix imagecreatefromavif() memory leak
2022-06-17 17:31:48 +02:00
Christoph M. Becker 036bed01ce Fix imagecreatefromavif() memory leak
This has been reported as https://github.com/libgd/libgd/issues/831.
We port the respective fix to our bundled libgd.

Closes GH-8812.
2022-06-17 17:30:57 +02:00
George Peter Banyard 8649cb8a96 Improve and fix stub return types (#8368) 2022-04-14 18:38:00 +01:00
Christoph M. Becker 0052af2a67 Merge branch 'PHP-8.1'
* PHP-8.1:
  Fixed libpng warning when loading interlaced images
2022-02-08 10:48:58 +01:00
Christoph M. Becker 4a630e67e9 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fixed libpng warning when loading interlaced images
2022-02-08 10:48:21 +01:00
Brett 1d48da6da5 Fixed libpng warning when loading interlaced images
We enable interlace transform when reading png.

Closes GH-8002.
2022-02-08 10:46:50 +01:00
Remi Collet baeba4b0d7 Merge branch 'PHP-8.1'
* PHP-8.1:
  add missing conditions
  fix [-Wstrict-prototypes] build warnings in ext/gd
2021-11-25 13:20:37 +01:00
Remi Collet 54f1f8cf2a add missing conditions 2021-11-25 13:20:27 +01:00
Remi Collet 1241ec8c3f fix [-Wstrict-prototypes] build warnings in ext/gd 2021-11-25 13:17:15 +01:00
Remi Collet f566cba0bb fix [-Wstrict-prototypes] build warnings in ext/gd 2021-11-25 13:17:07 +01:00
Remi Collet 7c0f2b4dc0 Merge branch 'PHP-8.1'
* PHP-8.1:
  add missing cond.
  Enable encoding detection for Polish text
2021-11-25 10:16:34 +01:00
Remi Collet 96a0ff73e9 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  add missing cond.
2021-11-25 10:16:17 +01:00
Remi Collet f6621037a0 add missing cond. 2021-11-25 10:14:30 +01:00
Remi Collet 73d5dd77c4 Merge branch 'PHP-8.1'
* PHP-8.1:
  fix gdImagePngCtxEx call with system libgd
2021-11-25 08:27:48 +01:00
Remi Collet 80d63e9d17 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  fix gdImagePngCtxEx call with system libgd
2021-11-25 08:27:28 +01:00
Remi Collet e713890d36 fix gdImagePngCtxEx call with system libgd 2021-11-25 08:27:07 +01:00
Christoph M. Becker 885f935090 Merge branch 'PHP-8.1'
* PHP-8.1:
  "Export" relevant GD macros
2021-11-24 18:26:15 +01:00
Christoph M. Becker a2c0ffb54e Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  "Export" relevant GD macros
2021-11-24 18:25:21 +01:00
Christoph M. Becker 9237055141 "Export" relevant GD macros
For parity with non Windows systems, we should `AC_DEFINE` these macros
so that they are defined in config.w32.h instead of directly passed to
the compiler.  This allows extensions which have ext/gd as dependency
to check for these macros.  E.g. ext/ps does this[1], and fails to
build on Windows, because `HAVE_GD_BUNDLED` isn't defined.

[1] <https://github.com/steinm/ps/blob/RELEASE_1_4_4/ps.c#L34>

Closes GH-7680.
2021-11-24 18:23:28 +01:00
Christoph M. Becker 243966177e Use the standard _WIN32 instead of the custom MSWIN32 in libgd
We're already checking `_WIN32` elsewhere in our bundled libgd, so it
makes no sense to also have a custom `MSWIN32`.

Closes GH-7682.
2021-11-24 15:38:28 +01:00
Christoph M. Becker 7738d8dd02 Drop unused GD defines
These are not used in the bundled libgd, and not used in config.m4
either.

Closes GH-7681.
2021-11-24 15:31:24 +01:00
Christoph M. Becker 2f85d79165 Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix #71316: libpng warning from imagecreatefromstring
2021-11-04 11:21:40 +01:00
Christoph M. Becker 7f2533d065 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix #71316: libpng warning from imagecreatefromstring
2021-11-04 11:21:10 +01:00
Christoph M. Becker f22f4afd84 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix #71316: libpng warning from imagecreatefromstring
2021-11-04 11:19:24 +01:00
Christoph M. Becker 1919c4b44d Fix #71316: libpng warning from imagecreatefromstring
We backport the respective upstream fix[1] to our bundled libgd.

[1] <https://github.com/libgd/libgd/commit/636100b9280a86e70d852d89251fc5492fce33f4>

Closes GH-7615.
2021-11-04 11:16:45 +01:00
Dmitry Stogov 90b7bde615 Use more compact representation for packed arrays.
- for packed arrays we store just an array of zvals without keys.
- the elements of packed array are accessible throuf as ht->arPacked[i]
  instead of ht->arData[i]
- in addition to general ZEND_HASH_FOREACH_* macros, we introduced similar
  familied for packed (ZEND_HASH_PACKED_FORECH_*) and real hashes
  (ZEND_HASH_MAP_FOREACH_*)
- introduced an additional family of macros to access elements of array
  (packed or real hashes) ZEND_ARRAY_ELEMET_SIZE, ZEND_ARRAY_ELEMET_EX,
  ZEND_ARRAY_ELEMET, ZEND_ARRAY_NEXT_ELEMENT, ZEND_ARRAY_PREV_ELEMENT
- zend_hash_minmax() prototype was changed to compare only values

Because of smaller data set, this patch may show performance improvement
on some apps and benchmarks that use packed arrays. (~1% on PHP-Parser)

TODO:
    - sapi/phpdbg needs special support for packed arrays (WATCH_ON_BUCKET).
    - zend_hash_sort_ex() may require converting packed arrays to hash.
2021-11-03 15:18:26 +03:00
Máté Kocsis 0a5fa9dd11 Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix the return type of imagecolorexactalpha()
  String default values are enclosed in quotes rather than apostrophes
2021-10-12 09:56:04 +02:00
Máté Kocsis 220f0f55cf Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix the return type of imagecolorexactalpha()
  String default values are enclosed in quotes rather than apostrophes
2021-10-12 09:53:30 +02:00
Máté Kocsis 17fa9b77bd Fix the return type of imagecolorexactalpha() 2021-10-12 09:51:13 +02:00
Nikita Popov f313854c98 Merge branch 'PHP-8.1'
* PHP-8.1:
  Require libavif version >= 0.8.2
2021-10-05 17:01:46 +02:00
Ben Morss b4c200f9fe Require libavif version >= 0.8.2
Closes GH-7554.
2021-10-05 17:01:07 +02:00
Christoph M. Becker 3cd5f2685b Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix gdAlphaMax limit typo
2021-09-23 23:20:26 +02:00
Christoph M. Becker 67131e453b Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix gdAlphaMax limit typo
2021-09-23 23:20:00 +02:00
Christoph M. Becker c0dcd141a8 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix gdAlphaMax limit typo
2021-09-23 23:18:52 +02:00
Michael Voříšek 2c3dfe5160 Fix gdAlphaMax limit typo
Closes GH-7410.
2021-09-23 23:16:40 +02:00
Remi Collet 411da30031 Merge branch 'PHP-8.1'
* PHP-8.1:
  Don't rely on libgd unused constants
2021-09-13 14:48:28 +02:00
Remi Collet b3646440b1 Don't rely on libgd unused constants 2021-09-13 14:48:13 +02:00
Nikita Popov 481cdeab31 Fix file clash in gd tests 2021-09-03 13:59:13 +02:00
Christoph M. Becker c95e036813 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix #53580: During resize gdImageCopyResampled cause colors change
2021-08-26 18:44:04 +02:00
Christoph M. Becker 35e1f134f5 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix #53580: During resize gdImageCopyResampled cause colors change
2021-08-26 18:41:08 +02:00
Christoph M. Becker 526407ca35 Fix #53580: During resize gdImageCopyResampled cause colors change
We port the upstream fix[1], and also revert commit a3383ac3d7[2] which
is now obsolete, and also not part of libgd.  Especially the change to
gd.png.c was at best a half-baked optimization.

[1] <https://github.com/libgd/libgd/commit/a24e96f01989bf9ca05a08d33862a08d6f4c4ed6>
[2] <https://github.com/php/php-src/commit/a3383ac3d7e21e54b1d7d89f308088d0692abc9f>

Closes GH-7402.
2021-08-26 18:38:17 +02:00