1
0
mirror of https://github.com/php/php-src.git synced 2026-04-29 19:23:22 +02:00
Commit Graph

97604 Commits

Author SHA1 Message Date
Nikita Popov 7384fcff0a Merge branch 'PHP-7.0' into PHP-7.1 2016-08-16 21:05:57 +02:00
Nikita Popov e2230c17d3 Fix bug #72854 2016-08-16 21:05:30 +02:00
Aaron Piotrowski 6fcedc96fb Fix closure tests using ReflectionType::__toString() 2016-08-16 13:05:51 -05:00
Aaron Piotrowski 20fdd47921 Append \ to class name returned from ReflectionType::__toString() 2016-08-16 11:28:33 -05:00
Nikita Popov ba09a520d2 Cleanup parameter/return type checking code
a) Extract all the logic for error message formatting into a separate
function that is reused for everything.
b) Extract the logic for whether a value matches a type into two
functions, one for user types, one for internal ones.

This tries to fight the increasing code duplication in the type
checking code, whether everything was repeated at least four times
and parts of the error message handling were repeated in dozens of
branches.
2016-08-16 15:48:33 +02:00
Nikita Popov 1397f754c8 Fix handling of qualified nullable parameter types
compile_typename() can't deal with TYPE_NULLABLE flags, drop it
beforehand.
2016-08-16 12:43:17 +02:00
Dmitry Stogov 443da77c35 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed use after free
2016-08-16 11:44:53 +03:00
Dmitry Stogov ff06588130 Fixed use after free 2016-08-16 11:44:22 +03:00
Christopher Jones 603ed84c13 Merge branch 'PHP-7.0' into PHP-7.1 2016-08-16 16:59:58 +10:00
Christopher Jones 51c1b64fa9 Remove unused OCI8 macros 2016-08-16 16:58:20 +10:00
Matthias Endler ad8b99c888 Fix some typos in PHP FPM configuration
[skip ci]
2016-08-15 22:50:14 +02:00
Nikita Popov f7caa2bd8e Hide (un)serialize data from ABI
The (UN)SERIALIZE_INIT/DESTROY macros now go through non-inlined
functions, so any changes to them will apply to extensions without
rebuilds.

Additionally, the (un)serialize_data structures are now no longer
exported.

This means that we are allowed to change these structures in patch
releases without breaking the ABI.
2016-08-15 22:42:27 +02:00
Xinchen Hui c63260c088 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #72846 (getConstant for a array constant with constant values returns NULL/NFC/UKNOWN)
2016-08-15 23:25:07 +08:00
Xinchen Hui 60de74ebda Fixed bug #72846 (getConstant for a array constant with constant values returns NULL/NFC/UKNOWN) 2016-08-15 23:22:55 +08:00
Anatol Belski 51b0398ffc Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  put missing prototype and fix ts build
2016-08-14 22:40:20 +02:00
Anatol Belski d6b46901b2 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  put missing prototype and fix ts build
2016-08-14 22:39:01 +02:00
Anatol Belski 4a4422740f put missing prototype and fix ts build 2016-08-14 22:35:01 +02:00
Jakub Zelenka 427c8c809d Set DSA or DH key only if pub key supplied 2016-08-14 20:42:56 +01:00
Anatol Belski b783952cb1 Merge branch 'PHP-7.1' of git.php.net:php-src into PHP-7.1 2016-08-14 21:00:56 +02:00
Anatol Belski 909b62cda2 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  update NEWS
  update NEWS
2016-08-14 20:55:41 +02:00
Anatol Belski 32c94deac3 update UPGRADING 2016-08-14 20:55:26 +02:00
Anatol Belski e910b0a8a5 update NEWS 2016-08-14 20:52:47 +02:00
Anatol Belski 9088ef8052 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  update NEWS
2016-08-14 20:51:44 +02:00
Anatol Belski 5c7f802e7e update NEWS 2016-08-14 20:50:23 +02:00
Jakub Zelenka c3c90abb17 Return false if tag is not supplied or cannot be retrieved in AEAD
It doesn't make sense to return just encoded string as it cannot be
used anyway (decryption without a tag will not work).
2016-08-14 19:34:03 +01:00
Anatol Belski e6536b9d6f Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #72759 Regression in pgo_pgsql
2016-08-14 20:06:44 +02:00
Anatol Belski 245eaf5187 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fixed bug #72759 Regression in pgo_pgsql
2016-08-14 20:04:49 +02:00
Anatol Belski 977cbc2fff Fixed bug #72759 Regression in pgo_pgsql
This is caused by the fix for #72633. Namely, lastval() throws an error,
if no nextval() was called earlier in the same session. This is by all
means correct so far, however inside a transaction it leads to an abort.
This is the opposite to MySQL's last_insert_id() which doesn't produce
any error no matter something were autoincremented or not.

