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

118059 Commits

Author SHA1 Message Date
Nikita Popov
d2c92d7fd3 Stubs: Store information per-class
We'll need this if we want to generate method entries.
2020-04-03 16:20:47 +02:00
Nikita Popov
2bfcd8825c Remove now unnecessary PHP_FUNCTION() declarations 2020-04-03 15:41:41 +02:00
Nikita Popov
51bc6233b2 Generate function entries from stubs
If @generate-function-entries is specified in the stub file,
also generate function entries for the extension.

Currently limited to free functions only.
2020-04-03 15:41:41 +02:00
Máté Kocsis
305b17e85f Do not include the same stub multiple times
Closes GH-5322
2020-04-03 14:23:54 +02:00
Christoph M. Becker
17d4e66204 Fix #68690: Hypothetical off-by-one condition
We fix this, even though `filter->cache == jisx0213_u2_tbl_len` can
never be true here.
2020-04-03 14:20:37 +02:00
George Peter Banyard
fa3b8c75fb Promote unknown encoding throws in encoding array/string list
For the string list we emit still emit a warning by comparing arg_num to 0

Closes GH-5337
2020-04-03 10:58:46 +02:00
Remi Collet
75b01c797e add some output when generating arginfo 2020-04-03 10:48:20 +02:00
Remi Collet
e11d3b1690 Move gen_stub.php to build directory and install it so phpize can take care of it, and thus extension can use it as it is already in Makefile 2020-04-03 10:48:20 +02:00
Nikita Popov
6e1ff5f951 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix incorrect free for last_message
2020-04-03 10:06:52 +02:00
Nikita Popov
37a179bd3c Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix incorrect free for last_message
2020-04-03 10:06:09 +02:00
Qianqian Bu
ee21657a6a Fix incorrect free for last_message
In commit a7305eb539 the last_message
field of the connection object was changed to be always non-persistent.
But there is a place on change_user path that still treats it
depending on conn->persistent flag. This will cause PHP crash after
com_change_user success when there is last_message set
2020-04-03 10:05:16 +02:00
George Peter Banyard
656046873c Refactor mb_substr_count()
Promote empty needle warning to ValueError
Convert if branch into an assertion as if mbfl_substr_count fails this now implies a bug
Thus mb_substr_count() can only return int now, fix stubs accordingly
2020-04-02 22:40:00 +02:00
George Peter Banyard
165fde9a37 Convert if branch to assertion in mb_strlen
This operation should never fail, therefore it's converted to an assertion.
Thus this mb_strlen() can now only return int, fix stubs accordingly
2020-04-02 22:40:00 +02:00
George Peter Banyard
d44ee9112f Promote mb_str_split warning to ValueError
Also add a TODO about documenting this funcion on PHP.net
Convert some checks to assertions as if they don't hold something went wrong during memory allocation
Due to these changes this function cannot return false anymore, fix stubs accordingly
2020-04-02 22:40:00 +02:00
George Peter Banyard
f488b5d0f9 Merge mb_strstr() variants under a common implementation
This reduces heavy ducplicate code
2020-04-02 22:40:00 +02:00
George Peter Banyard
737871341f Improve code flow
These nested if-else blocks are unnecessary since we return early.
2020-04-02 22:40:00 +02:00
George Peter Banyard
577de174de Use ZEND_NUM_ARGS() macro instead of custom variable
Also why on earth would someone do this?
2020-04-02 22:40:00 +02:00
George Peter Banyard
4cd3d7b166 Promote empty string warning to ValueError in mb_ord() 2020-04-02 22:39:59 +02:00
Nikita Popov
cf3528bd44 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fixed bug #79434
2020-04-02 16:34:51 +02:00
Nikita Popov
b3c7ab66fb Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fixed bug #79434
2020-04-02 16:34:21 +02:00
Nikita Popov
cf68bc413b Fixed bug #79434 2020-04-02 16:34:03 +02:00
Matteo Beccati
66ec60cb45 Merge branch 'PHP-7.4'
* PHP-7.4:
  Skip fpm tests not designed to be run as root
  Allow fpm tests to be run with long socket path
