Commit Graph

56471 Commits

Author SHA1 Message Date
Dharman
8f56b7a755 mysqli: Promote warning in field_seek
Aligning the behaviour of fetch_field and field_seek.
2020-09-17 09:42:42 +02:00
Máté Kocsis
46d22e435f
Change int parameter types to bool when the parameter behaves as bool
Closes GH-6148
2020-09-17 09:38:18 +02:00
Máté Kocsis
36fd95b524
Generate arginfos 2020-09-16 21:28:27 +02:00
Máté Kocsis
de912821e0
Display string default values in stubs more uniformly
Settling on using quoted string
2020-09-16 21:27:01 +02:00
Máté Kocsis
c76910cd96
Display types in stubs more uniformly
In preparation for generating method signatures for the manual.

This change gets rid of bogus false|null return types, a few unnecessary trailing backslashes, and settles on using ? when possible for nullable types.
2020-09-16 21:19:36 +02:00
Nikita Popov
0286decdb4 Accept GMP|string|int union in GMP functions
This changes GMP functions to accept a GMP|string|int union with
standard semantics (and thus also uses it in function signatures).

Relative to the previous behavior, this means that GMP functions
in weak mode now also accept float and null, and in strict mode no
longer accept bool, and have full type information.

Closes GH-6139.
2020-09-16 17:17:07 +02:00
Máté Kocsis
e7e3099299
Update xmlreader arginfo hash
My git client (GitHub Desktop) decided to commit and push my staged changes, so arginfo generation was not done with the previous commit.
2020-09-16 13:51:36 +02:00
Máté Kocsis
81d6ceedec
Update php_xmlreader.stub.php 2020-09-16 13:47:58 +02:00
Máté Kocsis
7a48381e22
XMLReader::getAttributeNs() can no longer return false 2020-09-16 13:45:13 +02:00
Dmitry Stogov
f786c0e097 Optimize code for FETCH_THIS + INIT_METHOD_CALL/ASSIGN_OBJ_OP/etc 2020-09-16 14:22:36 +03:00
Dharman
0d99a5618f Changed the wording of the error message
"cannot be used in MYSQLI_USE_RESULT mode" sounds more correct than "cannot be used with MYSQLI_USE_RESULT"

Closes GH-6137.
2020-09-16 11:10:11 +02:00
Nikita Popov
f08e666e4b Remove unused GMP_ABS() macro 2020-09-16 11:05:47 +02:00
Dmitry Stogov
f896b982cc Exclude trait methods from call-graph 2020-09-16 12:04:29 +03:00
Nikita Popov
392f0abf68 Avoid ubsan warning due to memcpy null
This showed up in ext/mysqli/tests/mysqli_change_user.phpt on azure
today. Not seeing it locally though, and also not sure why it decided
to show up now...
2020-09-16 10:30:13 +02:00
Matteo Beccati
3b2410ebf6 Fix test
follow-up to 7a95e94 for MySQL < 5.6
2020-09-16 10:06:19 +02:00
Dmitry Stogov
e27776343f Fixed incorrect constant string access 2020-09-16 10:49:54 +03:00
Dmitry Stogov
5f1fb1a5a4 JIT for INIT_METHOD_CALL 2020-09-16 10:25:36 +03:00
Remi Collet
effa3b0883 missing fix for test for new param. name 2020-09-16 07:58:53 +02:00
George Peter Banyard
95f4ee38bb Add some ValueErrors to ext/date
Closes GH-5613
2020-09-16 01:29:28 +02:00
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 Banyard
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é Kocsis
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