Skip to content

Commit b004a04

Browse files
committed
Merge branch 'PHP-5.3' of git.php.net:/php-src into PHP-5.3
2 parents 78354f3 + 64c09f6 commit b004a04

File tree

97 files changed

+1060
-426
lines changed

Some content is hidden

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

97 files changed

+1060
-426
lines changed

CODING_STANDARDS

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
PHP Coding Standards
33
========================
44

5-
This file lists several standards that any programmer, adding or changing
6-
code in PHP, should follow. Since this file was added at a very late
5+
This file lists several standards that any programmer adding or changing
6+
code in PHP should follow. Since this file was added at a very late
77
stage of the development of PHP v3.0, the code base does not (yet) fully
88
follow it, but it's going in that general direction. Since we are now
9-
well into the version 4 releases, many sections have been recoded to use
9+
well into version 5 releases, many sections have been recoded to use
1010
these rules.
1111

1212
Code Implementation

NEWS

Lines changed: 69 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,63 @@
11
PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3-
?? ??? 2012, PHP 5.3.16
3+
?? ??? 2012, PHP 5.3.19
4+
5+
?? ??? 2012, PHP 5.3.18
6+
7+
(NOTE: Add your entries above for 5.3.19, entries for 5.3.18 should only
8+
be added after merge by RM)
49

510
- Core:
11+
. Fixed bug #63111 (is_callable() lies for abstract static method). (Dmitry)
12+
. Fixed bug #63093 (Segfault while load extension failed in zts-build).
13+
(Laruence)
14+
. Fixed bug #62976 (Notice: could not be converted to int when comparing
15+
some builtin classes). (Laruence)
16+
. Fixed bug #61767 (Shutdown functions not called in certain error
17+
situation). (Dmitry)
18+
. Fixed bug #61442 (exception threw in __autoload can not be catched).
19+
(Laruence)
20+
. Fixed bug #60909 (custom error handler throwing Exception + fatal error
21+
= no shutdown function). (Dmitry)
22+
23+
- cURL:
24+
. Fixed bug #62085 (file_get_contents a remote file by Curl wrapper will
25+
cause cpu Soaring). (Pierrick)
26+
27+
- FPM:
28+
. Fixed bug #62954 (startup problems fpm / php-fpm). (fat)
29+
. Fixed bug #62886 (PHP-FPM may segfault/hang on startup). (fat)
30+
. Fixed bug #63085 (Systemd integration and daemonize). (remi, fat)
31+
. Fixed bug #62947 (Unneccesary warnings on FPM). (fat)
32+
. Fixed bug #62887 (Only /status?plain&full gives "last request cpu"). (fat)
33+
. Fixed bug #62216 (Add PID to php-fpm init.d script). (fat)
34+
35+
- Intl:
36+
. Fix bug #62915 (defective cloning in several intl classes). (Gustavo)
37+
38+
- SOAP
39+
. Fixed bug #50997 (SOAP Error when trying to submit 2nd Element of a choice).
40+
(Dmitry)
41+
42+
- SPL:
43+
. Bug #62987 (Assigning to ArrayObject[null][something] overrides all
44+
undefined variables). (Laruence)
45+
46+
13 Sep 2012, PHP 5.3.17
47+
48+
- Core:
49+
. Fixed bug (segfault while build with zts and GOTO vm-kind). (Laruence)
50+
. Fixed bug #62955 (Only one directive is loaded from "Per Directory Values"
51+
Windows registry). (aserbulov at parallels dot com)
652
. Fixed bug #62763 (register_shutdown_function and extending class).
753
(Laruence)
854
. Fixed bug #62744 (dangling pointers made by zend_disable_class). (Laruence)
955
. Fixed bug #62716 (munmap() is called with the incorrect length).
1056
1157
. Fixed bug ##62460 (php binaries installed as binary.dSYM). (Reeze Xia)
12-
. Fixed bug #60194 (--with-zend-multibyte and --enable-debug reports LEAK
13-
with run-test.php). (Laruence)
1458

1559
- CURL:
1660
. Fixed bug #62839 (curl_copy_handle segfault with CURLOPT_FILE). (Pierrick)
17-
. Fixed bug #62499 (curl_setopt($ch, CURLOPT_COOKIEFILE, "") returns false).
18-
([email protected], Laruence)
19-
20-
- DateTime:
21-
. Fixed bug #62852 (Unserialize invalid DateTime causes crash).
22-
23-
. Fixed bug #62500 (Segfault in DateInterval class when extended). (Laruence)
2461

