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

14677 Commits

Author SHA1 Message Date
Gina Peter Bnayard
e0f6e3de34 ext/standard/info.c: Make some functions static 2024-08-13 14:10:06 +02:00
Gina Peter Bnayard
5078eb080e ext/standard/info.c: Use size_t type where appropriate 2024-08-13 14:10:06 +02:00
Gina Peter Bnayard
739805d099 ext/standard/info.c: Removed php_info_html_esc() 2024-08-13 14:10:06 +02:00
Gina Peter Bnayard
67a15cf457 ext/standard/head.c: Change return type of php_header() to bool 2024-08-13 14:10:06 +02:00
Gina Peter Bnayard
2297e50772 ext/standard/head.c: Remove some useless casts
The field type is size_t
2024-08-13 14:10:06 +02:00
Gina Peter Bnayard
91aca96a8e ext/standard/filters.c: Use bool type where possible for persistent field/param 2024-08-13 14:10:06 +02:00
Gina Peter Bnayard
9cfe9e10ba ext/standard/filters.c: Use zend_result return type instead of int 2024-08-13 14:10:06 +02:00
Gina Peter Bnayard
2baadf3807 ext/standard/filters.c: Voidify php_conv_base64_decode_ctor()
It always returned SUCCESS
2024-08-13 14:10:06 +02:00
Gina Peter Bnayard
54cc76fdb4 ext/standard/filters.c: Remove some register keywords 2024-08-13 14:10:06 +02:00
Gina Peter Banyard
f5ae5ac804 ext/standard: Throw ValueErrors in str_getcsv() for invalid inputs (#15365)
This was forgotten when adjusting the behaviour of other CSV functions
2024-08-12 17:56:02 +01:00
Gina Peter Banyard
c818d944cf ext/(standard|spl): Deprecate passing a non-empty string as the $enclosure parameter (#15362) 2024-08-12 16:09:56 +01:00
Peter Kokot
bb35da336d Autotools: Sync CS in extensions (#15343)
- Redundant double quotes removed
- AS_* macros used
- Few nits adjusted here and there
2024-08-11 17:42:26 +02:00
Gina Peter Banyard
edc88ee629 ext/standard: Minor refactoring to URL scanner code (#15321) 2024-08-10 20:12:54 +01:00
Christoph M. Becker
9c537de8a5 Fix some -Wimplicit-function-declaration errors on Windows (GH-15325)
While clang is picky about these, MSVC doesn't seem to care and would
only report the calls to undeclared functions as errors during link
time.  Still, obviously, MSVC is fine with having the declarations
during compile time.
2024-08-10 16:25:28 +02:00
David Carlier
d5c7f3b0e6 ext/standard: enabling feature detection auxiliary vector on OpenBSD.
close gh-15175
2024-08-10 12:36:10 +01:00
Gina Peter Banyard
1e3d918936 ext/core: Deprecate passing E_USER_ERROR to trigger_error() (#15308)
RFC: https://wiki.php.net/rfc/deprecations_php_8_4#deprecate_passing_e_user_error_to_trigger_error
2024-08-09 15:51:07 +01:00
Quentin Dreyer
7b32a145d9 Fix GH-15155: Keep stream context in filtered streams
Closes GH-15156
2024-08-06 16:42:33 +01:00
David CARLIER
b9da6cb3a2 ext/standard: disable one ipv2long test. (#15200)
atypical leading zeros are accepted on this platform.
2024-08-06 12:26:19 +01:00
Peter Kokot
125190186e Autotools: Check for cross_compiling=yes (#15238)
The cross_compiling variable can initially be "yes", "no", or
"maybe" (when only --host option is added). Autoconf otherwise after
AC_PROG_CC resets it to "no" in such case but to be sure, this
checks for value "yes" instead. The HAVE_FNMATCH template can be also
set after the AC_DEFINE as autoheader scans the templates overall the
source code.
2024-08-05 08:52:09 +02:00
Tim Düsterhus
49d0d7bcd7 standard: Stop using php_combined_lcg() in uniqid() (#15217)
Fall back to the fallback generator if the CSPRNG fails instead. This removes
the last internal user of `php_combined_lcg()`.
2024-08-04 18:26:40 +02:00
Tim Düsterhus
ecd11b9687 unserialize: Deprecate the 'S' tag (#12309)
RFC: https://wiki.php.net/rfc/deprecations_php_8_4
2024-08-04 18:23:19 +02:00
Peter Kokot
d6a75e19d1 Sync preprocessor macros help texts (#15218)
This partially syncs help texts a bit further for:
- ext/ffi
- ext/ldap
- ext/opcache
- ext/pcre
- ext/pdo_mysql
- ext/readline
- ext/standard
2024-08-04 12:52:16 +02:00
Peter Kokot
dcdcb3cbfe Autotools: Replace AC_MSG_ERROR with AC_MSG_FAILURE (#15209)
This replaces the AC_MSG_ERROR with AC_MSG_FAILURE, where appropriate.

The AC_MSG_ERROR outputs given message and exits the configure step. The
AC_MSG_FAILURE does the same but also automatically outputs additional
message "See 'config.log' for more details." which might help directing
the user where to look further.

The AC_MSG_ERROR is used for errors where current test step isn't logged
in the config.log and wouldn't make sense, and AC_MSG_FAILURE is mostly
used in cases of library checks, compilation tests, headers checked with
AC_CHECK_HEADER* and similar tests that are also logged in the
config.log.

AC_MSG_ERROR([Sanity check failed.]) output:

```
configure: error: Sanity check failed.
```

AC_MSG_FAILURE([Sanity check failed.]) output:

```
configure: error: in '/path/to/php-src':
configure: error: Sanity check failed.
See 'config.log' for more details
```
2024-08-04 07:36:37 +02:00
Peter Kokot
16d9bd0aae Sync AC_DEFINE help texts (#15207) 2024-08-03 09:47:39 +02:00
Niels Dossche
3ad9f4d441 Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix GH-15179: Segmentation fault (null pointer dereference) in ext/standard/url_scanner_ex.re
2024-08-03 02:05:44 +02:00
Niels Dossche
9913b83ce5 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-15179: Segmentation fault (null pointer dereference) in ext/standard/url_scanner_ex.re
2024-08-03 02:05:35 +02:00
Niels Dossche
67ce8759e8 Fix GH-15179: Segmentation fault (null pointer dereference) in ext/standard/url_scanner_ex.re
Based on analysis by Ilija: https://github.com/php/php-src/issues/15179#issuecomment-2261546902

* Apply suggestions from code review

Closes GH-15206.

Co-authored-by: Ilija Tovilo <ilija.tovilo@me.com>
2024-08-03 02:05:06 +02:00
Tim Düsterhus
a578c27a51 Improve link styling in PHPInfo (#15077)
* Improve link styling in PHPInfo

The previous styling with the fixed background color didn't work well in dark
mode. Remove the background and make links inherit the regular text color. To
make them visually detectable the underlining behavior is reversed. The
underline is now shown when not hovering and hidden when hovering.

* Preserve the headline linking behavior
2024-07-31 12:10:16 +02:00
Saki Takamachi
28080dce62 round(): Corrected test name and fixed UPGRADING (#14943)
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
2024-07-29 20:39:35 +09:00
Peter Kokot
7d927075ea Autotools: Sync shared argument CS (#15141)
The 3rd argument of the PHP_NEW_EXTENSION can be "shared" or "yes" to
mark the extension as shared, or anything else to mark that extension as
not shared. This syncs the argument values across the build system to be
"no" as in other always-enabled extensions.
2024-07-29 10:12:32 +02:00
Peter Kokot
1ceadaed52 Autotools: Normalize and quote all PHP_NEW_EXTENSION arguments (#15144)
This adds Autoconf quote characters to all PHP_NEW_EXTENSION arguments
and syncs the CS across the php-src Autotools build system.
2024-07-29 00:14:59 +02:00
Pol Dellaiera
664c1d18df Fix: add missing PHPAPI (#15142)
Issue introduced in commit 5905857fd2 from PR https://github.com/php/php-src/pull/14833
2024-07-28 20:38:52 +02:00
Niels Dossche
177fd88452 Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix CI failure on macOS after Curl update
2024-07-28 14:34:47 +02:00
Niels Dossche
9f570163b3 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix CI failure on macOS after Curl update
2024-07-28 14:34:35 +02:00
Niels Dossche
fdae7c23f0 Fix CI failure on macOS after Curl update 2024-07-28 14:34:26 +02:00
Peter Kokot
dee29442ba Autotools: Fix ext/standard sources (#15131)
This appends source files to the PHP_NEW_EXTENSION call and adds the
possible compilation flag -DZEND_ENABLE_STATIC_TSRMLS_CACHE when
building objects as done on all ext/standard sources already. Also, the
PHP_EXT_DIR Autoconf macro doesn't accept any argument.
2024-07-28 10:12:17 +02:00
Niels Dossche
043a1cb856 Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix CI failure after Curl update (#15124)
2024-07-27 16:11:33 +02:00
Niels Dossche
014e515ccc Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix CI failure after Curl update (#15124)
2024-07-27 16:11:26 +02:00
Niels Dossche
404bd30810 Fix CI failure after Curl update (#15124) 2024-07-27 16:09:50 +02:00
David Carlier
e1c8a85244 Merge branch 'PHP-8.3' 2024-07-22 23:26:40 +01:00
David Carlier
2599b6e780 Merge branch 'PHP-8.2' into PHP-8.3 2024-07-22 23:26:28 +01:00
David Carlier
350c10d985 fix GH-14785 pedantic error
close GH-15071
2024-07-22 23:26:09 +01:00
David Carlier
c8440343cd Merge branch 'PHP-8.3' 2024-07-22 22:58:54 +01:00
David Carlier
5bac3c27c9 Merge branch 'PHP-8.2' into PHP-8.3 2024-07-22 22:58:18 +01:00
David Carlier
ba909d7c43 Fix GH-14780: p(f)sockopen overflow on timeout argument.
close GH-14785
2024-07-22 22:57:59 +01:00
Peter Kokot
40e0d3a276 Autotools: Check for crypt and crypt_r with AC_* macros (#15060)
This checks if crypt and crypt_r functions are available on the system
in default libraries or in the crypt library with the AC_SEARCH_LIBS.
The redundant HAVE_LIBCRYPT symbol is removed.
2024-07-22 21:51:18 +02:00
Niels Dossche
543c4bb7bc Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix passing non-finite timeout values in stream functions
2024-07-22 17:53:00 +02:00
Niels Dossche
a0e1e085d8 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix passing non-finite timeout values in stream functions
2024-07-22 17:52:53 +02:00
Niels Dossche
fdcfd62b9b Fix passing non-finite timeout values in stream functions
Closes GH-15061.
2024-07-22 17:52:21 +02:00
Peter Kokot
fe9fdd4fc3 Autotools: Fix unused result and variables warnings in flush IO check (#15056)
- exit() replaced with regular return since these two behave the same in
  main()
- main(void) used as argc and argv aren't used
- if sentences wrapped in curly brackets for readability
- fgets wrapped in if to check for the return result and omit the
  "ignoring return value of 'fgets' declared with attribute
  'warn_unused_result'..." warnings in the config.log
- fclose(fp) added before returning
2024-07-22 10:00:14 +02:00