Commit Graph
56452 Commits
Author SHA1 Message Date
George Peter Banyard 7a95e943d6 Promote warnings to Error in MySQLi extension
Closes GH-5803
2020-09-15 19:12:02 +02:00
Remi Collet b1c5532ad1 fix mbfl function prototypes
re-add mbfl_convert_filter_feed API
re-add pointer cast
2020-09-15 15:15:06 +02:00
Dmitry Stogov f5bbb0480e Tracing JIT for INIT_DYNAMIC_CALL (closure only) 2020-09-15 15:57:57 +03:00
Máté Kocsis 2408991fc5 Remove unintendedly committed test 2020-09-15 14:49:30 +02:00
Máté Kocsis fa5a25b8bb Adjust ext/openssl parameter names
Closes GH-6121
2020-09-15 14:27:54 +02:00
Máté Kocsis c37a1cd650 Promote a few remaining errors in ext/standard
Closes GH-6110
2020-09-15 14:26:16 +02:00
George Peter Banyard 62c20c662a Promote warnings to Error in SNMP extension 2020-09-15 13:08:07 +02:00
Gabriel Caruso 1a8936cde3 Check ReflectionReference::fromArrayElement with union types
ReflectionReference::fromArrayElement(array $array, int|string $key): ?ReflectionReference
is going to be its official signature for PHP 8.0.

Closes GH-5651
2020-09-15 12:56:10 +02:00
George Peter Banyard c1823c6c8a Promote warning to Error in ODBC extension
Closes GH-6123
2020-09-15 12:50:00 +02:00
George Peter Banyard 063fdd9422 Use ValueError instead of exceptions in SPL extension 2020-09-15 12:49:59 +02:00
George Peter Banyard b6207338e8 Use normal error in SPL for uninitialized objects 2020-09-15 12:49:59 +02:00
George Peter Banyard 9affbef0e6 Use normal error in SPL for 'An iterator cannot be used with foreach by reference' 2020-09-15 12:49:59 +02:00
George Peter Banyard 4fc7026630 Convert warning to assetion in MySQL PDO driver
Closes GH-6120
2020-09-15 12:49:59 +02:00
Nikita Popov d81ea5e928 Fix preg_replace_callback_array() with array subject
Apparently this "feature" was completely untested...
2020-09-15 12:03:18 +02:00
Nikita Popov da0663a337 Add GC_TRY_ADDREF macro
That adds a ref if not immutable. Also audit uses of GC_IMMUTABLE
to either use GC_TRY_ADDREF or GC_TRY_PROTECT_RECURSION.
2020-09-15 11:41:09 +02:00
George Peter BanyardandChristopher Jones 824a2bf149 Promote some warnings to ValueError in OCI8
Closes GH-6116

Co-authored-by: Christopher Jones <sixd@php.net>
2020-09-15 02:54:12 +02:00
Christoph M. Becker f51bbcc2b2 Merge branch 'PHP-7.4' into master
* PHP-7.4:
  Avoid segfault if module/extension version is not defined
2020-09-14 22:36:00 +02:00
Christoph M. Becker 15236fb83e Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Avoid segfault if module/extension version is not defined
2020-09-14 22:34:58 +02:00
Christoph M. Becker 4e198c0064 Avoid segfault if module/extension version is not defined 2020-09-14 22:34:10 +02:00
Dmitry Stogov a4c3aee5b2 Support for reference 2020-09-14 23:30:49 +03:00
Dmitry Stogov a351da55bf Simplify zend_jit_pre/post_inc/dec_typed_ref() helpers 2020-09-14 22:26:34 +03:00
Dmitry Stogov 8f342ad4d2 JIT for PRE/POST_INC/DEC_OBJ 2020-09-14 19:36:15 +03:00
George Peter Banyard d0111d785d Promote warnings to Errors in PostgreSQL extension
Do some drive by indentation fixes
Also fix pg_select() in regards to the $result_type arg which was missing from ZPP

Closes GH-6129
2020-09-14 17:01:35 +02:00
Larry Garfield 96f2f3174b Update array parameter names for named parameters
* The array "subject" of a function gets called $array.

* Further parameters should be self-descriptive if used
  as a named parameter, and a full word, not an abbreviation.

