Skip to content

Commit fd1f3d6

Browse files
committed
Merge branch 'master' into jit-dynasm
2 parents b2e10ea + 4d1ddeb commit fd1f3d6

36 files changed

+959
-193
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ addons:
1616
- libsasl2-dev
1717
- libxpm-dev
1818
- libt1-dev
19+
- libzip-dev
1920

2021
notifications:
2122
email:

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ PHP NEWS
4343
. Fixed bug #74631 (PDO_PCO with PHP-FPM: OCI environment initialized
4444
before PHP-FPM sets it up). (Ingmar Runge)
4545

46+
- PDO SQLite
47+
. Add support for additional open flags
48+
4649
- phar:
4750
. Fixed bug #74991 (include_path has a 4096 char limit in some cases).
4851
(bwbroersma)

UPGRADING

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@ Date:
7373
. Support for ODBCRouter has been removed.
7474
. Support for Birdstep has been removed.
7575

76+
ZIP:
77+
. Bunled libzip have been dropped,
78+
system library is now required.
79+
7680
========================================
7781
10. New Global Constants
7882
========================================

Zend/zend_builtin_functions.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1176,7 +1176,7 @@ ZEND_FUNCTION(get_object_vars)
11761176
*/
11771177
zend_hash_str_add_new(Z_ARRVAL_P(return_value), prop_name, prop_len, value);
11781178
} else {
1179-
zend_symbtable_add_new(Z_ARRVAL_P(return_value), key, value);
1179+
zend_symtable_add_new(Z_ARRVAL_P(return_value), key, value);
11801180
}
11811181
} ZEND_HASH_FOREACH_END();
11821182
}

Zend/zend_hash.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ static zend_always_inline int zend_hash_str_exists_ind(const HashTable *ht, cons
346346
Z_TYPE_P(Z_INDIRECT_P(zv)) != IS_UNDEF);
347347
}
348348

349-
static zend_always_inline zval *zend_symbtable_add_new(HashTable *ht, zend_string *key, zval *pData)
349+
static zend_always_inline zval *zend_symtable_add_new(HashTable *ht, zend_string *key, zval *pData)
350350
{
351351
zend_ulong idx;
352352

ext/bcmath/libbcmath/src/divmod.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ bc_divmod (bc_num num1, bc_num num2, bc_num *quot, bc_num *rem, int scale)
5959
bc_init_num(&temp);
6060

6161
/* Calculate it. */
62-
bc_divide (num1, num2, &temp, scale);
62+
bc_divide (num1, num2, &temp, 0);
6363
if (quot)
6464
quotient = bc_copy_num (temp);
6565
bc_multiply (temp, num2, &temp, rscale);

ext/bcmath/libbcmath/src/raisemod.c

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -75,17 +75,24 @@ bc_raisemod (bc_num base, bc_num expo, bc_num mod, bc_num *result, int scale)
7575

7676
/* Do the calculation. */
7777
rscale = MAX(scale, base->n_scale);
78-
while ( !bc_is_zero(exponent) )
78+
if ( !bc_compare(mod, BCG(_one_)) )
7979
{
80-
(void) bc_divmod (exponent, BCG(_two_), &exponent, &parity, 0);
81-
if ( !bc_is_zero(parity) )
80+
temp = bc_new_num (1, scale);
81+
}
82+
else
83+
{
84+
while ( !bc_is_zero(exponent) )
8285
{
83-
bc_multiply (temp, power, &temp, rscale);
84-
(void) bc_modulo (temp, mod, &temp, scale);
86+
(void) bc_divmod (exponent, BCG(_two_), &exponent, &parity, 0);
87+
if ( !bc_is_zero(parity) )
88+
{
89+
bc_multiply (temp, power, &temp, rscale);
90+
(void) bc_modulo (temp, mod, &temp, scale);
91+
}
92+
93+
bc_multiply (power, power, &power, rscale);
94+
(void) bc_modulo (power, mod, &power, scale);
8595
}
86-
87-
bc_multiply (power, power, &power, rscale);
88-
(void) bc_modulo (power, mod, &power, scale);
8996
}
9097

9198
/* Assign the value. */

ext/bcmath/tests/bug44995.phpt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
--TEST--
2+
Bug #44995 (bcpowmod() fails if scale != 0)
3+
--SKIPIF--
4+
<?php
5+
if (!extension_loaded('bcmath')) die('skip bcmath extension not available');
6+
?>
7+
--FILE--
8+
<?php
9+
var_dump(bcpowmod('4', '4', '3', 1));
10+
var_dump(bcpowmod('3234', '32345', '22345', 1));
11+
?>
12+
===DONE===
13+
--EXPECT--
14+
string(3) "1.0"
15+
string(7) "17334.0"
16+
===DONE===

ext/bcmath/tests/bug54598.phpt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
--TEST--
2+
Bug #54598 (bcpowmod() may return 1 if modulus is 1)
3+
--SKIPIF--
4+
<?php
5+
if (!extension_loaded('bcmath')) die('skip bcmath extension is not available');
6+
?>
7+
--FILE--
8+
<?php
9+
var_dump(bcpowmod(5, 0, 1));
10+
var_dump(bcpowmod(5, 0, 1, 3));
11+
?>
12+
===DONE===
13+
--EXPECT--
14+
string(1) "0"
15+
string(5) "0.000"
16+
===DONE===
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
--TEST--
2+
curl_multi_close return false when suplied resorce not valid cURL multi handle
3+
--SKIPIF--
4+
<?php
5+
if (!extension_loaded('curl')) print 'skip';
6+
?>
7+
--FILE--
8+
<?php
9+
$cmh = curl_multi_init();
10+
var_dump($cmh);
11+
$multi_close_result = curl_multi_close($cmh);
12+
var_dump($multi_close_result);
13+
var_dump($cmh);
14+
$bad_mh_close_result = curl_multi_close($cmh);
15+
var_dump($bad_mh_close_result);
16+
?>
17+
===DONE===
18+
--EXPECTF--
19+
resource(%d) of type (curl_multi)
20+
NULL
21+
resource(%d) of type (Unknown)
22+
23+
Warning: curl_multi_close(): supplied resource is not a valid cURL Multi Handle resource in %s on line %d
24+
bool(false)
25+
===DONE===

0 commit comments

Comments
 (0)