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

118214 Commits

Author SHA1 Message Date
George Peter Banyard
1c334db4c8 Add -Wextra compiler warnings and exclude the trigger happy ones
The compile warnings which are explicitly suppressed are:
 * -Wno-implicit-fallthrough
 * -Wno-unused-parameter
 * -Wno-sign-compare
 * -Wno-clobbered, only with GCC

Closes GH-5151
2020-04-14 22:22:35 +02:00
George Peter Banyard
a2a6c7f227 Add -Wno-type-limits compiler flag to Sodium extension
This may happen on 32bits
2020-04-14 22:22:33 +02:00
George Peter Banyard
13938342f8 Add -Wno-ignored-qualifiers compiler flag to Tidy extension.
This is an issue in the provided library and needs to be fixed upstream.
2020-04-14 22:22:33 +02:00
Dmitry Stogov
ed1ad33ba4 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #79472: ext/ffi/tests/040.phpt TC fails on Big endian arch
2020-04-14 20:38:42 +03:00
Christoph M. Becker
8c5faf7ad1 Fix #79472: ext/ffi/tests/040.phpt TC fails on Big endian arch
For now we are choosing the simplest solution, namely to skip the test
on big-endian architectures.
2020-04-14 20:31:31 +03:00
Christoph M. Becker
e88169e3bf Merge branch 'PHP-7.4'
* PHP-7.4:
  Add missing CVE
2020-04-14 18:20:58 +02:00
Christoph M. Becker
537680a9c4 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Add missing CVE
2020-04-14 18:19:34 +02:00
Christoph M. Becker
c4cdf1ae12 Add missing CVE 2020-04-14 18:18:18 +02:00
Nikita Popov
110e6e4f95 Make gen_stub.php compatible with PHP 7.1 again
Not worth bumping requirements over this...
2020-04-14 17:55:27 +02:00
Nikita Popov
177c455f04 Fix test after callback name change 2020-04-14 17:50:54 +02:00
Alex Dowad
907bf786f1 Remove XFAIL from tests for 'bug' 48770
Bug 48770 was opened due to conflicting expectations about the behavior of:

    call_user_func_array(array($this, 'parent::methodName'), array($arg1,$arg2))

The one reporting the 'bug' seemed to think that since the method name was prefixed with
`parent::`, it should call the method in the superclass of the *class where this code appears*.
However, `$this` might be an instance of a subclass. If so, then it is quite reasonable that
`call_user_func_array` will call the method as defined in the superclass of *the receiver*.

So the 'bug' is not really a bug. Therefore, there is no need for an XFAIL in the tests. They
should just pass.

Amend tests to reflect the actual expected behavior of `call_user_func_array`, not what the
person who reported bug 48770 thought it should be.

Closes GH-5386.
2020-04-14 17:41:52 +02:00
Nikita Popov
7a185b5d0a Fix filter_(var|input)_array default 2020-04-14 17:41:01 +02:00
George Peter Banyard
af63050071 Remove XFAIL section of a passing COM test
Closes GH-5297
2020-04-14 17:31:06 +02:00
Nikita Popov
4fb705a03d Add zend_string_concat2 API 2020-04-14 17:18:05 +02:00
Sara Golemon
489a51bff0 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fixed bug #79468
  NEWS
2020-04-14 11:14:04 -04:00
Guillaume Charifi
adea221b1a Improve socket cmsg space handling.
This should also fix the null pointer arithmetic warning on MacOS as we don't depend on whack code written by Apple.

Closes GH-5387
2020-04-14 17:10:21 +02:00
Nikita Popov
4a935bc2c9 Always use __invoke callable name for objects
The callable name is provided also if it's not callable, in which
case it's basically "what it would be if it were callable", which
is ClassName::__invoke. The current behavior of casting the object
to string makes very little sense as this will just throw an
exception for most objects.
2020-04-14 17:02:47 +02:00
Nikita Popov
bac5137e4e Add zend_create_member_string() API
This is a recurring pattern.
2020-04-14 16:52:13 +02:00
Sara Golemon
3128714859 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fixed bug #79468
  NEWS
2020-04-14 10:32:21 -04:00
Sara Golemon
2814850fd9 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fixed bug #79468
  NEWS
2020-04-14 10:31:35 -04:00
dinosaur
13842eda37 Fixed bug #79468
Close the stream filter resources when removing them from the stream.
2020-04-14 10:27:28 -04:00
Sara Golemon
6df761b7ff NEWS 2020-04-14 10:25:37 -04:00
Nikita Popov
d0006b5fac Use UNKNOWN default for socket_connect()
Specifying the port is mandatory for INET sockets.
2020-04-14 16:09:01 +02:00
Nikita Popov
b9b2e8ddde Fix socket_write() default value 2020-04-14 16:08:55 +02:00
Nikita Popov
e9bdbce53f Merge branch 'PHP-7.4'
* PHP-7.4:
  Don't leak peername if accept fails
