Permalink
Browse files

Merge branch 'PHP-5.3' of git.php.net:/php-src into PHP-5.3

  • Loading branch information...
2 parents 78354f3 + 64c09f6 commit b004a04f0aaf041e5fabaf788eee3e9ee0f3afaf @derickr derickr committed Oct 4, 2012
Showing with 1,060 additions and 426 deletions.
  1. +3 −3 CODING_STANDARDS
  2. +69 −16 NEWS
  3. +15 −22 README.RELEASE_PROCESS
  4. +6 −0 Zend/tests/bug51394.phpt
  5. +24 −0 Zend/tests/bug60909_1.phpt
  6. +20 −0 Zend/tests/bug60909_2.phpt
  7. +30 −0 Zend/tests/bug61442.phpt
  8. +34 −0 Zend/tests/bug61767.phpt
  9. +36 −0 Zend/tests/bug63111.phpt
  10. +23 −0 Zend/zend.c
  11. +11 −2 Zend/zend_API.c
  12. +1 −0 Zend/zend_object_handlers.c
  13. +3 −0 Zend/zend_operators.c
  14. +6 −0 Zend/zend_vm_def.h
  15. +39 −0 Zend/zend_vm_execute.h
  16. +1 −1 Zend/zend_vm_execute.skl
  17. +7 −0 Zend/zend_vm_gen.php
  18. +1 −1 configure.in
  19. +3 −0 ext/curl/multi.c
  20. +4 −0 ext/curl/streams.c
  21. +1 −1 ext/curl/tests/bug62839.phpt
  22. +1 −1 ext/date/lib/astro.c
  23. +1 −1 ext/date/lib/dow.c
  24. +1 −1 ext/date/lib/interval.c
  25. +1 −1 ext/date/lib/parse_date.c
  26. +1 −1 ext/date/lib/parse_date.re
  27. +1 −1 ext/date/lib/parse_iso_intervals.c
  28. +1 −1 ext/date/lib/parse_iso_intervals.re
  29. +1 −1 ext/date/lib/parse_tz.c
  30. +1 −1 ext/date/lib/timelib.c
  31. +1 −1 ext/date/lib/timelib.h
  32. +1 −1 ext/date/lib/timelib_structs.h
  33. +1 −1 ext/date/lib/tm2unixtime.c
  34. +1 −1 ext/date/lib/unixtime2tm.c
  35. +4 −12 ext/date/php_date.c
  36. +27 −6 ext/date/tests/bug62852.phpt
  37. +1 −1 ext/dba/libcdb/cdb.c
  38. +1 −1 ext/dba/libcdb/cdb.h
  39. +1 −1 ext/dba/libcdb/cdb_make.c
  40. +1 −1 ext/dba/libcdb/cdb_make.h
  41. +1 −1 ext/dba/libcdb/uint32.c
  42. +1 −1 ext/dba/libcdb/uint32.h
  43. +1 −1 ext/dba/libflatfile/flatfile.c
  44. +1 −1 ext/dba/libflatfile/flatfile.h
  45. +1 −1 ext/dba/libinifile/inifile.c
  46. +1 −1 ext/dba/libinifile/inifile.h
  47. +1 −1 ext/gd/libgd/xbm.c
  48. +1 −1 ext/interbase/interbase.rc
  49. +1 −1 ext/intl/dateformat/dateformat_class.c
  50. +1 −1 ext/intl/formatter/formatter_class.c
  51. +1 −1 ext/intl/msgformat/msgformat_class.c
  52. +29 −0 ext/intl/tests/bug62915-2.phpt
  53. +1 −1 ext/mysqli/mysqli_libmysql.h
  54. +4 −4 ext/oci8/config.m4
  55. +22 −7 ext/oci8/package.xml
  56. +1 −1 ext/phar/tests/phpinfo_003.phpt
  57. +4 −3 ext/soap/php_encoding.c
  58. +16 −0 ext/soap/tests/bugs/bug50997.phpt
  59. +54 −0 ext/soap/tests/bugs/bug50997.wsdl
  60. +38 −32 ext/spl/spl_array.c
  61. +50 −0 ext/spl/tests/bug62978.phpt
  62. +19 −0 ext/standard/tests/general_functions/bug60723.phpt
  63. +24 −0 ext/standard/tests/serialize/bug35895.phpt
  64. +1 −1 ext/standard/url_scanner_ex.c
  65. +1 −1 ext/standard/url_scanner_ex.re
  66. +5 −3 ext/standard/var.c
  67. +24 −0 ext/zlib/tests/bug_52944-darwin.phpt
  68. +24 −0 ext/zlib/tests/bug_52944-win.phpt
  69. +27 −162 ext/zlib/tests/bug_52944.phpt
  70. +142 −0 ext/zlib/tests/bug_52944_corrupted_data.inc
  71. +9 −1 main/main.c
  72. +3 −3 main/php_version.h
  73. +1 −1 netware/start.c
  74. +1 −1 sapi/fpm/config.m4
  75. +1 −1 sapi/fpm/fpm/fastcgi.c
  76. +1 −1 sapi/fpm/fpm/fastcgi.h
  77. +3 −3 sapi/fpm/fpm/fpm.c
  78. +2 −2 sapi/fpm/fpm/fpm.h
  79. +8 −3 sapi/fpm/fpm/fpm_conf.c
  80. +1 −1 sapi/fpm/fpm/fpm_conf.h
  81. +29 −11 sapi/fpm/fpm/fpm_main.c
  82. +0 −12 sapi/fpm/fpm/fpm_signals.c
  83. +0 −3 sapi/fpm/fpm/fpm_signals.h
  84. +9 −9 sapi/fpm/fpm/fpm_status.c
  85. +52 −39 sapi/fpm/fpm/fpm_unix.c
  86. +2 −2 sapi/fpm/init.d.php-fpm.in
  87. +22 −1 sapi/fpm/php-fpm.8.in
  88. +12 −0 sapi/fpm/php-fpm.service.in
  89. +3 −3 sapi/litespeed/lsapi_main.c
  90. +1 −1 sapi/litespeed/lsapidef.h
  91. +1 −1 sapi/litespeed/lsapilib.c
  92. +1 −1 sapi/litespeed/lsapilib.h
  93. +2 −6 tests/lang/compare_objects_basic2.phpt
  94. +1 −1 win32/build/deplister.c
  95. +7 −7 win32/build/libs_version.txt
  96. +1 −1 win32/build/template.rc
  97. +5 −4 win32/registry.c
