Skip to content

Commit 54a595a

Browse files
committed
Merge branch 'master' of git.php.net:/php-src
2 parents 606a97f + 73c44d6 commit 54a595a

File tree

91 files changed

+4552
-399
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+4552
-399
lines changed

CODING_STANDARDS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ Naming Conventions
151151

152152
7. Classes should be given descriptive names. Avoid using abbreviations where
153153
possible. Each word in the class name should start with a capital letter,
154-
without underscore delimiters (CampelCaps starting with a capital letter).
154+
without underscore delimiters (CamelCaps starting with a capital letter).
155155
The class name should be prefixed with the name of the 'parent set' (e.g.
156156
the name of the extension)::
157157

NEWS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ PHP NEWS
4040
cache_slots) in op_array->literals table. (Laruence, Dmitry)
4141
. Added script level constant replacement optimization pass. (Dmitry)
4242

43+
- Openssl:
44+
. Added crypto_method option for the ssl stream context. (Martin Jansen)
45+
. Added certificate fingerprint support. (Tjerk Meesters)
46+
. Fixed bug #65729 (CN_match gives false positive). (Tjerk Meesters)
47+
4348
- PDO_pgsql:
4449
. Fixed Bug #42614 (PDO_pgsql: add pg_get_notify support). (Matteo)
4550
. Fixed Bug #63657 (pgsqlCopyFromFile, pgsqlCopyToArray use Postgres < 7.3

UPGRADING

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ PHP X.Y UPGRADE NOTES
4242

4343
- Added gost-crypto (CryptoPro S-box) hash algo.
4444

45+
- Added openssl certificate fingerprint support (inclusive stream context
46+
option).
47+
48+
- Added openssl crypto method stream context option.
49+
4550
========================================
4651
2. Changes in SAPI modules
4752
========================================
@@ -71,6 +76,8 @@ PHP X.Y UPGRADE NOTES
7176
5. New Functions
7277
========================================
7378

79+
- Openssl:
80+
Added string openssl_x509_fingerprint($x509, $type, $binary).
7481

7582
========================================
7683
6. New Classes and Interfaces

build/shtool

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1003,7 +1003,14 @@ mkdir )
10031003
if [ ".$opt_t" = .yes ]; then
10041004
echo "mkdir $pathcomp" 1>&2
10051005
fi
1006-
mkdir $pathcomp || errstatus=$?
1006+
# See https://bugs.php.net/51076
1007+
# The fix is from Debian who have sent it
1008+
# upstream, too; but upstream seems dead.
1009+
mkdir $pathcomp || {
1010+
_errstatus=$?
1011+
[ -d "$pathcomp" ] || errstatus=${_errstatus}
1012+
unset _errstatus
1013+
}
10071014
if [ ".$opt_o" != . ]; then
10081015
if [ ".$opt_t" = .yes ]; then
10091016
echo "chown $opt_o $pathcomp" 1>&2

ext/intl/tests/bug58756_MessageFormatter.phpt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ Bug #58756: w.r.t MessageFormatter
44
<?php
55
if (!extension_loaded('intl'))
66
die('skip intl extension not enabled');
7+
if (version_compare(INTL_ICU_VERSION, '51.2') >= 0)
8+
die('skip for ICU < 51.2');
9+
?>
710
--FILE--
811
<?php
912
ini_set("intl.error_level", E_WARNING);
@@ -31,4 +34,4 @@ echo "msgf2: ", $msgf->format(array($time, 'date')), " ",
3134
--EXPECT--
3235
date: Tuesday, July 7, 2009 8:41:13 PM EDT
3336
msgf: Tuesday, July 7, 2009 8:41:13 PM EDT
34-
==DONE==
37+
==DONE==
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
--TEST--
2+
Bug #58756: w.r.t MessageFormatter
3+
--SKIPIF--
4+
<?php
5+
if (!extension_loaded('intl'))
6+
die('skip intl extension not enabled');
7+
if (version_compare(INTL_ICU_VERSION, '51.2') < 0)
8+
die('skip for ICU >= 51.2');
9+
?>
10+
--FILE--
11+
<?php
12+
ini_set("intl.error_level", E_WARNING);
13+
//ini_set("intl.default_locale", "nl");
14+
15+
$time = 1247013673;
16+
17+
ini_set('date.timezone', 'America/New_York');
18+
19+
$msgf = new MessageFormatter('en_US', '{0,date,full} {0,time,h:m:s a V}');
20+
21+
echo "date: " . date('l, F j, Y g:i:s A T', $time) . "\n";
22+
echo "msgf: " . $msgf->format(array($time)) . "\n";
23+
24+
//NOT FIXED:
25+
/*$msgf = new MessageFormatter('en_US',
26+
'{1, select, date {{0,date,full}} other {{0,time,h:m:s a V}}}');
27+
28+
echo "msgf2: ", $msgf->format(array($time, 'date')), " ",
29+
$msgf->format(array($time, 'time')), "\n";
30+
*/
31+
32+
?>
33+
==DONE==
34+
--EXPECT--
35+
date: Tuesday, July 7, 2009 8:41:13 PM EDT
36+
msgf: Tuesday, July 7, 2009 8:41:13 PM usnyc
37+
==DONE==