To avoid existing scripts breakage in the stable branches, the previous
patch is extended to revert the transaction to the state before the lastval()
call in case of error. It is done only for 5.6 and 7.0 to retain BC. For 7.1+,
the clean behavior should persist. This is already the current behavior, when
the sequence name is explicitly passed. So there's no reason to obfuscate the
errors where this breakage is valid.
2016-08-14 19:33:24 +02:00
Jakub Zelenka 37c12f8f86 Merge branch 'PHP-7.0' into PHP-7.1 2016-08-14 14:01:36 +01:00
Jakub Zelenka 436d50a821 Merge branch 'PHP-5.6' into PHP-7.0 2016-08-14 14:00:35 +01:00
Jakub Zelenka 9f1d962ed6 Fixed bug #72787 (json_decode reads out of bounds) 2016-08-14 13:52:59 +01:00
Nikita Popov 6ab9b531bc Merge branch 'PHP-7.0' into PHP-7.1 2016-08-13 21:42:51 +02:00
Nikita Popov 98787d9002 Merge branch 'PHP-5.6' into PHP-7.0 2016-08-13 21:41:00 +02:00
Benedict Singer dfadc5a427 Bug 70195
Many FTP-S servers now require FTP clients to re-use the SSL session
from the control connection on the data connection, to prove that the
same entity controls both connections. This patch updates PHP's FTP-S
client code to allow that possibility.
2016-08-13 21:35:03 +02:00
Christoph M. Becker a927056cad Merge branch 'PHP-7.0' into PHP-7.1 2016-08-13 16:31:43 +02:00
Christoph M. Becker 33508a3d47 Merge branch 'PHP-5.6' into PHP-7.0 2016-08-13 16:23:15 +02:00
Christoph M. Becker 82df4e2638 Fix #72278: getimagesize returning FALSE on valid jpg
getimagesize() is rather strict about the length of the marker payload data,
and fails if there are extraneous bytes before the next marker. Only a very
special case reported in bug #13213 is catered to.

libjpeg is rather resilient to such corrupted JPEG files, and raises a
recoverable error in this case. Other image processors also accept such
JPEG files, so we adapt getimagesize() to skip (but warn about) such
extraneous bytes.
2016-08-13 16:14:34 +02:00
Christoph M. Becker f0c77ee7f8 Merge branch 'PHP-7.0' into PHP-7.1 2016-08-13 12:06:11 +02:00
Christoph M. Becker a93c62aafa Merge branch 'PHP-5.6' into PHP-7.0 2016-08-13 11:47:20 +02:00
Christoph M. Becker ae3b2078ea Fix #72823: strtr out-of-bound access
If php_strtr_array_prepare_repls() reports pattern_len == 0, we return
early to avoid OOB accesses, and because there is nothing to replace anyway.
2016-08-13 11:40:33 +02:00
Christoph M. Becker 02d6e4e517 Merge branch 'PHP-7.0' into PHP-7.1 2016-08-13 01:29:49 +02:00
Christoph M. Becker 175d94b6e5 Merge branch 'PHP-5.6' into PHP-7.0 2016-08-13 01:21:57 +02:00
Christoph M. Becker 7938ebf6c1 Fix #60665: call to empty() on NULL result using PDO::FETCH_LAZY returns false
The has_property handler only checked whether a respective column name
exists, but neither whether the column value is set, nor whether it is
empty, respectively. We fix that to match the behavior of POD:FETCH_OBJ in
particular and PHP in general.
2016-08-13 01:11:13 +02:00
Christoph M. Becker 040e99f566 Merge branch 'PHP-7.0' into PHP-7.1 2016-08-12 12:55:32 +02:00
Christoph M. Becker 92a076a92b Fix #72793: xml_parser_free leaks mem when execute xml_set_object 2016-08-12 12:54:21 +02:00
Xinchen Hui 0b58d5eb81 Update NEWs 2016-08-12 16:36:57 +08:00
Xinchen Hui dd618664a0 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #72813 (Segfault with __get returned by ref)
  Fix URL rewriter partially

Conflicts:
	Zend/zend_object_handlers.c
	ext/standard/url_scanner_ex.c
	ext/standard/url_scanner_ex.re
2016-08-12 16:35:41 +08:00
Xinchen Hui fe41f87e46 Merge branch 'PHP-7.0' of git.php.net:/php-src into PHP-7.0
* 'PHP-7.0' of git.php.net:/php-src:
  Fix URL rewriter partially
  Support "git worktree"
2016-08-12 16:25:18 +08:00
Xinchen Hui e03480bfab Fixed bug #72813 (Segfault with __get returned by ref)
This should be safe change, as we don't dereference value and member
after calling setter/getter.

And compare to adding unref codes, this is much cheaper.
2016-08-12 16:24:46 +08:00
Yasuo Ohgaki 3467526a65 Merge RFC: Session ID without hashing
https://wiki.php.net/rfc/session-id-without-hashing
2016-08-12 12:31:02 +09:00