View
@@ -2,11 +2,11 @@
PHP Coding Standards
========================
-This file lists several standards that any programmer, adding or changing
-code in PHP, should follow. Since this file was added at a very late
+This file lists several standards that any programmer adding or changing
+code in PHP should follow. Since this file was added at a very late
stage of the development of PHP v3.0, the code base does not (yet) fully
follow it, but it's going in that general direction. Since we are now
-well into the version 4 releases, many sections have been recoded to use
+well into version 5 releases, many sections have been recoded to use
these rules.
Code Implementation
View
85 NEWS
@@ -1,26 +1,63 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-?? ??? 2012, PHP 5.3.16
+?? ??? 2012, PHP 5.3.19
+
+?? ??? 2012, PHP 5.3.18
+
+(NOTE: Add your entries above for 5.3.19, entries for 5.3.18 should only
+be added after merge by RM)
- Core:
+ . Fixed bug #63111 (is_callable() lies for abstract static method). (Dmitry)
+ . Fixed bug #63093 (Segfault while load extension failed in zts-build).
+ (Laruence)
+ . Fixed bug #62976 (Notice: could not be converted to int when comparing
+ some builtin classes). (Laruence)
+ . Fixed bug #61767 (Shutdown functions not called in certain error
+ situation). (Dmitry)
+ . Fixed bug #61442 (exception threw in __autoload can not be catched).
+ (Laruence)
+ . Fixed bug #60909 (custom error handler throwing Exception + fatal error
+ = no shutdown function). (Dmitry)
+
+- cURL:
+ . Fixed bug #62085 (file_get_contents a remote file by Curl wrapper will
+ cause cpu Soaring). (Pierrick)
+
+- FPM:
+ . Fixed bug #62954 (startup problems fpm / php-fpm). (fat)
+ . Fixed bug #62886 (PHP-FPM may segfault/hang on startup). (fat)
+ . Fixed bug #63085 (Systemd integration and daemonize). (remi, fat)
+ . Fixed bug #62947 (Unneccesary warnings on FPM). (fat)
+ . Fixed bug #62887 (Only /status?plain&full gives "last request cpu"). (fat)
+ . Fixed bug #62216 (Add PID to php-fpm init.d script). (fat)
+
+- Intl:
+ . Fix bug #62915 (defective cloning in several intl classes). (Gustavo)
+
+- SOAP
+ . Fixed bug #50997 (SOAP Error when trying to submit 2nd Element of a choice).
+ (Dmitry)
+
+- SPL:
+ . Bug #62987 (Assigning to ArrayObject[null][something] overrides all
+ undefined variables). (Laruence)
+
+13 Sep 2012, PHP 5.3.17
+
+- Core:
+ . Fixed bug (segfault while build with zts and GOTO vm-kind). (Laruence)
+ . Fixed bug #62955 (Only one directive is loaded from "Per Directory Values"
+ Windows registry). (aserbulov at parallels dot com)
. Fixed bug #62763 (register_shutdown_function and extending class).
(Laruence)
. Fixed bug #62744 (dangling pointers made by zend_disable_class). (Laruence)
. Fixed bug #62716 (munmap() is called with the incorrect length).
(slangley@google.com)
. Fixed bug ##62460 (php binaries installed as binary.dSYM). (Reeze Xia)
- . Fixed bug #60194 (--with-zend-multibyte and --enable-debug reports LEAK
- with run-test.php). (Laruence)
- CURL:
. Fixed bug #62839 (curl_copy_handle segfault with CURLOPT_FILE). (Pierrick)
- . Fixed bug #62499 (curl_setopt($ch, CURLOPT_COOKIEFILE, "") returns false).
- (r.hampartsumyan@gmail.com, Laruence)
-
-- DateTime:
- . Fixed bug #62852 (Unserialize invalid DateTime causes crash).
- (reeze.xia@gmail.com)
- . Fixed bug #62500 (Segfault in DateInterval class when extended). (Laruence)
- Intl:
. Fix null pointer dereferences in some classes of ext/intl. (Gustavo)
@@ -31,23 +68,39 @@ PHP NEWS
- PDO:
. Fixed bug #62685 (Wrong return datatype in PDO::inTransaction()). (Laruence)
-- Reflection:
- . Fixed bug #62715 (ReflectionParameter::isDefaultValueAvailable() wrong
- result). (Laruence)
-
- Session:
. Fixed bug (segfault due to retval is not initialized). (Laruence)
- SPL:
. Fixed bug #62904 (Crash when cloning an object which inherits SplFixedArray)
(Laruence)
- . Fixed bug #62616 (ArrayIterator::count() from IteratorIterator instance
- gives Segmentation fault). (Laruence, Gustavo)
- Enchant:
. Fixed bug #62838 (enchant_dict_quick_check() destroys zval, but fails to
initialize it). (Tony, Mateusz Goik).
+16 Aug 2012, PHP 5.3.16
+
+- Core:
+ . Fixed bug #60194 (--with-zend-multibyte and --enable-debug reports LEAK
+ with run-test.php). (Laruence)
+
+- CURL:
+ . Fixed bug #62499 (curl_setopt($ch, CURLOPT_COOKIEFILE, "") returns false).
+ (r.hampartsumyan@gmail.com, Laruence)
+
+- DateTime:
+ . Fixed Bug #62500 (Segfault in DateInterval class when extended). (Laruence)
+
+- Reflection:
+ . Fixed bug #62715 (ReflectionParameter::isDefaultValueAvailable() wrong
+ result). (Laruence)
+
+- SPL:
+ . Fixed bug #62616 (ArrayIterator::count() from IteratorIterator instance
+ gives Segmentation fault). (Laruence, Gustavo)
+
+
19 Jul 2012, PHP 5.3.15
- Zend Engine:
View
@@ -135,33 +135,34 @@ Rolling a stable release
2. Bump the version numbers in ``main/php_version.h``, ``configure.in`` and possibly ``NEWS``.
-3. **Merge** all related sections in NEWS (f.e. merge the 4.4.1RC1 and 4.4.0 sections)
+3. **Merge** all related sections in NEWS (f.e. merge the 5.4.1RC1 and 5.4.0 sections)
4. Commit those changes
5. run the "scripts/dev/credits" script in php-src and commit the changes in the
credits files in ext/standard.
-6. tag the repository with the version f.e. "``cvs tag php_4_4_1``"
+6. tag the repository with the version f.e. "``git tag -s php-5.4.1``"
(of course, you need to change that to the version you're rolling an RC for).
When making 5.X release, you need to tag the Zend directory separately!!
7. Bump up the version numbers in ``main/php_version.h``, ``configure.in`` and
possibly ``NEWS`` again, to the **next** version. F.e. if the release candidate
-was "4.4.1RC1" then the new one should be "4.4.1RC2-dev" - regardless if we get
+was "5.4.1RC1" then the new one should be "5.4.1RC2-dev" - regardless if we get
a new RC or not. This is to make sure ``version_compare()`` can correctly work.
8. Commit those changes
-9. Log in onto the snaps box and go into the correct tree (f.e. the PHP_4_4
-branch if you're rolling 4.4.x releases).
+9. Log in onto the snaps box and go into the correct tree (f.e. the PHP-5.4
+branch if you're rolling 5.5.x releases).
-10. You do not have to update the tree, but of course you can with "``cvs up -dP``".
+10. You do not have to update the tree, but of course you can with "``git pull
+origin <branch>``".
-11. run: ``./makedist php 4.4.1``, this will export the tree, create configure
+11. run: ``./makedist php 5.4.1``, this will export the tree, create configure
and build two tarballs (one gz and one bz2).
-12. Commit those two tarballs to CVS (phpweb/distributions)
+12. Commit those two tarballs to Git (php-distributions.git)
13. Once the release has been tagged, contact the PHP Windows development team
(internals-win@lists.php.net) so that Windows binaries can be created. Once
@@ -179,6 +180,9 @@ Getting the stable release announced
a. ``php bin/bumpRelease 5`` (or ``php bin/bumpRelease 4`` for PHP4)
+ b. In case multiple PHP minor versions are in active development you have
+ to manually copy the old information to include/releases.inc
+
2. Edit ``phpweb/include/version.inc`` and change (X=major release number):
a. ``$PHP_X_VERSION`` to the correct version
@@ -195,7 +199,7 @@ Getting the stable release announced
f. if the windows builds aren't ready yet prefix the "windows" key with a dot (".windows")
3. Update the ChangeLog file for the given major version
-f.e. ``ChangeLog-4.php`` from the NEWS file
+f.e. ``ChangeLog-5.php`` from the NEWS file
a. go over the list and put every element on one line
@@ -215,9 +219,9 @@ f.e. ``ChangeLog-4.php`` from the NEWS file
V. ``s/FR #\([0-9]\+\)/FR <?php bugl(\1); ?>/``
-4. ``cp releases/4_4_0.php releases/4_4_1.php``
+4. ``cp releases/5_4_0.php releases/5_4_1.php``
-5. ``cvs add releases/4_4_1.php``
+5. ``git add releases/5_4_1.php``
6. Update the ``releases/*.php`` file with relevant data. The release
announcement file should list in detail:
@@ -240,17 +244,6 @@ to upgrade.
php-general@lists.php.net and internals@lists.php.net with a text similar to
http://news.php.net/php.internals/17222.
-10. Update ``php-bugs-web/include/functions.php`` to include the new version
-number, and remove the RC from there.
-
-11. Update ``qaweb/include/release-qa.php``
-
- - Update $QA_RELEASES with the appropriate information, which means bumping
- the version number to an upcoming version.
-
- Example: If PHP 5.3.7 is being released, then PHP 5.3.8 is the next QA version,
- so replace 5.3.7 with 5.3.8 within $QA_RELEASES.
-
Re-releasing the same version (or -pl)
--------------------------------------
View
@@ -13,4 +13,10 @@ function eh()
set_error_handler("eh");
$a = $empty($b);
--EXPECTF--
+Warning: Uncaught exception 'Exception' with message 'error!' in %sbug51394.php:4
+Stack trace:
+#0 %sbug51394.php(9): eh(8, 'Undefined varia...', '%s', 9, Array)
+#1 {main}
+ thrown in %sbug51394.php on line 4
+
Fatal error: Function name must be a string in %sbug51394.php on line 9
View
@@ -0,0 +1,24 @@
+--TEST--
+Bug #60909 (custom error handler throwing Exception + fatal error = no shutdown function).
+--FILE--
+<?php
+register_shutdown_function(function(){echo("\n\n!!!shutdown!!!\n\n");});
+set_error_handler(function($errno, $errstr, $errfile, $errline){
+ echo "error($errstr)";
+ throw new Exception("Foo");
+});
+
+require 'notfound.php';
+--EXPECTF--
+error(require(notfound.php): failed to open stream: No such file or directory)
+Warning: Uncaught exception 'Exception' with message 'Foo' in %sbug60909_1.php:5
+Stack trace:
+#0 %sbug60909_1.php(8): {closure}(2, 'require(notfoun...', '%s', 8, Array)
+#1 %sbug60909_1.php(8): require()
+#2 {main}
+ thrown in %sbug60909_1.php on line 5
+
+Fatal error: main(): Failed opening required 'notfound.php' (include_path='%s') in %sbug60909_1.php on line 8
+
+
+!!!shutdown!!!
View
@@ -0,0 +1,20 @@
+--TEST--
+Bug #60909 (custom error handler throwing Exception + fatal error = no shutdown function).
+--FILE--
+<?php
+register_shutdown_function(function(){echo("\n\n!!!shutdown!!!\n\n");});
+set_error_handler(function($errno, $errstr, $errfile, $errline){throw new Exception("Foo");});
+
+class Bad {
+ public function __toString() {
+ throw new Exception('Oops, I cannot do this');
+ }
+}
+
+$bad = new Bad();
+echo "$bad";
+--EXPECTF--
+Fatal error: Method Bad::__toString() must not throw an exception in %sbug60909_2.php on line 0
+
+
+!!!shutdown!!!
View
@@ -0,0 +1,30 @@
+--TEST--
+Bug #61442 (exception threw in __autoload can not be catched)
+--FILE--
+<?php
+function __autoload($name) {
+ throw new Exception("Unable to load $name");
+}
+
+try {
+ $obj = new NonLoadableClass();
+} catch (Exception $e) {
+ var_dump($e->getMessage());
+}
+
+try {
+ $obj = NonLoadableClass::a();
+} catch (Exception $e) {
+ var_dump($e->getMessage());
+}
+
+try {
+ $obj = NonLoadableClass::UNDEFINED_CONST;
+} catch (Exception $e) {
+ var_dump($e->getMessage());
+}
+
+--EXPECTF--
+string(31) "Unable to load NonLoadableClass"
+string(31) "Unable to load NonLoadableClass"
+string(31) "Unable to load NonLoadableClass"
View
@@ -0,0 +1,34 @@
+--TEST--
+Bug #61767 (Shutdown functions not called in certain error situation)
+--FILE--
+<?php
+set_error_handler(function($code, $msg, $file = null, $line = null) {
+ echo "Error handler called ($msg)\n";
+ throw new \ErrorException($msg, $code, 0, $file, $line);
+});
+
+register_shutdown_function(function(){
+ echo "Shutting down\n";
+ print_r(error_get_last());
+});
+
+//$undefined = null; // defined variable does not cause problems
+$undefined->foo();
+--EXPECTF--
+Error handler called (Undefined variable: undefined)
+
+Warning: Uncaught exception 'ErrorException' with message 'Undefined variable: undefined' in %sbug61767.php:13
+Stack trace:
+#0 %sbug61767.php(13): {closure}(8, 'Undefined varia...', '%s', 13, Array)
+#1 {main}
+ thrown in %sbug61767.php on line 13
+
+Fatal error: Call to a member function foo() on a non-object in %sbug61767.php on line 13
+Shutting down
+Array
+(
+ [type] => 1
+ [message] => Call to a member function foo() on a non-object
+ [file] => %sbug61767.php
+ [line] => 13
+)
View
@@ -0,0 +1,36 @@
+--TEST--
+Bug #63111 (is_callable() lies for abstract static method)
+--FILE--
+<?php
+abstract class Foo {
+ abstract static function bar();
+}
+interface MyInterface {
+ static function bar();
+}
+abstract class Bar {
+ static function foo() {
+ echo "ok\n";
+ }
+}
+var_dump(is_callable(array("Foo", "bar")));
+var_dump(is_callable("Foo::bar"));
+var_dump(is_callable(array("MyInterface", "bar")));
+var_dump(is_callable("MyInterface::bar"));
+var_dump(is_callable(array("Bar", "foo")));
+var_dump(is_callable("Bar::foo"));
+Bar::foo();
+Foo::bar();
+?>
+--EXPECTF--
+Strict Standards: Static function Foo::bar() should not be abstract in %sbug63111.php on line 3
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+bool(true)
+bool(true)
+ok
+
+Fatal error: Cannot call abstract method Foo::bar() in %sbug63111.php on line 20
+
Oops, something went wrong.

0 comments on commit b004a04

Please sign in to comment.