2020-04-14 16:08:43 +02:00
Nikita Popov
912e490196 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Don't leak peername if accept fails
2020-04-14 16:08:07 +02:00
Nikita Popov
b56fb9019e Don't leak peername if accept fails
Even if the accept fails, the peername may be populated.
2020-04-14 16:07:39 +02:00
George Peter Banyard
04ab4d09be Add Intl resource bundle files for big-endian architecture.
Little and Big endian files have their own designated folder.
Both use the ASCII charset family.
We may want to add a big-endian/EBCDIC charset family resource bundle in the future.

The build script is currently left untouched as it seems to mostly be for Windows.
2020-04-14 15:30:01 +02:00
Máté Kocsis
1f48feebb9 Improve some TypeError and ValueError messages
Closes GH-5377
2020-04-14 14:38:45 +02:00
Dmitry Stogov
11c5c78401 Added missed '~' 2020-04-14 15:37:20 +03:00
Christoph M. Becker
6e21932521 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix test cases
2020-04-14 14:01:00 +02:00
Christoph M. Becker
2a46f3ee91 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix test cases
2020-04-14 13:59:39 +02:00
Christoph M. Becker
a1b46fc152 Fix test cases 2020-04-14 13:58:48 +02:00
Máté Kocsis
f00bcfbb7d Generate method entries for ext/intl
Closes GH-5370
2020-04-14 13:39:00 +02:00
Nikita Popov
ae1364c350 Increase timeout on ubsan/asan job
This one occasionally runs for more than 2:30 hours.
2020-04-14 12:52:24 +02:00
Nikita Popov
56d30bb35a Merge branch 'PHP-7.4'
* PHP-7.4:
  Fixed bug #79468
2020-04-14 12:02:22 +02:00
Nikita Popov
ef56b2c977 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fixed bug #79468
2020-04-14 12:01:51 +02:00
dinosaur
95eaccd0bb Fixed bug #79468
Close the stream filter resources when removing them from the stream.
2020-04-14 11:59:51 +02:00
Máté Kocsis
1c469adb8b Remove PDO::dbh_constructor() 2020-04-14 11:49:02 +02:00
Máté Kocsis
c6485535c2 Generate method entries from stubs for curl, ffi, pdo, phar
Closes GH-5375
2020-04-14 11:49:02 +02:00
Máté Kocsis
c5fb4f0794 Generate function entries from stubs for a couple of extensions
Migrates ext/standard, ext/tidy, ext/tokenizer,
ext/xml, ext/xml_reader, and ext/xml_writer. Closes GH-5381.
2020-04-14 11:49:02 +02:00
Alex Dowad
80598f1250 Syntax errors caused by unclosed {, [, ( mention specific location
Aside from a few very specific syntax errors for which detailed exceptions are
thrown, generally PHP just emits the default error messages generated by bison on syntax
error. These messages are very uninformative; they just say "Unexpected ... at line ...".

This is most problematic with constructs which can span an arbitrary number of lines, such
as blocks of code delimited by { }, 'if' conditions delimited by ( ), and so on. If a closing
delimiter is missed, the block will run for the entire remainder of the source file (which
could be thousands of lines), and then at the end, a parse error will be thrown with the
dreaded words: "Unexpected end of file".

Therefore, track the positions of opening and closing delimiters and ensure that they match
up correctly. If any mismatch or missing delimiter is detected, immediately throw a parse
error which points the user to the offending line. This is best done in the *lexer* and not
in the parser.

Thanks to Nikita Popov and George Peter Banyard for suggesting improvements.

Fixes bug #79368.
Closes GH-5364.
2020-04-14 11:22:23 +02:00
Nikita Popov
d4471c6aae Remove int6store()
The implementation is broken (syntactically). As it's not used
anyway, I'm just dropping it instead.
2020-04-14 10:37:37 +02:00
Christoph M. Becker
5951ff7ee5 Merge branch 'PHP-7.4'
* PHP-7.4:
  Add NEWS entries [ci skip]
2020-04-14 08:57:29 +02:00
Christoph M. Becker
a76b3358e4 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Add NEWS entries [ci skip]
2020-04-14 08:56:09 +02:00
Christoph M. Becker
8967588702 Add NEWS entries [ci skip] 2020-04-14 08:54:00 +02:00
Stanislav Malyshev
d3fbdf0048 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix bug #79465 - use unsigneds as indexes.
  Fix bug #79330 - make all execution modes consistent in rejecting \0
2020-04-13 21:09:23 -07:00
Stanislav Malyshev
864d69bef7 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix bug #79465 - use unsigneds as indexes.
  Fix bug #79330 - make all execution modes consistent in rejecting \0
2020-04-13 21:09:15 -07:00
Stanislav Malyshev
d539e61c30 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix bug #79465 - use unsigneds as indexes.
  Fix bug #79330 - make all execution modes consistent in rejecting \0
2020-04-13 21:09:08 -07:00
Stanislav Malyshev
9d6bf8221b Fix bug #79465 - use unsigneds as indexes. 2020-04-13 21:08:37 -07:00