Commit graph

141060 commits

Author SHA1 Message Date
Gina Peter Banyard
7fcdf1cfa2 ext/ftp: Use zend_result type instead of int type 2025-04-03 22:47:13 +01:00
Gina Peter Banyard
169573bcb5 ext/ftp: Use bool type instead of int type 2025-04-03 22:47:13 +01:00
Gina Peter Banyard
114a8ffb9d ext/ftp: Mark static functions as such
Removing missleading comment
2025-04-03 22:47:13 +01:00
Gina Peter Banyard
51fa97fb44 ext/ftp: Normalize coding style 2025-04-03 22:47:13 +01:00
Gina Peter Banyard
7fb8db014e ext/ftp: Voidify ftp_close() 2025-04-03 22:47:13 +01:00
Gina Peter Banyard
fabee4e244 ext/fileinfo: Separate implementations of functions
Instead of relying on a "god" function
2025-04-03 19:06:47 +01:00
Gina Peter Banyard
3d41cb012a ext/fileinfo: Use magic_setflags() directly
The only way this function returns -1 is if:
> magic_setflags() returns -1 on systems that don't support utime(3), or utimes(2) when MAGIC_PRESERVE_ATIME is set.

This is extremely unlikely and if this would happen we currently have a return type violation.
2025-04-03 19:06:47 +01:00
Ilija Tovilo
8c266e8f3c
Merge branch 'PHP-8.4'
* PHP-8.4:
  [skip ci] Restrict on-push freebsd build to main repo
2025-04-03 13:03:46 +02:00
Ilija Tovilo
90fd764cd8
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  [skip ci] Restrict on-push freebsd build to main repo
2025-04-03 13:03:34 +02:00
Ilija Tovilo
821e3460fb
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [skip ci] Restrict on-push freebsd build to main repo
2025-04-03 13:03:06 +02:00
Ilija Tovilo
8b27c14aa9
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  [skip ci] Restrict on-push freebsd build to main repo
2025-04-03 13:02:51 +02:00
Ilija Tovilo
7a3383b482
[skip ci] Restrict on-push freebsd build to main repo
The same applies to all other push jobs, it was just forgotten here.
2025-04-03 13:01:59 +02:00
Ilija Tovilo
8f67130e9e
[skip ci] Move opcode dumping test to ext/opcache/tests
This test breaks with file cache, because the file isn't compiled. Tests
in ext/opcache/tests are automatically skipped with file cache, hence
circumventing this issue.
2025-04-03 12:58:55 +02:00
Ilija Tovilo
ec35f534c6
[skip ci] Fix varying tmps count in nodiscard test 2025-04-03 12:50:57 +02:00
Niels Dossche
f4954df0c9
Merge branch 'PHP-8.4'
* PHP-8.4:
  Fix resource leak in iptcembed() on error
2025-04-02 21:06:35 +02:00
Niels Dossche
f4c594bfc6
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix resource leak in iptcembed() on error
2025-04-02 21:06:28 +02:00
Niels Dossche
8a1f6711bf
Fix resource leak in iptcembed() on error
Closes GH-18225.
2025-04-02 21:05:48 +02:00
Niels Dossche
5a19e25347
Merge branch 'PHP-8.4'
* PHP-8.4:
  Fix inverted call to php_openssl_store_errors()
  Fix openssl_random_pseudo_bytes() always setting strong_result to true
2025-04-02 20:30:44 +02:00
Niels Dossche
a6e76ac010
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix inverted call to php_openssl_store_errors()
  Fix openssl_random_pseudo_bytes() always setting strong_result to true
2025-04-02 20:25:32 +02:00
Niels Dossche
5e68671f88
Fix inverted call to php_openssl_store_errors()
This calls php_openssl_store_errors() in the success path right now,
change it to call php_openssl_store_errors() in the error path.
2025-04-02 20:25:21 +02:00
Niels Dossche
0dc600c69a
Fix openssl_random_pseudo_bytes() always setting strong_result to true
This regressed in 62c7432f, prior to that commit the value was set to
false in case random number generation failed, but now even if an
exception is thrown it is set to true. This likely does not _really_
matter as the user will handle the exception, still the value in
$strong_result is observable.
2025-04-02 20:25:21 +02:00
Niels Dossche
a39725b793
Merge branch 'PHP-8.4'
* PHP-8.4:
  Fix memory leak in openssl_sign() when passing invalid algorithm