2020-04-02 16:17:24 +02:00
Matteo Beccati
87375fa2be Skip fpm tests not designed to be run as root
When running as root with TEST_FPM_RUN_AS_ROOT=1
2020-04-02 16:16:42 +02:00
Matteo Beccati
af337ae47e Allow fpm tests to be run with long socket path
Socket path is restricted to ~100 bytes, so we can use
the system temp dir if the path ends up too long.
2020-04-02 16:16:42 +02:00
Remi Collet
319c21b1f6 news / UPGRADING for zip 1.19.0 2020-04-02 14:58:13 +02:00
Remi Collet
2dc8d39bae - add ZipArchive::EM_UNKNOWN constant - add ZipArchive::EM_TRAD_PKWARE constant - cleanup hack for libzip 1.3.1 (have only exist for a few days) - add ZipArchive::isCompressionMethodSupported() method (libzip 1.7.0) - add ZipArchive::isEncryptionMethodSupported() method (libzip 1.7.0) - bump version to 1.19.0-dev 2020-04-02 14:52:05 +02:00
Christoph M. Becker
6983ae751c Fix #47983: mixed LF and CRLF line endings in mail()
Email headers are supposed to be separated with CRLF.  Period.
2020-04-02 14:51:14 +02:00
Christoph M. Becker
737f7dd8f6 Prevent imap mail tests from borking instead of skipping
As of commit e49593a[1], run-tests.php is rather picky regarding the
output of SKIPIF sections, so we have to suppress warnings for failing
imap_open().

[1] <http://git.php.net/?p=php-src.git;a=commit;h=e49593a7c3159a5673ce74b4e5133f1264dc313f>
2020-04-02 12:51:22 +02:00
Remi Collet
59e0674185 use a better setter for zip_error_t 2020-04-02 12:26:44 +02:00
Nikita Popov
184fdac7c2 Remove <default> prefix from reflection dump
This really doesn't add anything, and only makes for confusing
terminology. Only marking properties as dynamic is sufficient.
2020-04-02 11:25:41 +02:00
Nikita Popov
083b0c38a0 Display property default value in reflection dumps 2020-04-02 11:21:48 +02:00
Nikita Popov
b5991d3382 Show property type in reflection export 2020-04-02 11:05:04 +02:00
Nikita Popov
5430a466ff Avoid control flow warning 2020-04-02 10:54:32 +02:00
Christoph M. Becker
919adcf161 Merge branch 'PHP-7.4'
* PHP-7.4:
  Enable error diagnostic for check_default_conf_path.phpt
2020-04-01 19:21:46 +02:00
Christoph M. Becker
71e1d37938 Enable error diagnostic for check_default_conf_path.phpt
Otherwise we have no clue why the test failed, if the regex didn't
match.
2020-04-01 19:20:35 +02:00
Nikita Popov
3a7c716249 Remove unnecessary check in runtime_compile_time_binary_operands.phpt
Now that operator errors are detected more accurately, we no longer
have any cases where we throw a compile-time error instead of a
run-time exception, so we can drop this check now.
2020-04-01 14:49:52 +02:00
Nikita Popov
f1dd8b2af0 Make division by zero error check more accurate
For division (rather than modulus) we should check the double
value, otherwise the result might be zero after integer truncation,
but not zero as a floating point value.
2020-04-01 14:47:21 +02:00
Nikita Popov
1ed132e2e5 Unify checks for binary operator errors for ct eval
Move everything into one function and share it with opcache.
This fixes some discrepancies.
2020-04-01 14:42:58 +02:00
Nikita Popov
56b18d478e Don't convert binop operand types in opcache
This may produce different behavior if operator overloading is
involved, and may change the error message.

If there's strong interest, this could be done in the DFA pass
with available type information. It does not look particularly
practically useful to me though.
2020-04-01 14:39:41 +02:00
Nikita Popov
2d8f9f34dd Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix literal compaction collision between string and double
2020-04-01 14:23:07 +02:00
Nikita Popov
59c8d6a863 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix literal compaction collision between string and double
2020-04-01 14:22:27 +02:00
Nikita Popov
14b770d407 Fix literal compaction collision between string and double
For the sake of simplicity I'm using a separate hashtable, rather
than trying to do hash perturabation on the double strings.
2020-04-01 14:20:59 +02:00
Nikita Popov
cdaf35033d Improve "unsupported operands" error
By mentioning the operand types. We can do that now, as the
original operand types now remain available.

Closes GH-5330.
2020-04-01 11:26:43 +02:00
Nikita Popov
9c0afc859c Remove op_func from TRY_BINARY_OP1 macro
And move the operator overloading helpers into zend_operators.c,
there's no reason for them to be in the header.
2020-04-01 10:15:03 +02:00
Christoph M. Becker
f973b712b2 Merge branch 'PHP-7.4'
* PHP-7.4:
  Add NEWS entryc [ci skip]
2020-04-01 09:29:07 +02:00
Christoph M. Becker
c065a586d2 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Add NEWS entryc [ci skip]
2020-04-01 09:28:39 +02:00
Christoph M. Becker
cc3af6fdea Add NEWS entryc [ci skip] 2020-04-01 09:26:20 +02:00
George Peter Banyard
a54ee6e591 Merge branch 'PHP-7.4' 2020-04-01 04:55:35 +02:00
George Peter Banyard
cc0052678a Merge branch 'PHP-7.3' into PHP-7.4 2020-04-01 04:34:09 +02:00
George Peter Banyard
18dc9044f5 Fix bug 79441 2020-04-01 04:29:20 +02:00