1
0
mirror of https://github.com/php/php-src.git synced 2026-04-30 03:33:17 +02:00
Commit Graph

10982 Commits

Author SHA1 Message Date
Sebastian Bergmann 6035ebd4a6 Merge branch 'PHP-7.1' 2017-04-11 08:29:14 +02:00
Sebastian Bergmann 25c941807b Merge branch 'PHP-7.0' into PHP-7.1 2017-04-11 08:28:55 +02:00
Sebastian Bergmann 7cdf520319 Fix bug #74409 2017-04-11 08:27:17 +02:00
Xinchen Hui 696bd37e67 Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed condition check
  Fixed condition check
  another place

Conflicts:
	ext/mcrypt/mcrypt.c
2017-04-10 14:49:13 +08:00
Xinchen Hui 65d77812fc Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed condition check
2017-04-10 14:47:42 +08:00
Xinchen Hui 4bebcb84ad Fixed condition check 2017-04-10 14:47:24 +08:00
Nikita Popov 430eea84b8 Merge branch 'PHP-7.1' 2017-04-09 13:15:04 +02:00
Nikita Popov 84ef6fa80d Merge branch 'PHP-7.0' into PHP-7.1 2017-04-09 13:14:57 +02:00
Craig Duncan ba6561d3cc Fixed bug #72071: Prevent Max-Age from being negative 2017-04-09 13:14:40 +02:00
Nikita Popov 51b06aa86e Merge branch 'PHP-7.1' 2017-04-02 13:20:14 +02:00
Nikita Popov c8034514ed Fixed bug #74361 2017-04-02 13:19:32 +02:00
Thomas Punt 9f08aff3fd Remove superfluous allocation checks around ZMM-based functions 2017-04-02 00:58:19 +02:00
Nikita Popov e3b2b05229 Merge branch 'PHP-7.1' 2017-03-27 19:02:50 +02:00
x-xiang e9e860a05b Don't retain mt_rand() seeds across requests
In particular, this prevents manual seeding of mt_rand() to leak
across requests.
2017-03-27 19:02:39 +02:00
Nikita Popov 81d8c37b03 Add test for previous commit 2017-03-23 22:37:17 +01:00
Nikita Popov 8522e2894e Make sure lengths and refs are unsigned in unserialize() 2017-03-23 22:34:15 +01:00
xKhorasan 6a1d4cd47a Fixed bug #74300 2017-03-23 22:06:46 +01:00
Rowan Collins 1b565f1393 Change 'undefined constant' from E_NOTICE to E_WARNING and mention deprecation
Implements RFC "Deprecate and Remove Bareword (Unquoted) Strings"
[https://wiki.php.net/rfc/deprecate-bareword-strings]
2017-03-23 18:52:43 +01:00
Anatol Belski 81b2d98355 fix version check at right place 2017-03-22 17:44:47 +01:00
Anatol Belski 6dbee20f83 fix test warnings for OpenSSL 1.1
add skip condition
2017-03-22 13:55:08 +01:00
Anatol Belski 3b28a9d637 Merge branch 'PHP-7.1'
* PHP-7.1:
  explicitly ignore php.ini for proc open tests
2017-03-21 12:45:27 +01:00
Anatol Belski 9e3672eaef Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  explicitly ignore php.ini for proc open tests
2017-03-21 12:44:36 +01:00
Anatol Belski bc2b500d3e explicitly ignore php.ini for proc open tests
In some cases, when an environment is unclean, tests might get stuck fe
when some incorrect ini file is loaded. As the test depends on the core
only, it is safer to explicitly ignore the ini. Any ini can be passed in
the cmd itself, if needed.
2017-03-21 12:39:40 +01:00
Nikita Popov f2c35fdda8 Merge branch 'PHP-7.0' into PHP-7.1 2017-03-17 20:20:43 +01:00
Nikita Popov 2e83082605 Fix bug #74265 2017-03-17 20:19:40 +01:00
Nikita Popov 8015daeddb Merge branch 'PHP-7.1' 2017-03-16 12:57:43 +01:00
Nikita Popov 63e59c75a5 Merge branch 'PHP-7.0' into PHP-7.1 2017-03-16 12:57:36 +01:00
Adam Saponara 98f4ce9363 Return FALSE if error_log fails to write all bytes 2017-03-16 12:56:36 +01:00
Thomas Punt 932c4b35dc Remove more unnecessary checks on Zend's allocator functions 2017-03-16 12:23:55 +01:00
Sara Golemon 131fd3baa0 Remove unnecesary shadow of new_val 2017-03-14 11:29:22 -07:00
Sara Golemon c74bc87c74 Minor optimizations to array_keys()/array_values()
array_values():
When the input is an empty array or a packed array with no gaps,
return the original array.

array_keys():
When the input is an empty array, return the original array.
When the input is a packed array with no holes
(and no search key specified), populate the return with
a simple range(0, count($input) - 1)
2017-03-14 11:23:02 -07:00
Nikita Popov edcabf6d07 Drop unnecessary allocator return value checks 2017-03-13 22:07:15 +01:00
Nikita Popov 1e196110d3 Fix __sleep() returning undefined declared properties 2017-03-12 22:20:08 +01:00
Nikita Popov ddc0dbf1a3 Clean up __sleep() related code 2017-03-12 22:20:07 +01:00
Nikita Popov b3ca0c2500 zend-test extension to house code that is required for testing internal APIs, but that we would not want to expose for regular builds 2017-03-12 18:58:50 +00:00
David Carlier ea91c08232 Drop unnecessary checks of pemalloc() return value 2017-03-12 17:06:25 +01:00
Sara Golemon 2ba2b768cc Merge branch 'PHP-7.1'
* PHP-7.1:
  Detect invalid port in xp_socket parse ip address
2017-03-07 12:11:31 -08:00
Sara Golemon 1a19b97ac3 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Detect invalid port in xp_socket parse ip address
2017-03-07 12:11:22 -08:00
Sara Golemon bab0b99f37 Detect invalid port in xp_socket parse ip address
For historical reasons, fsockopen() accepts the port and hostname
separately: fsockopen('127.0.0.1', 80)

However, with the introdcution of stream transports in PHP 4.3,
it became possible to include the port in the hostname specifier:

fsockopen('127.0.0.1:80')
Or more formally: fsockopen('tcp://127.0.0.1:80')

Confusing results when these two forms are combined, however.
fsockopen('127.0.0.1:80', 443) results in fsockopen() attempting
to connect to '127.0.0.1:80:443' which any reasonable stack would
consider invalid.

Unfortunately, PHP parses the address looking for the first colon
(with special handling for IPv6, don't worry) and calls atoi()
from there.  atoi() in turn, simply stops parsing at the first
non-numeric character and returns the value so far.

The end result is that the explicitly supplied port is treated
as ignored garbage, rather than producing an error.

This diff replaces atoi() with strtol() and inspects the
stop character.  If additional "garbage" of any kind is found,
it fails and returns an error.
2017-03-07 12:10:53 -08:00
Anatol Belski c698299550 Interned strings unification for TS/NTS
Hereby, interned strings are supported in thread safe PHP. The patch
implements two types of interned strings

- interning per process, strings are not freed till process end
- interning per request, strings are freed at request end

There is no runtime interning.

With Opcache, all the permanent iterned strings are copied into SHM on
startup, additional copying into SHM might happen on demand.
2017-03-04 10:39:13 +01:00
Xinchen Hui b717c7ffb0 Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed bug #74148 (ReflectionFunction incorrectly reports the number of arguments)
2017-02-23 11:02:48 +08:00
Xinchen Hui 48fcc5ddc2 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #74148 (ReflectionFunction incorrectly reports the number of arguments)
2017-02-23 11:02:37 +08:00
Xinchen Hui 1d4eead995 Fixed bug #74148 (ReflectionFunction incorrectly reports the number of arguments) 2017-02-23 11:02:23 +08:00
Kalle Sommer Nielsen dbdb0819b2 Fix extra ; causing a build error 2017-02-22 12:09:59 +01:00
Nikita Popov 5da004cc75 Merge branch 'PHP-7.1' 2017-02-17 18:44:10 +01:00
Nikita Popov c240feb7f4 Merge branch 'PHP-7.0' into PHP-7.1 2017-02-17 18:44:02 +01:00
Benjamin Robin 513582814b Fixed bug #74105
If getrandom syscall is unavailable (ENOSYS), try to fallback on
/dev/urandom.
2017-02-17 18:42:35 +01:00
Nikita Popov 46bfad56be Merge branch 'PHP-7.1' 2017-02-16 17:28:14 +01:00
Nikita Popov 976225ef23 Merge branch 'PHP-7.0' into PHP-7.1 2017-02-16 17:28:05 +01:00
Nikita Popov cf3ef36323 Fix memory errors in url rewriter
Strings aren't terminated here...
2017-02-16 17:24:07 +01:00