Merge branch 'master' of git.php.net:/php-src

* 'master' of git.php.net:/php-src:
  re-arrange NEWS
  5.6.19 will be next
  Fix test when run with openssl < 1.0.2 (reorder so no more SSLv2 message) Fix skip message to work
  fix ReflectionClass::__toString doc block omitted
  fix ReflectionClass::__toString doc block omitted
  improve fix for bug #71201
  improve fix for bug #71201
This commit is contained in:
Xinchen Hui 2016-01-21 13:32:08 +08:00
commit 62f3e5adf8
3 changed files with 15 additions and 9 deletions

View File

@ -386,7 +386,7 @@ static void _class_string(string *str, zend_class_entry *ce, zval *obj, char *in
/* TBD: Repair indenting of doc comment (or is this to be done in the parser?) */
if (ce->type == ZEND_USER_CLASS && ce->info.user.doc_comment) {
string_printf(str, "%s%s", indent, ce->info.user.doc_comment);
string_printf(str, "%s%s", indent, ZSTR_VAL(ce->info.user.doc_comment));
string_write(str, "\n", 1);
}

View File

@ -146,6 +146,7 @@ PHPAPI double _php_math_round(double value, int places, int mode) {
return value;
}
places = places < INT_MIN+1 ? INT_MIN+1 : places;
precision_places = 14 - php_intlog10abs(value);
f1 = php_intpow10(abs(places));
@ -154,8 +155,10 @@ PHPAPI double _php_math_round(double value, int places, int mode) {
the requested places BUT is small enough to make sure a non-zero value
is returned, pre-round the result to the precision */
if (precision_places > places && precision_places - places < 15) {
f2 = php_intpow10(abs(precision_places));
if (precision_places >= 0) {
int64_t use_precision = precision_places < INT_MIN+1 ? INT_MIN+1 : precision_places;
f2 = php_intpow10(abs((int)use_precision));
if (use_precision >= 0) {
tmp_value = value * f2;
} else {
tmp_value = value / f2;
@ -163,8 +166,11 @@ PHPAPI double _php_math_round(double value, int places, int mode) {
/* preround the result (tmp_value will always be something * 1e14,
thus never larger than 1e15 here) */
tmp_value = php_round_helper(tmp_value, mode);
use_precision = places - precision_places;
use_precision = use_precision < INT_MIN+1 ? INT_MIN+1 : use_precision;
/* now correctly move the decimal point */
f2 = php_intpow10(abs(places - precision_places));
f2 = php_intpow10(abs((int)use_precision));
/* because places < precision_places */
tmp_value = tmp_value / f2;
} else {

View File

@ -5,7 +5,7 @@ marcosptf - <marcosptf@yahoo.com.br> - #phparty7 - @phpsp - novatec/2015 - sao p
--SKIPIF--
<?php
if (phpversion() < "5.3.0") { die('SKIP php version so lower.'); }
if (!extension_loaded('openssl')) { die('ext/openssl required'); }
if (!extension_loaded('openssl')) { die('skip ext/openssl required'); }
if(substr(PHP_OS, 0, 3) == 'WIN' ) {
die('skip not for windows');
}
@ -18,8 +18,8 @@ $sock = stream_socket_server($serverUri, $errno, $errstr);
if (is_resource($sock)) {
var_dump(stream_socket_enable_crypto($sock, false));
var_dump(stream_socket_enable_crypto($sock, true));
var_dump(stream_socket_enable_crypto($sock, true, STREAM_CRYPTO_METHOD_SSLv2_CLIENT));
var_dump(stream_socket_enable_crypto($sock, true, STREAM_CRYPTO_METHOD_SSLv3_CLIENT));
var_dump(stream_socket_enable_crypto($sock, true, STREAM_CRYPTO_METHOD_SSLv2_CLIENT));
var_dump(stream_socket_enable_crypto($sock, true, STREAM_CRYPTO_METHOD_SSLv23_CLIENT));
var_dump(stream_socket_enable_crypto($sock, true, STREAM_CRYPTO_METHOD_TLS_CLIENT));
var_dump(stream_socket_enable_crypto($sock, true, STREAM_CRYPTO_METHOD_SSLv2_SERVER));
@ -43,9 +43,6 @@ bool(false)
Warning: stream_socket_enable_crypto(): When enabling encryption you must specify the crypto type in %s on line %d
bool(false)
Warning: stream_socket_enable_crypto(): SSLv2 %s in %s on line %d
bool(false)
Warning: stream_socket_enable_crypto(): SSL: Broken pipe in %s on line %d
bool(false)
@ -66,3 +63,6 @@ bool(false)
Warning: stream_socket_enable_crypto(): SSL/TLS already set-up for this stream in %s on line %d
bool(false)
Warning: stream_socket_enable_crypto(): SSL/TLS already set-up for this stream in %s on line %d
bool(false)