2562
- Intl:
2663
. Fix null pointer dereferences in some classes of ext/intl. (Gustavo)
@@ -31,23 +68,39 @@ PHP NEWS
3168
- PDO:
3269
. Fixed bug #62685 (Wrong return datatype in PDO::inTransaction()). (Laruence)
3370

34-
- Reflection:
35-
. Fixed bug #62715 (ReflectionParameter::isDefaultValueAvailable() wrong
36-
result). (Laruence)
37-
3871
- Session:
3972
. Fixed bug (segfault due to retval is not initialized). (Laruence)
4073

4174
- SPL:
4275
. Fixed bug #62904 (Crash when cloning an object which inherits SplFixedArray)
4376
(Laruence)
44-
. Fixed bug #62616 (ArrayIterator::count() from IteratorIterator instance
45-
gives Segmentation fault). (Laruence, Gustavo)
4677

4778
- Enchant:
4879
. Fixed bug #62838 (enchant_dict_quick_check() destroys zval, but fails to
4980
initialize it). (Tony, Mateusz Goik).
5081

82+
16 Aug 2012, PHP 5.3.16
83+
84+
- Core:
85+
. Fixed bug #60194 (--with-zend-multibyte and --enable-debug reports LEAK
86+
with run-test.php). (Laruence)
87+
88+
- CURL:
89+
. Fixed bug #62499 (curl_setopt($ch, CURLOPT_COOKIEFILE, "") returns false).
90+
([email protected], Laruence)
91+
92+
- DateTime:
93+
. Fixed Bug #62500 (Segfault in DateInterval class when extended). (Laruence)
94+
95+
- Reflection:
96+
. Fixed bug #62715 (ReflectionParameter::isDefaultValueAvailable() wrong
97+
result). (Laruence)
98+
99+
- SPL:
100+
. Fixed bug #62616 (ArrayIterator::count() from IteratorIterator instance
101+
gives Segmentation fault). (Laruence, Gustavo)
102+
103+
51104
19 Jul 2012, PHP 5.3.15
52105

53106
- Zend Engine:

README.RELEASE_PROCESS

Lines changed: 15 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -135,33 +135,34 @@ Rolling a stable release
135135

136136
2. Bump the version numbers in ``main/php_version.h``, ``configure.in`` and possibly ``NEWS``.
137137

138-
3. **Merge** all related sections in NEWS (f.e. merge the 4.4.1RC1 and 4.4.0 sections)
138+
3. **Merge** all related sections in NEWS (f.e. merge the 5.4.1RC1 and 5.4.0 sections)
139139

140140
4. Commit those changes
141141

142142
5. run the "scripts/dev/credits" script in php-src and commit the changes in the
143143
credits files in ext/standard.
144144