ext/intl/tests/collator_asort.phpt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
asort()
33
--SKIPIF--
44
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
5+
<?php if (version_compare(INTL_ICU_VERSION, '51.2') >= 0) die('skip for ICU < 51.2'); ?>
56
--FILE--
67
<?php
78

Lines changed: 243 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,243 @@
1+
--TEST--
2+
asort()
3+
--SKIPIF--
4+
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
5+
<?php if (version_compare(INTL_ICU_VERSION, '51.2') < 0) die('skip for ICU >= 51.2'); ?>
6+
--FILE--
7+
<?php
8+
9+
/*
10+
* Sort associative arrays using various locales.
11+
*/
12+
13+
14+
$test_num = 1;
15+
16+
/*
17+
* Sort various arrays in specified locale.
18+
*/
19+
function sort_arrays( $locale, $test_arrays, $sort_flag = Collator::SORT_REGULAR )
20+
{
21+
$res_str = '';
22+
23+
$coll = ut_coll_create( $locale );
24+
25+
foreach( $test_arrays as $test_array )
26+
{
27+
// Try to sort test data.
28+
$res_val = ut_coll_asort( $coll, $test_array, $sort_flag );
29+
30+
// Return output data.
31+
$res_dump = "\n" . dump( $test_array ) .
32+
"\n Result: " . dump( $res_val );
33+
34+
// Preppend test signature to output string
35+
$md5 = md5( $res_dump );
36+
37+
global $test_num;
38+
39+
$res_str .= "\n\n".
40+
"Test $test_num.$md5:" .
41+
$res_dump;
42+
++$test_num;
43+
}
44+
45+
return $res_str;
46+
}
47+
48+
/*
49+
* Test main function.
50+
*/
51+
function ut_main()
52+
{
53+
global $test_num;
54+
$test_num = 1;
55+
$res_str = '';
56+
57+
// Sort an array in SORT_REGULAR mode using en_US locale.
58+
$test_params = array(
59+
array( 'd' => 'y' ,
60+
'c' => 'i' ,
61+
'a' => 'k' ),
62+
63+
array( 'a' => 'a' ,
64+
'b' => 'aaa',
65+
'c' => 'aa' ),
66+
67+
array( 'a' => 'a' ,
68+
'aaa'=> 'a' ,
69+
'aa' => 'a' ),
70+
71+
array( '1' => 'abc',
72+
'5' => '!' ,
73+
'2' => null ,
74+
'7' => '' ),
75+
76+
array( '1' => '100',
77+
'2' => '25' ,
78+
'3' => '36' ),
79+
80+
array( '1' => 5 ,
81+
'2' => '30' ,
82+
'3' => 2 )
83+
);
84+
85+
$res_str .= sort_arrays( 'en_US', $test_params );
86+
87+
// Sort an array in SORT_STRING mode using en_US locale.
88+
$test_params = array(
89+
array( '1' => '100',
90+
'2' => '25' ,
91+
'3' => '36' ),
92+
93+
array( '1' => 5 ,
94+
'2' => '30' ,
95+
'3' => 2 ),
96+
97+
array( '1' => 'd' ,
98+
'2' => '' ,
99+
'3' => ' a' ),
100+
101+
array( '1' => 'y' ,
102+
'2' => 'k' ,
103+
'3' => 'i' )
104+
);
105+
106+
$res_str .= sort_arrays( 'en_US', $test_params, Collator::SORT_STRING );
107+
108+
// Sort a non-ASCII array using ru_RU locale.
109+
$test_params = array(
110+
array( 'п' => 'у',
111+
'б' => 'в',
112+
'е' => 'а' ),
113+
114+
array( '1' => 'п',
115+
'4' => '',
116+
'7' => 'd',
117+
'2' => 'пп' )
118+
);
119+
120+
$res_str .= sort_arrays( 'ru_RU', $test_params );
121+
122+
123+
// Sort an array using Lithuanian locale.
124+
$test_params = array(
125+
array( 'd' => 'y',
126+
'c' => 'i',
127+
'a' => 'k' )
128+
);
129+
130+
$res_str .= sort_arrays( 'lt_LT', $test_params );
131+
132+
return $res_str . "\n";
133+
}
134+
135+
include_once( 'ut_common.inc' );
136+
ut_run();
137+
?>
138+
--EXPECT--
139+
Test 1.162b81ac12878b817fc39063097e45b5:
140+
array (
141+
'c' => 'i',
142+
'a' => 'k',
143+
'd' => 'y',
144+
)
145+
Result: true
146+
147+
Test 2.93d96e22f692d8a281b0a389f01f8d1e:
148+
array (
149+
'a' => 'a',
150+
'c' => 'aa',
151+
'b' => 'aaa',
152+
)
153+
Result: true
154+
155+
Test 3.9f25de4482bc7b58de508e278113317c:
156+
array (
157+
'aa' => 'a',
158+
'aaa' => 'a',
159+
'a' => 'a',
160+
)
161+
Result: true
162+
163+
Test 4.a85a41ea78e45b651080cfd98c0b431d:
164+
array (
165+
7 => '',
166+
2 => NULL,
167+
5 => '!',
168+
1 => 'abc',
169+
)
170+
Result: true
171+
172+
Test 5.99dc71f405b286e03d489061b36e6900:
173+
array (
174+
2 => '25',
175+
3 => '36',
176+
1 => '100',
177+
)
178+
Result: true
179+
180+
Test 6.bf5bba243307c9d12934e756ad4be190:
181+
array (
182+
3 => 2,
183+
1 => 5,
184+
2 => '30',
185+
)
186+
Result: true
187+
188+
Test 7.e4ee7024c61476e9e7a6c28b5e47df6f:
189+
array (
190+
1 => '100',
191+
2 => '25',
192+
3 => '36',
193+
)
194+
Result: true
195+
196+
Test 8.5fa7033dd43784be0db1474eb48b83c8:
197+
array (
198+
3 => 2,
199+
2 => '30',
200+
1 => 5,
201+
)
202+
Result: true
203+
204+
Test 9.588cdf4692bc09aa92ffe7e48f9e4579:
205+
array (
206+
2 => '',
207+
3 => ' a',
208+
1 => 'd',
209+
)
210+
Result: true
211+
212+
Test 10.be02641a47ebcccd23e4183ca3a415f7:
213+
array (
214+
3 => 'i',
215+
2 => 'k',
216+
1 => 'y',
217+
)
218+
Result: true
219+
220+
Test 11.153d9b11d1e5936afc917a94a4e11f34:
221+
array (
222+
'е' => 'а',
223+
'б' => 'в',
224+
'п' => 'у',
225+
)
226+
Result: true
227+
228+
Test 12.e1f5cb037b564dce39ffbd0a61562d59:
229+
array (
230+
4 => '',
231+
1 => 'п',
232+
2 => 'пп',
233+
7 => 'd',
234+
)
235+
Result: true
236+
237+
Test 13.8800d48abb960a59002eef77f1d73ae0:
238+
array (
239+
'c' => 'i',
240+
'd' => 'y',
241+
'a' => 'k',
242+
)
243+
Result: true

ext/intl/tests/collator_compare.phpt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
compare()
33
--SKIPIF--
44
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
5+
<?php if (version_compare(INTL_ICU_VERSION, '51.2') >= 0) die('skip for ICU < 51.2'); ?>
56
--FILE--
67
<?php
78

0 commit comments

Comments
 (0)