* If there is a "bunch more arrays" variadic, it gets
  called $arrays (because that's what was already there).

* A few functions have a variadic "a bunch more arrays,
  and then a callable", and were already called $rest.
  I left those as is and died a little inside.

* Any callable provided to an array function that acts
  on the array is called $callback. (Nearly all were already,
  I just fixed the one or two outliers.)

* array_multisort() is beyond help so I ran screaming.
2020-09-14 14:56:49 +00:00
George Peter Banyard 48368a6bf3 Promote Warnings to Error in PostgreSQL PDO driver
Closes GH-6119
2020-09-14 13:41:10 +02:00
Dmitry Stogov bf515649ff JIT for ASSIGN_OBJ_OP 2020-09-14 13:31:41 +03:00
Nikita Popov 950ea89fb0 Convert E_ERROR to Error exception in mysqli_result iterator
The same condition uses Error exceptions in lots of other classes.
2020-09-14 12:15:24 +02:00
Nikita Popov 9d3c6665ab Drop some dead code 2020-09-14 12:03:07 +02:00
Máté Kocsis 8e8a277b2f Slightly improve error handling in DatePeriod::__construct() 2020-09-14 11:59:51 +02:00
Máté KocsisandNikita Popov 46c0c82a0f Declare array|int and object-of-class|int types in stubs
Closes GH-6081

Co-Authored-By: Nikita Popov <nikic@php.net>
2020-09-14 11:59:32 +02:00
Máté Kocsis 1c81a34563 Make mb_send_mail() consistent with mail()
The $additional_headers parameter shouldn't accept null.
2020-09-14 11:52:33 +02:00
Máté Kocsis eb86d08128 Fix a few stub parameter types in ext/standard 2020-09-14 11:46:14 +02:00
Christoph M. Becker 853b7945bc Unmark tests as XFAIL on Windows
This issue has been resolved[1], so the tests are expected to pass on
Windows again.

[1] <https://github.com/php/php-src/commit/0a03291b51e7cf199c06ba4ae914277ce0ac4202>
2020-09-14 10:14:21 +02:00
Dmitry Stogov 0a03291b51 Allocate Windows 64 shadow stack space 2020-09-14 10:41:22 +03:00
Benjamin Eberlei ff0e39bb4d Remove @jit Docblock support for now due to dev-time constraints 2020-09-14 09:21:05 +02:00
George Peter Banyard c8d47cf875 Convert warnings to assetions in OCI PDO driver
Closes GH-6118
2020-09-14 01:07:58 +02:00
Christoph M. Becker 873c087398 Mark tests as XFAIL on Windows
These tests segfault with tracing JIT on Windows as of a recent
commit[1].  A link to a backtrace is available in a comment[2].  For
now, we mark these tests as XFAIL, to keep AppVeyor CI helpful.

[1] <https://github.com/php/php-src/commit/817ae414962480d133ed76618b88b3e7ba482718>
[2] <https://github.com/php/php-src/commit/817ae414962480d133ed76618b88b3e7ba482718#commitcomment-42227420>
2020-09-13 15:38:57 +02:00
Matteo Beccati 385423442a Fix broken test
Since e8e4ddce
2020-09-13 10:02:13 +02:00
George Peter Banyard 67d21bf237 Use Error for uninitialized SQLite object
Closes GH-6113
2020-09-12 22:37:04 +02:00
George Peter Banyard 1f118aa24c Fix SKIPIF section for SQLite3 test
Test is borked if the posix_geteui() function is unavailable.
2020-09-12 22:36:50 +02:00
Máté Kocsis e8e4ddce77 Improve parameter handling in ext/openssl
Closes GH-6025
2020-09-12 22:08:41 +02:00
George Peter Banyard c93a7b50b4 Normalize behaviour of DNS function on Windows
This is a follow-up on commit 4a438b4469

Add some tests to hopefully not forget it next time
2020-09-12 18:41:25 +02:00
Nikita Popov 8446e28275 Handle missing result_var in binary_op_result_type
For dim/obj compound ops we don't have a result_var. Not sure why
this never caused issues before, but this can crash with JIT.
2020-09-11 22:36:41 +02:00
George Peter Banyard cd05b56a6f Promote some warnings in BCMath to Errors
Also do a bit of refactoring at the same time.

Closes GH-6105
2020-09-11 17:40:06 +02:00
Nikita Popov f29bfc0bd8 Use string|int union types in pgsql
For "field name or field offset" parameters.

Also make $ctor_params an ?array parameter.
2020-09-11 17:33:09 +02:00
Nikita Popov a79008bd91 Also forbid null bytes in mail()
I've adjusted mb_send_mail() already, but of course the handling
in mail() should be the same.
2020-09-11 15:28:51 +02:00
Christoph M. Becker 4d86000541 Merge branch 'PHP-7.4' into master
* PHP-7.4:
  Fix #80067: Omitting the port in bindto setting errors
2020-09-11 14:49:07 +02:00
Christoph M. Becker e41867888a Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #80067: Omitting the port in bindto setting errors
2020-09-11 14:46:51 +02:00
Christoph M. Becker dfb3a79914 Fix #80067: Omitting the port in bindto setting errors
A recent commit[1] which fixed a memory leak introduced a regression
regarding the formerly liberal handling of IP addresses to bind to.  We
fix this by reverting that commit, and fix the memory leak where it
actually occurs.  In other words, this fix is less intrusive than the
former fix.

[1] <http://git.php.net/?p=php-src.git;a=commit;h=0b8c83f5936581942715d14883cdebddc18bad30>

Closes GH-6104.
2020-09-11 14:44:12 +02:00
Máté Kocsis f293e6b920 Clean up ext/session errors
Closes GH-6111
2020-09-11 11:59:04 +02:00