145-
6. tag the repository with the version f.e. "``cvs tag php_4_4_1``"
145+
6. tag the repository with the version f.e. "``git tag -s php-5.4.1``"
146146
(of course, you need to change that to the version you're rolling an RC for).
147147
When making 5.X release, you need to tag the Zend directory separately!!
148148

149149
7. Bump up the version numbers in ``main/php_version.h``, ``configure.in`` and
150150
possibly ``NEWS`` again, to the **next** version. F.e. if the release candidate
151-
was "4.4.1RC1" then the new one should be "4.4.1RC2-dev" - regardless if we get
151+
was "5.4.1RC1" then the new one should be "5.4.1RC2-dev" - regardless if we get
152152
a new RC or not. This is to make sure ``version_compare()`` can correctly work.
153153

154154
8. Commit those changes
155155

156-
9. Log in onto the snaps box and go into the correct tree (f.e. the PHP_4_4
157-
branch if you're rolling 4.4.x releases).
156+
9. Log in onto the snaps box and go into the correct tree (f.e. the PHP-5.4
157+
branch if you're rolling 5.5.x releases).
158158

159-
10. You do not have to update the tree, but of course you can with "``cvs up -dP``".
159+
10. You do not have to update the tree, but of course you can with "``git pull
160+
origin <branch>``".
160161

161-
11. run: ``./makedist php 4.4.1``, this will export the tree, create configure
162+
11. run: ``./makedist php 5.4.1``, this will export the tree, create configure
162163
and build two tarballs (one gz and one bz2).
163164

164-
12. Commit those two tarballs to CVS (phpweb/distributions)
165+
12. Commit those two tarballs to Git (php-distributions.git)
165166

166167
13. Once the release has been tagged, contact the PHP Windows development team
167168
([email protected]) so that Windows binaries can be created. Once
@@ -179,6 +180,9 @@ Getting the stable release announced
179180

180181
a. ``php bin/bumpRelease 5`` (or ``php bin/bumpRelease 4`` for PHP4)
181182

183+
b. In case multiple PHP minor versions are in active development you have
184+
to manually copy the old information to include/releases.inc
185+
182186
2. Edit ``phpweb/include/version.inc`` and change (X=major release number):
183187

184188
a. ``$PHP_X_VERSION`` to the correct version
@@ -195,7 +199,7 @@ Getting the stable release announced
195199
f. if the windows builds aren't ready yet prefix the "windows" key with a dot (".windows")
196200

197201
3. Update the ChangeLog file for the given major version
198-
f.e. ``ChangeLog-4.php`` from the NEWS file
202+
f.e. ``ChangeLog-5.php`` from the NEWS file
199203

200204
a. go over the list and put every element on one line
201205

@@ -215,9 +219,9 @@ f.e. ``ChangeLog-4.php`` from the NEWS file
215219

216220
V. ``s/FR #\([0-9]\+\)/FR <?php bugl(\1); ?>/``
217221

218-
4. ``cp releases/4_4_0.php releases/4_4_1.php``
222+
4. ``cp releases/5_4_0.php releases/5_4_1.php``
219223

220-
5. ``cvs add releases/4_4_1.php``
224+
5. ``git add releases/5_4_1.php``
221225

222226
6. Update the ``releases/*.php`` file with relevant data. The release
223227
announcement file should list in detail:
@@ -240,17 +244,6 @@ to upgrade.
240244
[email protected] and [email protected] with a text similar to
241245
http://news.php.net/php.internals/17222.
242246

243-
10. Update ``php-bugs-web/include/functions.php`` to include the new version
244-
number, and remove the RC from there.
245-
246-
11. Update ``qaweb/include/release-qa.php``
247-
248-
- Update $QA_RELEASES with the appropriate information, which means bumping
249-
the version number to an upcoming version.
250-
251-
Example: If PHP 5.3.7 is being released, then PHP 5.3.8 is the next QA version,
252-
so replace 5.3.7 with 5.3.8 within $QA_RELEASES.
253-
254247
Re-releasing the same version (or -pl)
255248
--------------------------------------
256249

Zend/tests/bug51394.phpt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,10 @@ function eh()
1313
set_error_handler("eh");
1414
$a = $empty($b);
1515
--EXPECTF--
16+
Warning: Uncaught exception 'Exception' with message 'error!' in %sbug51394.php:4
17+
Stack trace:
18+
#0 %sbug51394.php(9): eh(8, 'Undefined varia...', '%s', 9, Array)
19+
#1 {main}
20+
thrown in %sbug51394.php on line 4
21+
1622
Fatal error: Function name must be a string in %sbug51394.php on line 9

Zend/tests/bug60909_1.phpt

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
--TEST--
2+
Bug #60909 (custom error handler throwing Exception + fatal error = no shutdown function).
3+
--FILE--
4+
<?php
5+
register_shutdown_function(function(){echo("\n\n!!!shutdown!!!\n\n");});
6+
set_error_handler(function($errno, $errstr, $errfile, $errline){
7+
echo "error($errstr)";
8+
throw new Exception("Foo");
9+
});
10+
11+
require 'notfound.php';
12+
--EXPECTF--
13+
error(require(notfound.php): failed to open stream: No such file or directory)
14+
Warning: Uncaught exception 'Exception' with message 'Foo' in %sbug60909_1.php:5
15+
Stack trace:
16+
#0 %sbug60909_1.php(8): {closure}(2, 'require(notfoun...', '%s', 8, Array)
17+
#1 %sbug60909_1.php(8): require()
18+
#2 {main}
19+
thrown in %sbug60909_1.php on line 5
20+
21+
Fatal error: main(): Failed opening required 'notfound.php' (include_path='%s') in %sbug60909_1.php on line 8
22+
23+
24+
!!!shutdown!!!

Zend/tests/bug60909_2.phpt

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
--TEST--
2+
Bug #60909 (custom error handler throwing Exception + fatal error = no shutdown function).
3+
--FILE--
4+
<?php
5+
register_shutdown_function(function(){echo("\n\n!!!shutdown!!!\n\n");});
6+
set_error_handler(function($errno, $errstr, $errfile, $errline){throw new Exception("Foo");});
7+
8+
class Bad {
9+
public function __toString() {
10+
throw new Exception('Oops, I cannot do this');
11+
}
12+
}
13+
14+
$bad = new Bad();
15+
echo "$bad";
16+
--EXPECTF--
17+
Fatal error: Method Bad::__toString() must not throw an exception in %sbug60909_2.php on line 0
18+
19+
20+
!!!shutdown!!!

Zend/tests/bug61442.phpt

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
--TEST--
2+
Bug #61442 (exception threw in __autoload can not be catched)
3+
--FILE--
4+
<?php
5+
function __autoload($name) {
6+
throw new Exception("Unable to load $name");
7+
}
8+
9+
try {
10+
$obj = new NonLoadableClass();
11+
} catch (Exception $e) {
12+
var_dump($e->getMessage());
13+
}
14+
15+
try {
16+
$obj = NonLoadableClass::a();
17+
} catch (Exception $e) {
18+
var_dump($e->getMessage());
19+
}
20+
21+
try {
22+
$obj = NonLoadableClass::UNDEFINED_CONST;
23+
} catch (Exception $e) {
24+
var_dump($e->getMessage());
25+
}
26+
27+
--EXPECTF--
28+
string(31) "Unable to load NonLoadableClass"
29+
string(31) "Unable to load NonLoadableClass"
30+
string(31) "Unable to load NonLoadableClass"

Zend/tests/bug61767.phpt

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
--TEST--
2+
Bug #61767 (Shutdown functions not called in certain error situation)
3+
--FILE--
4+
<?php
5+
set_error_handler(function($code, $msg, $file = null, $line = null) {
6+
echo "Error handler called ($msg)\n";
7+
throw new \ErrorException($msg, $code, 0, $file, $line);
8+
});
9+
10+
register_shutdown_function(function(){
11+
echo "Shutting down\n";
12+
print_r(error_get_last());
13+
});
14+
15+
//$undefined = null; // defined variable does not cause problems
16+
$undefined->foo();
17+
--EXPECTF--
18+
Error handler called (Undefined variable: undefined)
19+
20+
Warning: Uncaught exception 'ErrorException' with message 'Undefined variable: undefined' in %sbug61767.php:13
21+
Stack trace:
22+
#0 %sbug61767.php(13): {closure}(8, 'Undefined varia...', '%s', 13, Array)
23+
#1 {main}
24+
thrown in %sbug61767.php on line 13
25+
26+
Fatal error: Call to a member function foo() on a non-object in %sbug61767.php on line 13
27+
Shutting down
28+
Array
29+
(
30+
[type] => 1
31+
[message] => Call to a member function foo() on a non-object
32+
[file] => %sbug61767.php
33+
[line] => 13
34+
)

Zend/tests/bug63111.phpt

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
--TEST--
2+
Bug #63111 (is_callable() lies for abstract static method)
3+
--FILE--
4+
<?php
5+
abstract class Foo {
6+
abstract static function bar();
7+
}
8+
interface MyInterface {
9+
static function bar();
10+
}
11+
abstract class Bar {
12+
static function foo() {
13+
echo "ok\n";
14+
}
15+
}
16+
var_dump(is_callable(array("Foo", "bar")));
17+
var_dump(is_callable("Foo::bar"));
18+
var_dump(is_callable(array("MyInterface", "bar")));
19+
var_dump(is_callable("MyInterface::bar"));
20+
var_dump(is_callable(array("Bar", "foo")));
21+
var_dump(is_callable("Bar::foo"));
22+
Bar::foo();
23+
Foo::bar();
24+
?>
25+
--EXPECTF--
26+
Strict Standards: Static function Foo::bar() should not be abstract in %sbug63111.php on line 3
27+
bool(false)
28+
bool(false)
29+
bool(false)
30+
bool(false)
31+
bool(true)
32+
bool(true)
33+
ok
34+
35+
Fatal error: Cannot call abstract method Foo::bar() in %sbug63111.php on line 20
36+

0 commit comments

Comments
 (0)