2025-04-02 20:24:13 +02:00
Niels Dossche
d689ff63e8
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix memory leak in openssl_sign() when passing invalid algorithm
2025-04-02 20:18:57 +02:00
Niels Dossche
74720a22f3
Fix memory leak in openssl_sign() when passing invalid algorithm
Closes GH-18185.
2025-04-02 20:15:53 +02:00
Niels Dossche
c10afa9643
Simplify curl gc handlers (#18227)
Since these objects are final and have no dynamic properties, we don't
have to build a property table.
2025-04-02 17:33:02 +02:00
Ilija Tovilo
1f6fdde646
Implement asymmetric visibility for static properties
https://wiki.php.net/rfc/static-aviz

Optimally, this would be moved to zend_fetch_static_property_address(). However,
this isn't currently effective for opcache, because R and RW/W/UNSET cache slots
are merged. This will circumvent the visibility check if the cache is primed by
a R instruction.

Closes GH-16486
2025-04-02 16:56:11 +02:00
Dmitry Stogov
cb3bca249a
Merge branch 'PHP-8.4'
* PHP-8.4:
  Update IR
2025-04-02 16:20:49 +03:00
Dmitry Stogov
79dc7a2d26
Update IR
IR commit: 8d17022fb61ebfed9f6be81a8182ea31202697ed
2025-04-02 16:20:09 +03:00
David Carlier
8846e9376c
Merge branch 'PHP-8.4' 2025-04-02 12:36:17 +01:00
David Carlier
dc93f28381
Merge branch 'PHP-8.3' into PHP-8.4 2025-04-02 12:36:08 +01:00
David Carlier
2e47442a6b
Fix GH-18212: fseek with SEEK_CUR and negative offset crash on debug
Triggers the assertion as with SEEK_CUR the stream position is set to a
negative value so we force the failure without affecting its position
instead.

close GH-18224
2025-04-02 12:34:50 +01:00
Luis Carilla Ternero
02d58faad4
GDB: replace match statements with if statements in gdb debug script so it works with lower versions (#18226) 2025-04-02 11:56:16 +02:00
Tim Düsterhus
a9d4b49252
Fix path for main/debug_gdb_scripts.c in .gitattributes
The previous path `main/gdb_inlined_script.c` never existed in any commit
merged to master.

see 46b6ad6dae
2025-04-02 10:38:28 +02:00
Tim Düsterhus
169a6c63f0
zend_execute: Remove useless refcounting in get_deprecation_suffix_from_attribute() (#18229) 2025-04-02 09:37:00 +02:00
Tim Düsterhus
5544be7018
RFC: Marking return values as important (#[\NoDiscard]) (#17599)
RFC: https://wiki.php.net/rfc/marking_return_value_as_important

Co-authored-by: Volker Dusch <volker@tideways-gmbh.com>
2025-04-02 09:35:29 +02:00
Gina Peter Banyard
f11c22ae30 ext/filter: Use bool instead of int where applicable
This makes it easier to reason about the code
2025-04-02 02:20:16 +01:00
Gina Peter Banyard
fa511dff45 ext/filter: Mark literal as static const 2025-04-02 02:20:16 +01:00
Gina Peter Banyard
7cc47082d6 ext/filter: Use zend_string* instead of a char* + size_t pair 2025-04-02 02:20:16 +01:00
Gina Peter Banyard
0e682ad692 ext/filter: Add const qualifiers 2025-04-02 02:20:16 +01:00
Gina Peter Banyard
53bced39fb ext/filter: Reduce scope of variables 2025-04-02 02:20:16 +01:00
Gina Peter Banyard
5cbfb6966a ext/filter: Remove unused parameters 2025-04-02 02:20:16 +01:00
Gina Peter Banyard
38ecfc54c6 ext/filter: Remove dead code about session globals 2025-04-02 02:20:16 +01:00
Ilija Tovilo
011795bcbe
Bind traits before parent class
This more accurately matches the "copy & paste" semantics described in
the documentation. Abstract trait methods diverge from this behavior,
given that a parent method can satisfy trait methods used in the child.
In that case, the method is not copied, but the check is performed after
the parent has been bound.

Fixes GH-15753
Fixes GH-16198
Close GH-15878
2025-04-01 18:20:02 +02:00
Ilija Tovilo
2ede200967
[skip ci] Drop Zend/tests/traits/error_001.phpt
The test doesn't test what it says it does. And depending on what it is
actually trying to test, it is redundant with either
Zend/tests/traits/error_009.phpt, Zend/tests/traits/error_010.phpt or
Zend/tests/traits/language015.phpt.
2025-04-01 17:11:58 +02:00
Ilija Tovilo
e4e663ced4
Merge branch 'PHP-8.4'
* PHP-8.4:
  Use-after-free in extract() with EXTR_REFS
2025-04-01 16:34:41 +02:00
Ilija Tovilo
3ffb310fbd
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Use-after-free in extract() with EXTR_REFS
2025-04-01 16:34:33 +02:00
Ilija Tovilo
a21065e6eb
Use-after-free in extract() with EXTR_REFS
Fixes GH-18209
Closes GH-18211
2025-04-01 16:33:30 +02:00
John Bampton
4e44efaccb
docs: fix spelling in stubs.rst (GH-18220) 2025-04-01 12:51:02 +02:00
Niels Dossche
13e0fb92b4
Merge branch 'PHP-8.4'
* PHP-8.4:
  Add missing EXTENSIONS section to intl test
2025-03-31 23:05:29 +02:00
Niels Dossche
93826d9556
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Add missing EXTENSIONS section to intl test
2025-03-31 23:05:23 +02:00