Compare commits

...
654 Commits
Author SHA1 Message Date
Julien Pauli 4217038ddb 5.5.8 2014-01-08 11:15:20 +01:00
Derick Rethans b534e94e22 Fixed (some of) add/sub.
This worked in PHP 5.4 already, but with the introduction of DateTimeImmutable
this code was not correctly merged.
2014-01-08 10:29:06 +01:00
Julien Pauli 98c3c87bb9 Prepare for 5.5.8RC1 2013-12-24 14:12:46 +01:00
Anatol Belski 3f7a145b5a Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  removed outdated IsDebuggerPresent declaration
2013-12-23 12:00:49 +01:00
Anatol Belski f156e684ac removed outdated IsDebuggerPresent declaration
This piece of code seems to retain compatibility with some windows
versions before 2000. Today it's not relevant anymore and only
produces a warning C4273 because of the conflicting prototype. In
VC9 the declaration is present in winbase.h:4142, but available
is it already in winxp. Here's the doc link
http://msdn.microsoft.com/en-us/library/windows/desktop/ms680345(v=vs.85).aspx
2013-12-23 11:53:47 +01:00
Dmitry Stogov f7b6db7555 Added suggestion about opcache.revalidate_freq setting in development environment 2013-12-23 13:09:45 +04:00
Dmitry Stogov 0dcaf0f445 Fixed Issue #140: "opcache.enable_file_override" doesn't respect "opcache.revalidate_freq" 2013-12-23 12:46:30 +04:00
krakjoe 704866d6fd opcodes 2013-12-22 13:20:41 +00:00
krakjoe 247ec0d81f Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  stop warnings from unused opcode map
  - BFN
2013-12-22 13:07:41 +00:00
krakjoe b1df00a7c9 stop warnings from unused opcode map 2013-12-22 13:00:51 +00:00
Felipe Pena c14388d63f - BFN 2013-12-22 09:43:53 -02:00
Felipe Pena 8e36d36ee6 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  - Fixed bug #66311 (Stack smashing protection kills PDO/ODBC queries) patch by: michael at orlitzky dot com
2013-12-22 09:42:58 -02:00
Felipe Pena a056113586 - Fixed bug #66311 (Stack smashing protection kills PDO/ODBC queries) patch by: michael at orlitzky dot com 2013-12-22 09:42:45 -02:00
Bob Weinand 7e3af096b3 Merge branch 'PHP-5.4' into PHP-5.5
Conflicts:
	Zend/zend_vm_opcodes.c
2013-12-22 00:54:59 +01:00
Bob Weinand 97bf254385 Included new .c file in build too 2013-12-22 00:52:05 +01:00
Bob Weinand 00cc4dccb8 Fixed little typo in zend_vm_gen.php 2013-12-21 23:52:48 +01:00
Bob Weinand 0dd2765687 Merge branch 'PHP-5.4' into PHP-5.5
Conflicts:
	Zend/zend_vm_opcodes.h
2013-12-21 23:49:28 +01:00
Bob Weinand 61199be02f Moved to new file, killing a lot of warnings 2013-12-21 23:45:34 +01:00
Bob Weinand 560f90e511 Merge branch 'PHP-5.4' into PHP-5.5
Conflicts:
	Zend/zend_vm_gen.php
	Zend/zend_vm_opcodes.h
2013-12-21 21:31:48 +01:00
Bob Weinand 7894e397d8 Fixed build... 2013-12-21 21:29:08 +01:00
Bob Weinand b52c300eca Merge branch 'PHP-5.4' into PHP-5.5 2013-12-21 19:27:58 +01:00
Bob Weinand 50d50c2f04 Added an opcode to opcode name map
That way extensions etc. don't have to maintain their own lists anymore.
Also as phpdbg is included and needs such a map, it'd be counterproductive to need to change two things on every new opcode.
2013-12-21 19:22:47 +01:00
Boris Lytochkin e195faa18f Merge branch '5.5' into PHP-5.5
* 5.5:
  Fixed SNMP_ERR_TOOBIG handling for bulk walk operations. (Boris Lytochkin)
2013-12-20 01:01:41 +04:00
Boris Lytochkin a6fa52028f Merge branch '5.4' into PHP-5.4
* 5.4:
  keep 'em sorted
  Fixed SNMP_ERR_TOOBIG handling for bulk walk operations
2013-12-20 01:00:46 +04:00
Boris Lytochkin a7c50ccc67 keep 'em sorted 2013-12-20 00:51:59 +04:00
Boris Lytochkin 324eb07440 Fixed SNMP_ERR_TOOBIG handling for bulk walk operations. (Boris Lytochkin) 2013-12-20 00:37:29 +04:00
Boris Lytochkin b65bd30e89 Merge branch '5.4' into 5.5
* 5.4:
  Fixed SNMP_ERR_TOOBIG handling for bulk walk operations
2013-12-20 00:26:34 +04:00
Boris Lytochkin bb51d0e4c0 Fixed SNMP_ERR_TOOBIG handling for bulk walk operations 2013-12-20 00:25:16 +04:00
Derick Rethans 7a402ca51e Merge branch 'PHP-5.4' into PHP-5.5 2013-12-19 18:58:45 +00:00
Derick Rethans e881334e49 - Updated to version 2013.9 (2013i) 2013-12-19 18:58:44 +00:00
Remi Collet eda1cec694 NEWS 2013-12-19 10:56:07 +01:00
Remi Collet 32d1d5fb59 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed Bug #66321 (ZipArchive::open() ze_obj->filename_len not real)
2013-12-19 10:53:50 +01:00
Remi Collet 20eb8e4d11 Fixed Bug #66321 (ZipArchive::open() ze_obj->filename_len not real) 2013-12-19 10:53:38 +01:00
Michael Wallner 391fe528b7 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Update NEWS handling section of README.GIT-RULES
2013-12-19 10:08:06 +01:00
Michael Wallner 3624a9ca7a Update NEWS handling section of README.GIT-RULES
See http://marc.info/?t=138124004400005&r=1&w=2
2013-12-19 10:07:46 +01:00
Dmitry Stogov 16e95d9137 Fixed reavlidate_path=1 behavior to avoid caching of symlinks values. 2013-12-18 19:19:53 +04:00
Anatol Belski 5e5ecaea6e Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fixed possibly uninitialized value usage
2013-12-17 08:45:07 +01:00
Anatol Belski 2303d0ea22 fixed possibly uninitialized value usage 2013-12-17 08:44:22 +01:00
Stanislav Malyshev 57408f9c85 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix bug #65873 - Integer overflow in exif_read_data()
2013-12-16 11:36:33 -08:00
Stanislav Malyshev cbcf6e1880 Fix bug #65873 - Integer overflow in exif_read_data() 2013-12-16 11:34:24 -08:00
Dmitry Stogov a67c615799 Merge branch 'PHP-5.5' of git.php.net:php-src into PHP-5.5
* 'PHP-5.5' of git.php.net:php-src:
  Fix tests expecting specific resource IDs
  fixed parameter order for zend_throw_exception_ex call
  Fix doc (svn -> git)
  Updated release process
2013-12-16 13:13:29 +04:00
Xinchen Hui 7cf6f012b1 Merge branch 'PHP-5.5' of https://git.php.net/push/php-src into PHP-5.5 2013-12-15 16:55:11 +08:00
Eric Stenson 330168a247 Fix tests expecting specific resource IDs
When Wincache or APC are installed, the resource IDs are not the same.
This is because Wincache takes a few resource objects for itself.  As a
result, these tests become false positives.

On Windows boxes, the microtime precision is not granular enough
to reliably register a difference if two calls to uniqid() are made
concurrently.  This is a fix to the uniqid() test to avoid the false
positive when run on Windows machines.  Also, added a test to exercise
the 'more_entropy' variant of uniqid().
2013-12-15 16:51:21 +08:00
Anatol Belski 509a67d28f Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fixed parameter order for zend_throw_exception_ex call
  Fix doc (svn -> git)
2013-12-14 20:46:43 +01:00
Anatol Belski 68a73ce3c4 fixed parameter order for zend_throw_exception_ex call 2013-12-14 20:43:02 +01:00
DQNEO 1b3e2c299d Fix doc (svn -> git) 2013-12-13 23:20:37 +02:00
Julien Pauli 47a0722b9f Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Updated release process
2013-12-13 13:27:19 +01:00
Julien Pauli cbc98df99e Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Updated release process
2013-12-13 13:26:16 +01:00
Julien Pauli 3eb2b1ac40 Updated release process 2013-12-13 13:16:54 +01:00
Dmitry Stogov e6dbf0eeff Merge branch 'PHP-5.5' of git.php.net:php-src into PHP-5.5
* 'PHP-5.5' of git.php.net:php-src:
  Use zend_error_noreturn here
  Add Tests for #65784 in 5.5
  Disallowed JMP into a finally block.
  Update NEWS for 5.5.7 release
2013-12-13 11:16:17 +04:00
Xinchen Hui ef73f85079 Use zend_error_noreturn here 2013-12-13 10:56:35 +08:00
Xinchen Hui dde552f2ee Add Tests for #65784 in 5.5 2013-12-13 01:45:45 +08:00
Xinchen Hui 54213b462d Disallowed JMP into a finally block. 2013-12-13 01:44:54 +08:00
Julien Pauli 3248b3c4d8 Update NEWS for 5.5.7 release 2013-12-12 17:16:13 +01:00
Dmitry Stogov 711d8c2c7b Merge branch 'PHP-5.5' of git.php.net:php-src into PHP-5.5
* 'PHP-5.5' of git.php.net:php-src:
  fix test
2013-12-12 16:46:49 +04:00
Michael Wallner 8ee6fe9856 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fix test
2013-12-12 12:09:34 +01:00
Michael Wallner c59f3184a3 fix test 2013-12-12 12:08:50 +01:00
Dmitry Stogov 47f41385e1 Merge branch 'PHP-5.5' of git.php.net:php-src into PHP-5.5
* 'PHP-5.5' of git.php.net:php-src:
  Fixed bug #65486 mysqli_poll() is broken on Win x64
2013-12-12 14:00:03 +04:00
Dmitry Stogov 0344e6a429 Fixed tests 2013-12-12 13:35:37 +04:00
Anatol Belski da62fd5ed8 Fixed bug #65486 mysqli_poll() is broken on Win x64
While this issue is visible in mysqli_poll() functions, the cause
lays deeper in the stream to socket casting API. On Win x64 the
SOCKET datatype is a 64 or 32 bit unsigned, while on Linux/Unix-like
it's 32 bit signed integer. The game of casting 32 bit var to/from
64 bit pointer back and forth is the best way to break it.

Further more, while socket and file descriptors are always integers
on Linux, those are different things using different APIs on Windows.
Even though using integer instead of SOCKET might work on Windows, this
issue might need to be revamped more carefully later. By this time
this patch is tested well with phpt and apps and shows no regressions,
neither in mysqli_poll() nor in any other parts.
2013-12-12 10:17:01 +01:00
Dmitry Stogov 1886292ec9 Fixed ext/soap/tests/bugs/bug54911.phpt 2013-12-12 13:02:50 +04:00
Anatol Belski 6f739318fd fix dir separator in cve-2013-6420 test 2013-12-11 13:31:29 +01:00
Stanislav Malyshev 8650bbc8dc 5.3.29-dev 2013-12-10 11:32:11 -08:00
Stanislav Malyshev c1224573c7 Fix CVE-2013-6420 - memory corruption in openssl_x509_parse 2013-12-10 11:03:49 -08:00
Adam Harvey d7a45a67be Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Switch to using freetype-config for freetype detection.
2013-12-07 19:41:23 -08:00
Anatol Belski edf601a41f added missing prototype 2013-12-11 14:15:40 +01:00
Anatol Belski b6bcae5c10 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fix dir separator in cve-2013-6420 test
2013-12-11 13:33:16 +01:00
Anatol Belski ff89066b3d Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  fix dir separator in cve-2013-6420 test
2013-12-11 13:32:49 +01:00
Ard Biesheuvel bec62af141 Merge branch 'PHP-5.4' into PHP-5.5 2013-12-11 08:50:53 +01:00
Ard Biesheuvel 8f1fee61e2 Zend: fix overflow handling bug in non-x86 fast_add_function()
The 'result' argument of fast_add_function() may alias with either
of its operands (or both). Take care not to write to 'result' before
reading op1 and op2.
2013-12-11 08:50:20 +01:00
Stanislav Malyshev 41cd533298 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  5.3.29-dev
  Fix CVE-2013-6420 - memory corruption in openssl_x509_parse
2013-12-10 11:35:26 -08:00
Stanislav Malyshev b1b23abc86 Merge branch 'PHP-5.4' of git.php.net:php-src into PHP-5.4
* 'PHP-5.4' of git.php.net:php-src:
  Fixed Bug #66218 zend_register_functions breaks reflection
2013-12-10 11:34:45 -08:00
Stanislav Malyshev 71daf3229b Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  5.3.29-dev
  Fix CVE-2013-6420 - memory corruption in openssl_x509_parse

Conflicts:
	configure.in
	main/php_version.h
2013-12-10 11:34:35 -08:00
Remi Collet bc8f7761f3 NEWS 2013-12-10 16:10:02 +01:00
Remi Collet 9f4d1ee51c Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed Bug #66218 zend_register_functions breaks reflection
2013-12-10 16:09:41 +01:00
Remi Collet 3e963f8eb4 Fixed Bug #66218 zend_register_functions breaks reflection
Functions registered using zend_register_functions instead of zend_module_entry.functions are not seen on reflection.

Ex: additional_functions from api_module_entry.
Ex: in CLI, dl, cli_set_process_title and cli_get_process_title

Note:
- also affects functions overrided in extension
  (should be be reported in extension, where overrided, not in original extension)
- also allow extension to call zend_register_functions for various list
  (instead of having a single bug list)
2013-12-10 16:07:16 +01:00
Dmitry Stogov 552e8b2b4c Fixed bug #66112 (Use after free condition in SOAP extension). (martin dot koegler at brz dot gv dot at) 2013-12-10 17:57:05 +04:00
Dmitry Stogov a46f644b3a Revered func_get_args() changes, because they were not completly transparent and broke some tricky PHP code that worked because of luck before php-5.5.6 (see Bug #66107). The changes are going to be kept in PHP-5.6. 2013-12-10 16:02:59 +04:00
Dmitry Stogov a6516653b7 Arguments passed to user function have to be properly allocated on heap 2013-12-10 13:00:45 +04:00
Stanislav Malyshev 744f35d2ab Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Replace invalid code with a proper #error
2013-12-08 15:52:56 -08:00
Lior Kaplan c062c18d42 Replace invalid code with a proper #error
This code creates a nasty error as mentioned in bugs #31131, #37062
Patch taken from Debian's PHP package: 044-strtod_arm_fix
2013-12-08 15:49:22 -08:00
Adam Harvey a0955f351c Switch to using freetype-config for freetype detection.
This fixes GD compilation against libfreetype 2.5.1 and later after they made
the rather interesting decision to change their include directory layout in a
point release.

The original suggestion in the bug was to use pkg-config, but my inclination is
to use freetype-config instead: we should be able to get the same configuration
information without actually needing pkg-config installed, since pkg-config is
by no means guaranteed to exist on many Unices and distros, whereas
freetype-config should always be present if a libfreetype build environment is
installed. Let's try it out and see what happens.

Fixes bug #64405 (Use freetype-config for determining freetype2 dir(s)).
2013-12-07 19:39:40 -08:00
Michael Wallner 51f01a43a7 BFN 2013-12-06 10:39:02 +01:00
Michael Wallner a48d82d238 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed bug #61645 (fopen and O_NONBLOCK)
  fix possibly uninitialized value
2013-12-06 10:33:10 +01:00
Michael Wallner b5f5bff965 Fixed bug #61645 (fopen and O_NONBLOCK)
if a mode like "rn" was passed to fopen(), then
php_stream_parse_fopen_modes() would assign O_WRONLY to
flags, because O_NONBLOCK tainted flags for the r/w/+ check
2013-12-06 10:29:24 +01:00
Michael Wallner 098d2a5d0f fix possibly uninitialized value 2013-12-06 10:27:33 +01:00
Sara Golemon 32a4cc8353 Use 'user@example.com' rather than 'user@company.com' in tests
Using some arbitrary 3rd party's domain name is clowny,
even if it never tries to send.
2013-12-04 07:49:16 -08:00
Andrey Hristov ceb1b7e20f Merge branch 'PHP-5.4' into PHP-5.5 2013-12-04 12:07:18 +02:00
Andrey Hristov 86aad97979 Fix loss of precision 2013-12-04 12:06:59 +02:00
Sara Golemon 00a7b1ff7f Fix php_module_startup() when loading more than one additional module
Dereferencing addition_modules within php_module_startup would
point to a vector entirely on the stack (which is of course, wrong).

Use a specialized helper to keep BC with the current php_module_startup()
calling semantics.

Fixes 63159
Thanks to @a-j-k
2013-12-03 18:20:19 -08:00
Adam Harvey 6f52f566f3 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Remove 128.0.0.0/16 and 191.255.0.0/16 from the reserved list.
2013-12-03 14:51:03 -08:00
Adam Harvey d1314893fd Remove 128.0.0.0/16 and 191.255.0.0/16 from the reserved list.
These were returned to the general allocation pool by RFC 3330, and hence
shouldn't cause an IP address validation failure due to being reserved. At
least 128.0.0.0/16 is in use on the public Internet today.

Fixes bug #66229 (128.0.0.0/16 isn't reserved any longer).
2013-12-03 14:46:15 -08:00
Michael Wallner ffbb56685f BFN 2013-12-02 17:02:01 +01:00
Michael Wallner 9c0a70c1de Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix bug #65196
2013-12-02 17:01:25 +01:00
Michael Wallner 22fa3fbc5f Fix bug #65196
Passing DOMDocumentFragment to DOMDocument::saveHTML()
produces invalid markup, because a DocumentFragment is just a container
for child nodes and not a real node itself.
2013-12-02 17:00:13 +01:00
Michael Wallner 6eae927413 BFN 2013-12-02 12:14:26 +01:00
Michael Wallner e4b310d2a9 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fix bug #49634x
2013-12-02 12:10:59 +01:00
Michael Wallner 6408a1a59e fix bug #49634x 2013-12-02 12:10:00 +01:00
Dmitry Stogov 2f5ab04c5f Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed tests
2013-12-02 12:04:07 +04:00
Dmitry Stogov edbefd1d5c Fixed tests 2013-12-02 11:53:35 +04:00
Dmitry Stogov 7efcbecda9 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed ability to build non-specialized GOTO VM

Conflicts:
	Zend/zend_vm_gen.php
2013-12-02 11:02:40 +04:00
Dmitry Stogov 9ed605892d Fixed ability to build non-specialized GOTO VM 2013-12-02 10:59:32 +04:00
Nikita Popov 02dca18b90 Fix bug #65764
I'm not exactly sure whether this is the right way to fix it. The
question is whether Generator::throw() on a newborn generator (i.e.
a generator that is not yet at yield expression) should first advance to
the first yield and throw the exception there or whether it should
instead throw the exception in the caller's context.

The old behavior was to throw it at the start of the function (i.e.
the very first opcode), which causes issues like the one in #65764.
Effectively it's impossible to properly handle the exceptions in this
case.

For now I choose the variant where the generator advances to the
first yield before throwing, as that's consistent with how all other
methods on the Generator object currently behave. This does not
necessarily match the behavior in other languages, e.g. Python would throw
the exception in the caller's context. But then our send() method already
has this kind of deviation, so it stays internally consistent at least.
2013-12-01 13:37:56 +01:00
Felipe Pena af60886962 - BFN 2013-11-30 12:05:51 -02:00
Felipe Pena dbc477374c Merge branch 'PHP-5.5' of git.php.net:/php-src into PHP-5.5 2013-11-30 11:44:08 -02:00
Felipe Pena 78f69a2b4f - Fixed bug #65923 (ext/socket assumes AI_V4MAPPED is defined) 2013-11-30 11:39:57 -02:00
Nikita Popov b4f00be6c4 Cleanup generator closing code a bit
All code dealing with unfinished execution cleanup is now in a separate
function (previously most of it was run even when execution was properly
finished.

Furthermore some code dealing with unclean shutdowns has been removed,
which is no longer necessary, because we no longer try to clean up in
this case.
2013-11-30 13:38:21 +01:00
Nikita Popov 9589cae8cb Fixed bug #66041: list() fails to unpack yielded ArrayAccess object
Yield return values now use IS_VAR rather than IS_TMP_VAR. This
fixes the issue with list() and should also be faster as it avoids
doing a zval copy.
2013-11-30 13:08:31 +01:00
nikita2206 5f09944662 Fixed bug #65768: DateTimeImmutable::diff does not work
This commit also prevents user classes from directly implementing
DateTimeInterface, because ext/date relies on classes implementing
it to support certain internal structures.
2013-11-29 23:31:07 +01:00
Dmitry Stogov 967abd6153 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Added validation of class names in the autoload process
2013-11-29 12:54:22 +04:00
Dmitry Stogov 2d31eadbbf Added validation of class names in the autoload process 2013-11-29 12:53:02 +04:00
Derick Rethans b0d24d3d20 Merge branch 'PHP-5.4' into PHP-5.5 2013-11-28 16:33:08 +00:00
Derick Rethans d22cc5c816 Fixed bug #65199 (Wrong Day of Week) and fixed bug #63391 (Incorrect/inconsistent day of week prior to the year 1600) 2013-11-28 16:32:11 +00:00
Derick Rethans 88067b6e60 Merge branch 'PHP-5.4' into PHP-5.5
Conflicts:
	ext/date/php_date.c
2013-11-28 14:30:08 +00:00
Derick Rethans c1eb219aad Merge branch 'date-time-dst-rfc' into PHP-5.4
This is a partial resolve of some DST issues, plenty of things to do, but as
this *does* fix a few issues it's worth merging it already.
2013-11-28 14:26:01 +00:00
Derick Rethans aab0b2ce3b Marking those two as XFAIL for now. 2013-11-28 14:24:39 +00:00
Derick Rethans 582f6e529e Fixed a few DST changeover issues. 2013-11-28 12:02:36 +00:00
Derick Rethans 5d0c526199 Move add/sub to timelib. 2013-11-28 12:02:36 +00:00
Derick Rethans 324e6a5f82 Fix backwards transition diffs. 2013-11-28 12:02:36 +00:00
Derick Rethans aa26ace21f Split up tests into their different categories. 2013-11-28 12:02:35 +00:00
Derick Rethans 7a0df7be34 Group those tests a bit better, as some of the bd ones wanted a "ST" feature that doesn't exist yet. 2013-11-28 12:02:35 +00:00
Derick Rethans 6e8b2c91c4 Fixed forward transitions in diffs. 2013-11-28 12:02:35 +00:00
Derick Rethans 261c6b31ca Always reset those parameters. 2013-11-28 12:02:35 +00:00
Derick Rethans 44a9e6b484 Fixed "Forward Transition" construction of DateTime objects.
This fixes the issue in
https://wiki.php.net/rfc/datetime_and_daylight_saving_time#forward_transitions
There is a period during transition to DST where a time (such as 02:30) does
not exist. PHP already calculated the correct timestamp for this, but failed to
"rounded forward" to the existing correct hour value.
2013-11-28 12:02:35 +00:00
Derick Rethans 4587ef569a Merge branch 'PHP-5.4' into PHP-5.5 2013-11-27 22:01:03 +00:00
Derick Rethans fb0c2cf224 Merge branch 'bug53879' into PHP-5.4 2013-11-27 22:00:53 +00:00
Derick Rethans 23ab2575e1 Fixed bug #53879 (DateTime::createFromFormat() fails to parse cookie expiration date) 2013-11-27 21:59:46 +00:00
Dmitry Stogov 504c60dc44 Merge branch 'PHP-5.4' of git.php.net:php-src into PHP-5.4
* 'PHP-5.4' of git.php.net:php-src:
  Fixed bug #66060 (Heap buffer over-read in DateInterval)
2013-11-27 14:58:54 +04:00
Dmitry Stogov 65803c8fac Merge branch 'PHP-5.5' of git.php.net:php-src into PHP-5.5
* 'PHP-5.5' of git.php.net:php-src:
  NEWS
  Fixed bug #66060 (Heap buffer over-read in DateInterval)
2013-11-27 14:58:35 +04:00
Dmitry Stogov 92b76680e9 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed bug #65969 (Chain assignment with T_LIST failure)

Conflicts:
	NEWS
	Zend/zend_vm_def.h
	Zend/zend_vm_execute.h
2013-11-27 14:39:40 +04:00
Dmitry Stogov 16d59aa171 Fixed bug #65969 (Chain assignment with T_LIST failure) 2013-11-27 14:26:34 +04:00
Remi Collet 0dfdb1a491 NEWS 2013-11-27 11:15:34 +01:00
Remi Collet 28d215d0a8 Fixed bug #66060 (Heap buffer over-read in DateInterval) 2013-11-27 11:15:08 +01:00
Remi Collet 12fe4e90be Fixed bug #66060 (Heap buffer over-read in DateInterval) 2013-11-27 11:13:16 +01:00
Julien Pauli e9c6a1cfd2 5.5.8-dev now 2013-11-27 09:34:40 +01:00
Stanislav Malyshev 5cd8ff9885 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  5.4.24-dev now

Conflicts:
	configure.in
	main/php_version.h
2013-11-27 00:14:42 -08:00
Stanislav Malyshev 63f3ff7b5f 5.4.24-dev now 2013-11-27 00:13:45 -08:00
Andrey Hristov 0fc90b100d Merge branch 'PHP-5.5' of git.php.net:php-src into PHP-5.5 2013-11-26 20:10:30 +02:00
Dmitry Stogov de65817136 Fixed opcahce_reset() crash when opcache.protect_memory is set 2013-11-26 21:57:32 +04:00
Dmitry Stogov 2381b817aa Merge branch 'PHP-5.5' of git.php.net:php-src into PHP-5.5
* 'PHP-5.5' of git.php.net:php-src:
  Fixed a wrong test
2013-11-26 21:44:54 +04:00
Andrey Hristov 9a6b72a05a Merge branch 'PHP-5.4' into PHP-5.5 2013-11-26 19:15:43 +02:00
Andrey Hristov 5a3886f15c merge fix 2013-11-26 19:15:30 +02:00
Andrey Hristov 0aadab0e2e add test 2013-11-26 19:15:12 +02:00
Andrey Hristov 40dc242904 Merge branch 'PHP-5.4' into PHP-5.5
Conflicts:
	NEWS
	ext/mysqlnd/mysqlnd.c
2013-11-26 19:02:45 +02:00
Andrey Hristov 74ba88e186 Fix for Bug #66141 (mysqlnd quote function is wrong with NO_BACKSLASH_ESCAPES after failed query) 2013-11-26 19:01:49 +02:00
Dmitry Stogov d79dd9cc1c Fixed bug #66176 (Invalid constant substitution) 2013-11-26 21:00:00 +04:00
Julien Pauli ff20a9019d Fixed a wrong test 2013-11-26 17:43:31 +01:00
Dmitry Stogov 27524b52b5 Fixed bug #66176 (Invalid constant substitution) 2013-11-26 19:55:49 +04:00
Dmitry Stogov d85ac7fb3f Fixed bug #66176 (Invalid constant substitution) 2013-11-26 17:47:02 +04:00
Dmitry Stogov f28ac55b6d Added test 2013-11-26 12:13:42 +04:00
Dmitry Stogov a8c7e50f4d Fixed bug #65559 (Opcache: cache not cleared if changes occur while running) 2013-11-26 11:34:41 +04:00
Andrey Hristov 29ee38bf0d Merge branch 'PHP-5.4' into PHP-5.5
Conflicts:
	NEWS
2013-11-25 21:33:04 +02:00
Andrey Hristov 1b0e6067d5 bring the news 2013-11-25 21:31:51 +02:00
Dmitry Stogov b7b6c35eea Fixed compatibility with old PHP versions 2013-11-25 14:09:57 +04:00
Dmitry Stogov 27dc82d0ec Fixed bug #65915 (Inconsistent results with require return value) 2013-11-25 14:07:24 +04:00
Anatol Belski ad5a63e8bc Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fixed test
2013-11-21 21:29:02 +01:00
Anatol Belski 345032946c fixed test 2013-11-21 21:24:47 +01:00
Andrey Hristov 763f4aef8b Merge branch 'PHP-5.4' into PHP-5.5 2013-11-21 21:29:37 +02:00
Andrey Hristov ce09822269 And here is the real fix for #66124 2013-11-21 21:29:21 +02:00
Andrey Hristov c2b2afacc0 Merge branch 'PHP-5.4' into PHP-5.5 2013-11-21 21:15:22 +02:00
Andrey Hristov 4a1c9be857 Fix for Bug #66124 (mysqli under mysqlnd loses precision when bind_param with 'i') 2013-11-21 21:14:42 +02:00
Anatol Belski 18b2b2a0bc Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  permanently deactivate that place, not on runtime only
2013-11-20 10:11:39 +01:00
Anatol Belski b902a25cc3 permanently deactivate that place, not on runtime only
besides the two "if" checks, this fixes static analyze which is sometimes
broken because of this
2013-11-20 10:09:11 +01:00
Yasuo Ohgaki b8b92bd790 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  added a test to cover distinction between boolean return value of unserialize function and deserializing serialized boolean
2013-11-20 07:23:54 +09:00
Yasuo Ohgaki 0d558afc05 Fix WS in serialization_error_002.phpt 2013-11-20 07:17:53 +09:00
Aaron Hamid 050dd59c63 added a test to cover distinction between boolean return value of unserialize function and deserializing serialized boolean 2013-11-20 07:14:53 +09:00
Jeff Welch 72a8489a12 Fixed tests that fail with non-default serialize_precision configurations.
See:

 * https://bugs.php.net/bug.php?id=64760
 * 4dc4302
2013-11-20 06:17:34 +09:00
Jeff Welch 101c780500 Fixed tests that fail with non-default serialize_precision configurations.
See:

 * https://bugs.php.net/bug.php?id=64760
 * 4dc4302
2013-11-20 06:17:23 +09:00
Remi Collet 87cabc04ac Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  avoid doing a stream_select on a closed stream
2013-11-19 12:42:25 +01:00
Remi Collet 25c08a839a avoid doing a stream_select on a closed stream 2013-11-19 12:41:58 +01:00
Andrea Faulds e3528f086a Updated NEWS 2013-11-18 21:23:45 +00:00
Andrea Faulds 9937e2fda5 Merge branch 'CLIGetAllHeadersBackport' into PHP-5.5
* CLIGetAllHeadersBackport:
  Removed UPGRADING note
  Rewrote test using tcp instead of http:// stream
  Implemented FR #65917 (getallheaders() is not supported by the built-in...)
2013-11-18 21:19:07 +00:00
Xinchen Hui 5e9268f469 Update NEWS 2013-11-17 17:06:27 +08:00
Xinchen Hui de79c51555 Merge branch 'PHP-5.4' into PHP-5.5 2013-11-17 17:05:04 +08:00
Xinchen Hui 823e330c75 Fixed Bug #66094 (unregister_tick_function tries to cast a Closure to a string) 2013-11-17 17:04:37 +08:00
Christopher Jones d0cd112702 This is CLI web server change. Added some common MIME types to the
existing lookup list, pending a more thorough lookup solution, if
anyone wants to do that.  Ref http://news.php.net/php.internals/69990

A router can be used to add to, or override, the MIME type lookups,
see http://php.net/manual/en/features.commandline.webserver.php
2013-11-15 12:36:25 -08:00
Remi Collet cd6eda5e5f NEWS 2013-11-15 09:52:48 +01:00
Remi Collet b8d88bf2c5 Fix Bug #65714 PHP cli forces the tty to cooked mode
Only drop the using_history() call with libedit as I don't know
if it is required with readline.

This also allow to run a php script in background without
it being aborted on first output.
2013-11-15 09:49:42 +01:00
Adam Harvey d7441f6695 Move the JSON bugfix into the 5.5.6 changelog. 2013-11-14 10:52:07 -08:00
Andrea Faulds 7d2609b0f5 Removed UPGRADING note
Conflicts:
	UPGRADING
2013-11-13 17:05:02 +00:00
Remi Collet 018b9445da Fix failed test with recent glibc
In recent version of strptime glibc upstream has fixed a discrepancy between
documentation and actual behaviour by skipping over the sequence that would match %Z.
See http://repo.or.cz/w/glibc.git/commitdiff/ddc7e412ab252e7360a4357664beb3b5d9c4f42b

So when %Z is used in format
glibc <= 2.18 returns the GMT as unparsed
glibc >= 2.19 returns empty string

Removing %Z from tested format gives the same behavior with all version.
2013-11-13 13:19:10 +01:00
Andrea Faulds a3f5b9f62d Rewrote test using tcp instead of http:// stream 2013-11-12 20:27:38 +00:00
Andrea Faulds aee271ec0d Implemented FR #65917 (getallheaders() is not supported by the built-in...)
- Implemented apache_request_headers() and getallheaders() alias in CLI server
- Implemented apache_response_headers() in CLI server using FastCGI code

Conflicts:
	NEWS
	UPGRADING
2013-11-12 20:27:34 +00:00
Julien Pauli 1984919ddc 5.5.7 now 2013-11-12 18:20:09 +01:00
Adam Harvey 304bff90f4 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Update NEWS and remove the unnecessary UPGRADING note.
  UPGRADING and NEWS
  Better test: Check combined leading/trailing
  Fixed whitespace part of bug #64874 ("json_decode handles whitespace and case-sensitivity incorrectly")
2013-11-10 16:11:28 -05:00
Adam Harvey c9cfd98bcd Update NEWS and remove the unnecessary UPGRADING note. 2013-11-10 15:46:31 -05:00
Adam Harvey 288e9c6423 Merge remote-tracking branch 'ajf/JSONWhitespaceFix' into PHP-5.4 2013-11-10 15:43:56 -05:00
Rasmus Lerdorf df7321359e Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix broken test
2013-11-09 09:46:43 -08:00
Rasmus Lerdorf 064ba179b1 Fix broken test 2013-11-09 09:45:52 -08:00
Dmitry Stogov 915c428ba1 Fixed issue #115 (path issue when using phar).
Fixed issue #149 (Phar mount points not working with OPcache enabled).
2013-11-08 16:35:05 +04:00
Dmitry Stogov 49fbe2579e Added tests for PHAR/OPCahce incompatibilities 2013-11-08 13:50:57 +04:00
Xinchen Hui 717268cb1e Update NEWS 2013-11-08 15:33:49 +08:00
Xinchen Hui 5f17c4d08e Merge branch 'PHP-5.4' into PHP-5.5 2013-11-08 15:33:27 +08:00
Xinchen Hui cf2626f10c Fixed bug #65947 (basename is no more working after fgetcsv in certain situation)
previous codes: "#define php_mblen(ptr, len) ((ptr) == NULL ? mbsinit(&BG(mblen_state)):
(int)mbrlen(ptr, len, &BG(mblen_state)))#

it use mbsinit there, seems try to initialize the mblen_state, but:
"This function does not change the state identified by ps. Typical ways
to make the state pointed by ps an initial state are:

memset (ps,0,sizeof(*ps));  // ps points to zero-valued object
"
http://www.cplusplus.com/reference/cwchar/mbsinit/?kw=mbsinit
2013-11-08 15:32:28 +08:00
Xinchen Hui f345152037 Update NEWS 2013-11-08 15:08:07 +08:00
Xinchen Hui 41eb3c959d Merge branch 'PHP-5.4' into PHP-5.5 2013-11-08 15:07:43 +08:00
Xinchen Hui fd3fa9b53c Fixed Bug #66043 (Segfault calling bind_param() on mysqli)
Although the doc said it is (unsigned int *), but it is ulong* in the
libmysql 5.0 's source codes
2013-11-08 15:06:36 +08:00
Rasmus Lerdorf caab95155d NEWS entry 2013-11-07 18:16:12 -08:00
Rasmus Lerdorf 224dc52ea9 NEWS entry 2013-11-07 18:15:15 -08:00
Rasmus Lerdorf b3d522d215 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix bug #65946 - pdo_sql_parser.c permanently converts values bound to strings

Conflicts:
	ext/pdo/pdo_sql_parser.c
2013-11-07 18:09:15 -08:00
Rasmus Lerdorf 890ea8411f Fix bug #65946 - pdo_sql_parser.c permanently converts values bound to strings 2013-11-07 18:05:08 -08:00
Rasmus Lerdorf 8cb128159d Merge branch 'PHP-5.4' of git.php.net:php-src into PHP-5.4
* 'PHP-5.4' of git.php.net:php-src: (65 commits)
  Add a couple more test cases to parse_url() tests
  fix missing change from 'tcp_socket' to the more common 'server'
  fix many parallel test issues
  Cleanup temp test file
  Fixed Bug #66034 (Segmentation Fault when constructor of PDO statement throws an exception)
  Typo fix: umknown -> unknown
  Fix bug #66008
  5.4.23-dev
  Update NEWS
  Fixed Bug 64760 var_export() does not use full precision for floating-point numbers
  add bundled libzip LICENSE, as required by BSD License terms
  - Updated to version 2013.8 (2013h)
  remove "PHP 6" staff
  Fixed bug #65950 Field name truncation if the field name is bigger than 32 characters
  - Updated to version 2013.7 (2013g)
  Fix Coverity issue reporting wrong sizeof()
  exif NEWS
  add tests for bug #62523
  Merged PR #293 (Exif crash on unknown encoding was fixed) By: 	Draal Conflicts: 	configure.in 	main/php_version.h
  Just SKIP that test on travis
  ...
2013-11-07 07:55:26 -08:00
Rasmus Lerdorf 54fe719953 Merge branch 'PHP-5.5' of git.php.net:php-src into PHP-5.5
* 'PHP-5.5' of git.php.net:php-src:
  Add a couple more test cases to parse_url() tests
  fix missing change from 'tcp_socket' to the more common 'server'
  fix many parallel test issues
  Cleanup temp test file
  Revert "Fixed issue #115 (path issue when using phar)."
  Remove outdate codes, make it clearer, although just a bit..
  Update NEWS
  Fixed Bug #66034 (Segmentation Fault when constructor of PDO statement throws an exception)
  Fixed coredump due to abnormal implemention of phar
  Typo fix: umknown -> unknown
  Fix bug #66008
  5.4.23-dev
  remove "PHP 6" staff
2013-11-07 07:54:08 -08:00
Ferenc Kovacs 91108818e1 Merge branch 'PHP-5.4' into PHP-5.5
Conflicts:
	ext/spl/tests/SplFileObject_rewind_error001.phpt
2013-11-06 10:46:34 +01:00
Sara Golemon 8b6b39fdcf Add a couple more test cases to parse_url() tests
http://::# (valid but silly)
http://#   (invalid)
2013-11-06 10:32:11 +01:00
ptarjan 290becb1f1 fix missing change from 'tcp_socket' to the more common 'server' 2013-11-06 10:32:00 +01:00
ptarjan 9c1e1bbc05 fix many parallel test issues
While running these on HHVM I've run into a lot of parallelism issues.
I'm backporting all the fixes I had to do in
https://github.com/facebook/hiphop-php/blob/master/hphp/tools/import_zend_test.py#L650
to php core.

Most of these changes were just filenames that were shared between
tests, but I did more surgery on the fixed ports. I can apreciate port
31337 as much as the next nerd, but random ports are better for tests.
2013-11-06 10:31:47 +01:00
Christopher Jones c439ac6c35 Cleanup temp test file 2013-11-06 10:31:35 +01:00
Xinchen Hui 9d75b9fb27 Revert "Fixed issue #115 (path issue when using phar)."
We need another better way to fix this

This reverts commit 098855433d.

Conflicts:
	ext/opcache/ZendAccelerator.c
2013-11-06 16:53:45 +08:00
Xinchen Hui 63dba7ec9d Remove outdate codes, make it clearer, although just a bit.. 2013-11-05 18:47:12 +08:00
Xinchen Hui 906d3ae0ed Update NEWS 2013-11-05 11:08:55 +08:00
Xinchen Hui d4f5ca467f Merge branch 'PHP-5.4' into PHP-5.5
Conflicts:
	configure.in
	ext/mysqlnd/mysqlnd.c
	main/php_version.h
2013-11-05 11:08:09 +08:00
Xinchen Hui e3d9e18e7b Fixed Bug #66034 (Segmentation Fault when constructor of PDO statement throws an exception)
I know zend_call_function will initilize retval_ptr_ptr, but still set
it to NULL explict is more readable
2013-11-05 11:04:55 +08:00
Xinchen Hui 2b7e89e20a Merge branch 'PHP-5.4' of git.php.net:php-src into PHP-5.4 2013-11-05 11:03:47 +08:00
Xinchen Hui a07ae67a21 Merge branch 'PHP-5.5' of git.php.net:php-src into PHP-5.5 2013-11-04 14:47:16 +08:00
Xinchen Hui 3d4ef50dd7 Fixed coredump due to abnormal implemention of phar 2013-11-04 14:42:54 +08:00
Rasmus Lerdorf bb42643ae0 Merge branch 'PHP-5.5' of git.php.net:php-src into PHP-5.5
* 'PHP-5.5' of git.php.net:php-src: (107 commits)
  Typo fix: umknown -> unknown
  add news entry about FPM backlog change
  Fix bug #66008
  updated libs_versions.txt
  Update NEWS
  Update NEWS
  Fixed Bug 64760 var_export() does not use full precision for floating-point numbers
  add bundled libzip LICENSE, as required by BSD License terms
  - Updated to version 2013.8 (2013h)
  Use zval* instead of zval**
  Increased limit for opcache.max_accelerated_files to 1,000,000. (Chris)
  Improved performance of array_merge() by eliminating useless copying
  Improved performance of func_get_args() by eliminating useless copying
  Link to more readmes
  increase backlog to the highest value everywhere
  Update NEWS
  Fixed bug #65950 Field name truncation if the field name is bigger than 32 characters
  - Updated to version 2013.7 (2013g)
  Increment version number, since this will be 5.5.6.
  Added Zend Debugger to the note about the load order (by trash4you at online dot de)
  ...
2013-10-31 16:23:38 -07:00
Lior Kaplan d3fd163d27 Typo fix: umknown -> unknown 2013-10-31 23:12:41 +02:00
Martin Hujer 55ee543e2f Typo fix: umknown -> unknown 2013-10-31 22:59:42 +02:00
Antony Dovgal 7cd5ae6fab add news entry about FPM backlog change
and move the other entry to its proper place
2013-10-31 15:04:33 +04:00
Rasmus Lerdorf 812dfbc431 Fix bug #66008 2013-10-31 03:18:07 -07:00
Rasmus Lerdorf b4bed6fde0 Fix bug #66008 2013-10-31 03:06:35 -07:00
Stanislav Malyshev 4ded6ee971 5.4.23-dev 2013-10-29 18:11:02 -07:00
Anatol Belski 5f1cbfacf9 updated libs_versions.txt 2013-10-29 13:35:02 +01:00
Yasuo Ohgaki 0d89265a69 Merge branch 'PHP-5.4' of git.php.net:php-src into PHP-5.4
* 'PHP-5.4' of git.php.net:php-src:
  add bundled libzip LICENSE, as required by BSD License terms
2013-10-29 17:38:22 +09:00
Yasuo Ohgaki 4c45e95cfe Update NEWS 2013-10-29 17:29:53 +09:00
Yasuo Ohgaki d04bcb8969 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Update NEWS
  Fixed Bug 64760 var_export() does not use full precision for floating-point numbers
2013-10-29 17:28:35 +09:00
Yasuo Ohgaki 16a9fec889 Update NEWS 2013-10-29 17:27:49 +09:00
Yasuo Ohgaki 49b3fef86a Merge branch 'PHP-5.5' of git.php.net:php-src into PHP-5.5
* 'PHP-5.5' of git.php.net:php-src:
  add bundled libzip LICENSE, as required by BSD License terms
  - Updated to version 2013.8 (2013h)
  Use zval* instead of zval**
  Increased limit for opcache.max_accelerated_files to 1,000,000. (Chris)
  Improved performance of array_merge() by eliminating useless copying
  Improved performance of func_get_args() by eliminating useless copying
  Link to more readmes
  increase backlog to the highest value everywhere
  Update NEWS
  Fixed bug #65950 Field name truncation if the field name is bigger than 32 characters
  - Updated to version 2013.7 (2013g)
  Increment version number, since this will be 5.5.6.
  Added Zend Debugger to the note about the load order (by trash4you at online dot de)
2013-10-29 17:24:48 +09:00
Yasuo Ohgaki 4dc4302a30 Fixed Bug 64760 var_export() does not use full precision for floating-point numbers 2013-10-29 17:24:23 +09:00
Remi Collet a7fc8eecb0 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  add bundled libzip LICENSE, as required by BSD License terms
2013-10-29 09:02:44 +01:00
Remi Collet e2c9f3983a add bundled libzip LICENSE, as required by BSD License terms 2013-10-29 09:02:24 +01:00
Yasuo Ohgaki 69808d698c Merge branch 'PHP-5.4' of git.php.net:php-src into PHP-5.4
* 'PHP-5.4' of git.php.net:php-src:
  - Updated to version 2013.8 (2013h)
  Fixed bug #65950 Field name truncation if the field name is bigger than 32 characters
  - Updated to version 2013.7 (2013g)
2013-10-29 14:03:17 +09:00
Derick Rethans ad7793d94c Merge branch 'PHP-5.4' into PHP-5.5 2013-10-28 15:12:31 +01:00
Derick Rethans ab6481993e - Updated to version 2013.8 (2013h) 2013-10-28 15:12:30 +01:00
Derick Rethans 824bac9f23 Merge branch 'PHP-5.5' of git.php.net:php-src into PHP-5.5 2013-10-28 15:09:13 +01:00
Derick Rethans 7a526f01b5 Merge branch 'PHP-5.4' of git.php.net:php-src into PHP-5.4 2013-10-28 15:08:57 +01:00
Dmitry Stogov 2d14cc2a49 Use zval* instead of zval** 2013-10-28 14:44:07 +04:00
Dmitry Stogov eb22041ffe Increased limit for opcache.max_accelerated_files to 1,000,000. (Chris) 2013-10-28 14:19:40 +04:00
Dmitry Stogov 1dcca1fdb9 Merge branch 'PHP-5.5' of git.php.net:php-src into PHP-5.5
* 'PHP-5.5' of git.php.net:php-src:
  increase backlog to the highest value everywhere
  Update NEWS
  Fixed bug #65950 Field name truncation if the field name is bigger than 32 characters

Conflicts:
	NEWS
2013-10-28 13:50:04 +04:00
Antony Dovgal a9c288ed3c Merge branch 'PHP-5.5' of https://git.php.net/repository/php-src into PHP-5.5
* 'PHP-5.5' of https://git.php.net/repository/php-src:
  Improved performance of func_get_args() by eliminating useless copying
  Link to more readmes
  Update NEWS
  Fixed bug #65950 Field name truncation if the field name is bigger than 32 characters
2013-10-28 13:47:13 +04:00
Yasuo Ohgaki 0db6adda48 Merge branch 'PHP-5.5' of git.php.net:php-src into PHP-5.5
* 'PHP-5.5' of git.php.net:php-src:
  Improved performance of func_get_args() by eliminating useless copying
  Link to more readmes
2013-10-28 18:38:22 +09:00
Dmitry Stogov 5c0890ba8a Improved performance of array_merge() by eliminating useless copying 2013-10-28 13:31:44 +04:00
Dmitry Stogov 91b8a6752e Improved performance of func_get_args() by eliminating useless copying 2013-10-28 13:17:55 +04:00
Hannes Magnusson f8f643b4f7 Link to more readmes 2013-10-27 16:40:37 -07:00
Antony Dovgal 9765763413 increase backlog to the highest value everywhere
It makes no sense to use -1 for *BSD (which is the highest value there)
and still use 128 for Linux.
Lets raise it right to up the limit and let the people lower it if they
think that 3.5Mb is too much for a process.
IMO this is better than silently dropping connections.
2013-10-27 22:54:47 +04:00
Xinchen Hui a3bd4fda09 Merge branch 'PHP-5.4' into PHP-5.5 2013-10-27 16:53:13 +08:00
Xinchen Hui 9b399be778 Merge branch 'PHP-5.4' of git.php.net:php-src into PHP-5.4 2013-10-27 16:53:05 +08:00
Xinchen Hui e18e7a5983 remove "PHP 6" staff 2013-10-27 16:52:43 +08:00
Yasuo Ohgaki 66fe7fabad Update NEWS 2013-10-26 10:42:55 +09:00
Yasuo Ohgaki bd1d2d8fb0 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed bug #65950 Field name truncation if the field name is bigger than 32 characters
2013-10-26 10:42:18 +09:00
Yasuo Ohgaki a209cf7a5a Merge branch 'PHP-5.5' of git.php.net:php-src into PHP-5.5
* 'PHP-5.5' of git.php.net:php-src:
  Increment version number, since this will be 5.5.6.
2013-10-26 10:41:53 +09:00
Yasuo Ohgaki e50eb1ce34 Fixed bug #65950 Field name truncation if the field name is bigger than 32 characters 2013-10-26 10:31:21 +09:00
Derick Rethans bb73d18c85 Merge branch 'PHP-5.4' into PHP-5.5 2013-10-23 22:33:54 +01:00
Derick Rethans 9cb3a759a7 - Updated to version 2013.7 (2013g) 2013-10-23 22:33:53 +01:00
Adam Harvey 70c3a722e2 Increment version number, since this will be 5.5.6. 2013-10-23 12:36:27 -07:00
Xinchen Hui 0adba0abb9 Added Zend Debugger to the note about the load order (by trash4you at online dot de) 2013-10-23 19:26:24 +08:00
Yasuo Ohgaki 6af3683a4c Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix Coverity issue reporting wrong sizeof()
2013-10-22 12:29:01 +09:00
Yasuo Ohgaki 6410f6ff68 Merge branch 'PHP-5.5' of git.php.net:php-src into PHP-5.5
* 'PHP-5.5' of git.php.net:php-src: (178 commits)
  Fixed bug #65939 (Space before ";" breaks php.ini parsing). (brainstorm at nopcode dot org)
  exif NEWS
  add tests for bug #62523
  Merged PR #293 (Exif crash on unknown encoding was fixed) By: 	Draal Conflicts: 	configure.in 	main/php_version.h
  fix bug #65936 (dangling context pointer causes crash)
  remove TRAVIS check in test source
  Fixed compilation warning
  Just SKIP that test on travis
  Fixed issue #115 (path issue when using phar).
  fix memory leak on error (from Coverity scan)
  Fix coverity issue with -1 returned by findOffset not being handled by getPreferredTag
  5.4.21 release date
  fix argument type & remove warning
  fix const warnings in intl methods
  When src->src is null this doesn't get initialized but it is still used, so the passed in *ze will point to unitialized memory. Hopefully src->src is never null, but just in case this initialization doesn't hurt.
  Fix coverity issue with -1 returned by findOffset not being handled by getPreferredTag
  fix possibility of access to *storedType without initialization
  5.4.21 release date
  Fix typo
  These getpwnam('') tests are silly and not portable
  ...
2013-10-22 12:27:47 +09:00
Yasuo Ohgaki 1f5b1cfb2b Fix Coverity issue reporting wrong sizeof() 2013-10-22 12:27:18 +09:00
Yasuo Ohgaki 2cf5614f5f Merge branch 'PHP-5.4' of git.php.net:php-src into PHP-5.4
* 'PHP-5.4' of git.php.net:php-src: (101 commits)
  exif NEWS
  add tests for bug #62523
  Merged PR #293 (Exif crash on unknown encoding was fixed) By: 	Draal Conflicts: 	configure.in 	main/php_version.h
  Just SKIP that test on travis
  fix memory leak on error (from Coverity scan)
  Fix coverity issue with -1 returned by findOffset not being handled by getPreferredTag
  5.4.21 release date
  When src->src is null this doesn't get initialized but it is still used, so the passed in *ze will point to unitialized memory. Hopefully src->src is never null, but just in case this initialization doesn't hurt.
  Fix typo
  Clean up this weird safe_emalloc() call
  Minor Coverity tweaks
  - Moved NULL check before dereferencing
  - Fixed possible NULL ptr dereference
  - Fixed possible uninitialized scalar variable usage (spotted by Coverity)
  Remove senseless check here
  - Fix extern declaration according to definition
  - Fix possible memory leak
  - Moved allocation to if block to make Coverity happy
  - Fixed possible memory leak
  Fix unitialized opened_path here - found by Coverity
  ...
2013-10-22 12:23:07 +09:00
Christopher Jones b6ceea4a25 Fixed bug #65939 (Space before ";" breaks php.ini parsing). (brainstorm at nopcode dot org) 2013-10-21 14:20:35 -07:00
Michael Wallner ee7cfa022d Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  exif NEWS
2013-10-21 22:44:53 +02:00
Michael Wallner 5cc797d119 exif NEWS 2013-10-21 22:44:37 +02:00
Michael Wallner 757f4a952c Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  add tests for bug #62523
  Merged PR #293 (Exif crash on unknown encoding was fixed) By: 	Draal Conflicts: 	configure.in 	main/php_version.h
2013-10-21 22:15:55 +02:00
Michael Wallner 2fa5f39e4c add tests for bug #62523 2013-10-21 22:15:09 +02:00
Michael Wallner 1b43f95040 Merged PR #293 (Exif crash on unknown encoding was fixed)
By:
	Draal
Conflicts:
	configure.in
	main/php_version.h
2013-10-21 21:48:27 +02:00
Antony Dovgal b636c03426 fix bug #65936 (dangling context pointer causes crash)
reported by Leon Sorokin
2013-10-21 15:09:29 +04:00
Michael Wallner e78c53680f Merge remote-tracking branch 'refs/remotes/origin/PHP-5.5' into PHP-5.5
* refs/remotes/origin/PHP-5.5:
  Fixed compilation warning
2013-10-21 12:23:01 +02:00
Michael Wallner fb610b4e80 remove TRAVIS check in test source 2013-10-21 12:18:58 +02:00
Michael Wallner 825174e480 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Just SKIP that test on travis
2013-10-21 12:18:10 +02:00
Dmitry Stogov 60ce3811ae Fixed compilation warning 2013-10-21 14:17:10 +04:00
Michael Wallner 2ecf94e07e Just SKIP that test on travis 2013-10-21 12:16:41 +02:00
Xinchen Hui 098855433d Fixed issue #115 (path issue when using phar). 2013-10-21 17:40:39 +08:00
Stanislav Malyshev cb47396d46 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fix memory leak on error (from Coverity scan)
2013-10-21 00:02:21 -07:00
Stanislav Malyshev f860486de5 fix memory leak on error (from Coverity scan) 2013-10-21 00:01:24 -07:00
Stanislav Malyshev 00697927d8 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix coverity issue with -1 returned by findOffset not being handled by getPreferredTag
  5.4.21 release date
2013-10-20 23:04:26 -07:00
Stanislav Malyshev 297324146e Fix coverity issue with -1 returned by findOffset not being handled by getPreferredTag 2013-10-20 23:04:16 -07:00
Stanislav Malyshev 27ebcb8d0e 5.4.21 release date 2013-10-20 23:04:16 -07:00
Stanislav Malyshev 8f19a8da65 Merge branch 'PHP-5.5' of git.php.net:php-src into PHP-5.5
* 'PHP-5.5' of git.php.net:php-src:
  When src->src is null this doesn't get initialized but it is still used, so the passed in *ze will point to unitialized memory. Hopefully src->src is never null, but just in case this initialization doesn't hurt.
2013-10-20 23:04:03 -07:00
Stanislav Malyshev 8bef8e66cf fix argument type & remove warning 2013-10-20 22:59:07 -07:00
Stanislav Malyshev ef9069b4ef fix const warnings in intl methods 2013-10-20 22:32:20 -07:00
Rasmus Lerdorf 910d4751e3 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  When src->src is null this doesn't get initialized but it is still used, so the passed in *ze will point to unitialized memory. Hopefully src->src is never null, but just in case this initialization doesn't hurt.
2013-10-20 22:18:15 -07:00
Rasmus Lerdorf 2186e1583d When src->src is null this doesn't get initialized
but it is still used, so the passed in *ze will point
to unitialized memory. Hopefully src->src is never
null, but just in case this initialization doesn't hurt.
2013-10-20 22:15:35 -07:00
Stanislav Malyshev 42cb9ac7a6 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix coverity issue with -1 returned by findOffset not being handled by getPreferredTag
  5.4.21 release date
2013-10-20 22:05:48 -07:00
Stanislav Malyshev dab1d76e9d Fix coverity issue with -1 returned by findOffset not being handled by getPreferredTag 2013-10-20 22:04:21 -07:00
Stanislav Malyshev 646813a37a fix possibility of access to *storedType without initialization 2013-10-20 21:57:33 -07:00
Stanislav Malyshev 9aad9114e3 5.4.21 release date 2013-10-20 19:59:39 -07:00
Rasmus Lerdorf 9e4651f6f1 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix typo
2013-10-20 17:56:14 -07:00
Rasmus Lerdorf 18cc5386de Fix typo 2013-10-20 17:55:55 -07:00
Rasmus Lerdorf 2129de4569 These getpwnam('') tests are silly and not portable 2013-10-20 14:04:47 -07:00
Rasmus Lerdorf 288a4ec3bd Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Clean up this weird safe_emalloc() call
2013-10-20 09:37:25 -07:00
Rasmus Lerdorf 8f4a6d6e1b Clean up this weird safe_emalloc() call 2013-10-20 09:36:50 -07:00
Rasmus Lerdorf c5e5a6c2ac Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Minor Coverity tweaks
2013-10-20 08:56:24 -07:00
Rasmus Lerdorf 1494298231 Minor Coverity tweaks 2013-10-20 08:55:48 -07:00
Felipe Pena 8aa19c9fd8 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  - Moved NULL check before dereferencing
2013-10-20 09:50:13 -02:00
Felipe Pena 9976b5cd7f - Moved NULL check before dereferencing 2013-10-20 09:50:11 -02:00
Felipe Pena 5b0560efc3 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  - Fixed possible NULL ptr dereference
2013-10-20 09:04:27 -02:00
Felipe Pena 52555a7894 - Fixed possible NULL ptr dereference 2013-10-20 09:04:24 -02:00
Felipe Pena b6feabc8c6 Merge branch 'PHP-5.4' of git.php.net:/php-src into PHP-5.4 2013-10-20 08:52:31 -02:00
Felipe Pena df31eb8fdc Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  - Fixed possible uninitialized scalar variable usage (spotted by Coverity)
2013-10-20 08:51:17 -02:00
Felipe Pena 33d377e701 - Fixed possible uninitialized scalar variable usage (spotted by Coverity) 2013-10-20 08:51:09 -02:00
Rasmus Lerdorf 683a7d719b Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Remove senseless check here
2013-10-19 20:56:01 -07:00
Rasmus Lerdorf fb38fdc7fd Remove senseless check here 2013-10-19 20:55:02 -07:00
Felipe Pena 0d6247f968 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  - Fix extern declaration according to definition
2013-10-20 01:16:10 -02:00
Felipe Pena a1daebefda - Fix extern declaration according to definition 2013-10-20 01:16:07 -02:00
Felipe Pena 8d22c23161 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  - Fix possible memory leak
2013-10-20 01:05:00 -02:00
Felipe Pena 420068c6e1 - Fix possible memory leak 2013-10-20 01:04:55 -02:00
Felipe Pena 0b5c2887cd Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  - Moved allocation to if block to make Coverity happy
2013-10-19 23:36:36 -03:00
Felipe Pena 85a622e42f - Moved allocation to if block to make Coverity happy 2013-10-19 23:36:28 -03:00
Felipe Pena c1f22176f3 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  - Fixed possible memory leak
2013-10-19 23:30:12 -03:00
Felipe Pena aa4f9b322b - Fixed possible memory leak 2013-10-19 23:29:34 -03:00
Rasmus Lerdorf 1ce00048fd Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix unitialized opened_path here - found by Coverity
2013-10-19 19:25:25 -07:00
Rasmus Lerdorf 2be67ca457 Fix unitialized opened_path here - found by Coverity 2013-10-19 19:24:17 -07:00
Rasmus Lerdorf 4a205092f7 Trivial Coverity fix 2013-10-19 17:55:34 -07:00
Rasmus Lerdorf 26b27767a6 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Initialize these to make Coverity happy
  Typo fix: managment -> management
  Use minus sign instead of hyphen
  Merge branch 'pull-request/499' Fix RFC 6598 IPv4 Reserved Range Checks
2013-10-19 17:41:04 -07:00
Rasmus Lerdorf 813e867652 Initialize these to make Coverity happy 2013-10-19 17:37:59 -07:00
Lior Kaplan a55d3b9295 Typo fix: managment -> management 2013-10-19 23:53:23 +03:00
Lior Kaplan df501fd464 Use minus sign instead of hyphen 2013-10-19 23:52:43 +03:00
Xinchen Hui d42fa2a059 Revert "Need a way to check whether this API exists"
hmm, we can check whether the head file exists instead

This reverts commit 4d7d85640d.
2013-10-19 22:18:37 +08:00
Xinchen Hui 4d7d85640d Need a way to check whether this API exists 2013-10-19 22:16:31 +08:00
Rasmus Lerdorf 55b16f40a2 Merge branch 'pull-request/499'
Fix RFC 6598 IPv4 Reserved Range Checks
2013-10-19 00:43:21 -07:00
Rasmus Lerdorf 6919d15a2e Merge branch 'pull-request/499'
Fix RFC 6598 IPv4 Reserved Range Checks
2013-10-19 00:42:53 -07:00
Xinchen Hui 30d64b0efb Merge branch 'PHP-5.4' into PHP-5.5 2013-10-19 13:27:36 +08:00
Michael Wallner 1fe1f7305b use $YACC instead of 'bison' as suggested by Yasuo
Conflicts:
	Zend/acinclude.m4
2013-10-19 13:27:24 +08:00
Xinchen Hui db61685edf Merge branch 'PHP-5.5' of git.php.net:php-src into PHP-5.5 2013-10-18 10:34:36 +08:00
Xinchen Hui 4417421ab6 Retruning SUCCESS/FAILURE instead of int 2013-10-18 10:33:53 +08:00
Christopher Jones a4b4477466 Merge branch 'PHP-5.5' of https://git.php.net/repository/php-src into PHP-5.5
* 'PHP-5.5' of https://git.php.net/repository/php-src:
  Revert "TLS news"
  Revert "Added support for TLSv1.1 and TLSv1.2"
  TLS news
  Added support for TLSv1.1 and TLSv1.2
2013-10-17 09:21:39 -07:00
Michael Wallner d89d46d940 Revert "TLS news"
This reverts commit 62be976abe.
2013-10-17 15:21:34 +02:00
Michael Wallner 8aaecef524 Revert "Added support for TLSv1.1 and TLSv1.2"
This reverts commit 2aaa3d538a.
2013-10-17 15:20:38 +02:00
Michael Wallner 62be976abe TLS news 2013-10-17 15:13:12 +02:00
Daniel Lowrey 2aaa3d538a Added support for TLSv1.1 and TLSv1.2
Conflicts:
	ext/openssl/xp_ssl.c
2013-10-17 14:49:44 +02:00
Christopher Jones 4628c9b375 Merge branch 'PHP-5.5' of https://git.php.net/repository/php-src into PHP-5.5
* 'PHP-5.5' of https://git.php.net/repository/php-src:
  Assume the free space is correct on Travis CI.
2013-10-17 05:40:57 -07:00
Tjerk Meesters 51b809e3ad Assume the free space is correct on Travis CI. 2013-10-17 12:12:05 +02:00
Xinchen Hui 06994a419d Add ability of alias resolving (it cause problem while work with opcache) 2013-10-17 12:23:09 +08:00
Nikita Popov 865f221627 Merge branch 'PHP-5.4' into PHP-5.5 2013-10-16 18:37:49 +02:00
bwoebi 4c0bb6d76e Fixed bug #65911 ($this not usable as static property)
In context of static accesses like classname::$this, the string
"$this" should not be handled like a $this variable, but as an
identifier for a static variable.
2013-10-16 18:33:14 +02:00
Andrea Faulds 872ef919ca UPGRADING and NEWS 2013-10-15 22:44:23 +00:00
Andrea Faulds 29e755ac66 Merge branch 'PHP-5.4' into JSONWhitespaceFix 2013-10-15 22:38:46 +00:00
Andrea Faulds 8495d63034 Better test: Check combined leading/trailing 2013-10-15 20:42:31 +00:00
Julien Pauli aa76f779ef 5.5.6 now 2013-10-15 16:11:11 +02:00
Anatol Belski 7e4a42c278 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fix whitespaces
2013-10-14 17:13:11 +02:00
Anatol Belski b0a36007ab fix whitespaces 2013-10-14 17:12:32 +02:00
Anatol Belski 78cbe9aed5 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  added notes about the PECL site conformity
2013-10-14 16:08:21 +02:00
Anatol Belski 9ccde8a415 added notes about the PECL site conformity 2013-10-14 16:07:26 +02:00
Anatol Belski 2c9fc139fe Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fixed skeleton to produce the normalized ext version macros
2013-10-14 14:21:46 +02:00
Anatol Belski 7a038ccbe6 fixed skeleton to produce the normalized ext version macros
See http://news.php.net/php.pecl.dev/11191 for more info.
2013-10-14 14:18:43 +02:00
Felipe Pena 62a8305007 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  - Fixed possible memory leak
2013-10-12 18:06:27 -03:00
Felipe Pena 960b4e81f3 - Fixed possible memory leak 2013-10-12 18:06:20 -03:00
Felipe Pena 5c6dbc35e7 - Fixed resource leak 2013-10-12 17:25:26 -03:00
Christopher Jones ef7fd7f4b5 Merge branch 'PHP-5.5' of https://git.php.net/repository/php-src into PHP-5.5
# By Dmitry Stogov
# Via Dmitry Stogov
* 'PHP-5.5' of https://git.php.net/repository/php-src:
  Fixed bug #65845 (Error when Zend Opcache Optimizer is fully enabled).
2013-10-10 11:14:22 -07:00
Dmitry Stogov ef8cf76815 Fixed bug #65845 (Error when Zend Opcache Optimizer is fully enabled). 2013-10-10 15:32:30 +04:00
Christopher Jones f859b8d2cf Merge branch 'PHP-5.5' of https://git.php.net/repository/php-src into PHP-5.5
# By Michael Wallner (2) and others
# Via Michael Wallner (3) and Stanley Sufficool (1)
* 'PHP-5.5' of https://git.php.net/repository/php-src:
  C89 compatibility
  Fixed segfault when built with OpenSSL >= 1.0.1
  consolidate NEWS with 5.4
  fixing a minor typo in CODING_STANDARDS document
  FIX BUG #65219 - Typo correction
  FIX BUG #65219 - USE DB not being sent for FreeTDS version < 0.92 FreeTDS <0.92 does not support DBSETLDBNAME option and therefore will not work with SQL Azure. Fallback to dbuse command in letter versions.
2013-10-09 09:41:01 -07:00
Christopher Jones 9fbfdb3396 Merge branch 'PHP-5.4' of https://git.php.net/repository/php-src into PHP-5.4
# By Daniel Lowrey (1) and Michael Wallner (1)
# Via Michael Wallner
* 'PHP-5.4' of https://git.php.net/repository/php-src:
  C89 compatibility
  Fixed segfault when built with OpenSSL >= 1.0.1
2013-10-09 09:40:54 -07:00
Michael Wallner 3b3c57e79e Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  C89 compatibility
2013-10-09 12:30:42 +02:00
Michael Wallner 22700890d4 C89 compatibility 2013-10-09 12:30:31 +02:00
Michael Wallner 36fb4ed968 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed segfault when built with OpenSSL >= 1.0.1
  fixing a minor typo in CODING_STANDARDS document
  FIX BUG #65219 - Typo correction
  FIX BUG #65219 - USE DB not being sent for FreeTDS version < 0.92 FreeTDS <0.92 does not support DBSETLDBNAME option and therefore will not work with SQL Azure. Fallback to dbuse command in letter versions.
2013-10-09 09:17:48 +02:00
Daniel Lowrey b026993a74 Fixed segfault when built with OpenSSL >= 1.0.1
(PR #481)
2013-10-09 09:17:25 +02:00
Michael Wallner e3c7b48709 consolidate NEWS with 5.4 2013-10-09 08:16:00 +02:00
Christopher Jones fe650a43ed Merge branch 'PHP-5.5' of https://git.php.net/repository/php-src into PHP-5.5
# By Michael Wallner
# Via Michael Wallner
* 'PHP-5.5' of https://git.php.net/repository/php-src:
  fix bug #51076 (race condition in shtool's mkdir -p)
2013-10-08 10:21:10 -07:00
Michael Wallner f32d2ac3aa fix bug #51076 (race condition in shtool's mkdir -p) 2013-10-08 08:37:08 +02:00
Anatol Belski 0117eb747e added fixed tests for ICU >= 51.2 2013-10-07 13:49:55 +02:00
Anatol Belski 4840b0a749 fixed failing tests for ICU >= 51.2 2013-10-07 13:49:10 +02:00
ArunSK b5a0f12871 fixing a minor typo in CODING_STANDARDS document 2013-10-07 00:26:49 +02:00
Stanley Sufficool fa40290fb7 FIX BUG #65219 - Typo correction 2013-10-05 21:00:47 -07:00
Stanley Sufficool 63f242178d FIX BUG #65219 - Typo correction 2013-10-05 20:59:20 -07:00
Stanley Sufficool 5ce23f39d5 FIX BUG #65219 - USE DB not being sent for FreeTDS version < 0.92
FreeTDS <0.92 does not support DBSETLDBNAME option and therefore
will not work with SQL Azure. Fallback to dbuse command in
letter versions.
2013-10-05 10:06:42 -07:00
Stanley Sufficool d74b9cfee5 Merge branch 'PHP-5.4' of https://git.php.net/push/php-src into PHP-5.4
* 'PHP-5.4' of https://git.php.net/push/php-src:
  - Fixed bug #65818 (Segfault with built-in webserver and chunked transfer encoding)
  - BFN
  Fix bug #65667: ftp_nb_continue produces segfault
  fix bug #64146 (serialize incorrectly saving objects when they are cloned)
  such a weird hack probably helps in finding regressions in the future
  Fixed bug #64230 (XMLReader does not suppress errors)
  typo: really fix bug #51936 	Crash with clone xmlreader
  fix bug #59613 (Crash with clone XMLReader)
  fix bug #65808 	the socket_connect() won't work with IPv6 address
  5.4.22-dev now
  fix bug #62396 'make test' crashes starting with 5.3.14 (missing gzencode())
  Fixed bug #61548
  fix test
  fix memleak on resetting rebind_proc
  Fix bug #65322: compile time errors won't trigger auto loading
  5.4.20 release date
  Add information about which INI file is which inside respective files
  - Updated to version 2013.6 (2013f)
2013-10-05 09:57:13 -07:00
Stanley Sufficool 690bbe170d FIX BUG #65219 - USE DB not being sent for FreeTDS version < 0.92
FreeTDS <0.92 does not support DBSETLDBNAME option and therefore
will not work with SQL Azure. Fallback to dbuse command in
letter versions.
2013-10-05 09:54:45 -07:00
Felipe Pena 93f3ba66a7 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  - Fixed bug #65818 (Segfault with built-in webserver and chunked transfer encoding)
  - BFN
2013-10-05 12:53:10 -03:00
Felipe Pena 3aaee86ee3 - Fixed bug #65818 (Segfault with built-in webserver and chunked transfer encoding) 2013-10-05 12:52:55 -03:00
Felipe Pena 248afd1c3c - BFN 2013-10-05 12:52:32 -03:00
Christopher Jones 5bc377457e Allow the ldap extension to be compiled with Oracle's LDAP
implementation, if desired.  Note the implementations differ so you
will see different ldap behavior.

The patch allows configuration similar to:
--with-ldap=$HOME/instantclient --with-oci8=instantclient,$HOME/instantclient

The patch doesn't support configuration similar to:
--with-ldap --with-oci8=instantclient,$HOME/instantclient
since this would try and mix the default LDAP and Oracle LDAP
implementations.

This patch closes out bug #61450 and the associated github PR.

Regardless of this patch, my recommended way to install both OCI8 and
ldap extensions is to statically configure PHP with ldap, and then add
OCI8 as a shared extension from PECL.
2013-10-04 15:50:16 -07:00
Christopher Jones fb6f5d2e2d Merge branch 'PHP-5.5' of https://git.php.net/repository/php-src into PHP-5.5
* 'PHP-5.5' of https://git.php.net/repository/php-src:
  Fix bug #65667: ftp_nb_continue produces segfault
  fix bug #64146 (serialize incorrectly saving objects when they are cloned)
  such a weird hack probably helps in finding regressions in the future
2013-10-04 10:51:04 -07:00
Christopher Jones 6a823071f9 Merge branch 'PHP-5.4' of https://git.php.net/repository/php-src into PHP-5.4
* 'PHP-5.4' of https://git.php.net/repository/php-src:
  Fix bug #65667: ftp_nb_continue produces segfault
  fix bug #64146 (serialize incorrectly saving objects when they are cloned)
  such a weird hack probably helps in finding regressions in the future
2013-10-04 10:50:53 -07:00
Nikita Popov 90f0a77cad Merge branch 'PHP-5.4' into PHP-5.5 2013-10-04 17:26:35 +02:00
Philip Hofstetter 96cc419924 Fix bug #65667: ftp_nb_continue produces segfault
the idea behind ftp_nb_get is for it to be followed by multiple calls
to ftp_nb_continue in order to download a file piece-by-piece.

As such, it's unwise to close the stream used to write the downloaded
data to when the file hasn't been completely downloaded within the first
call to ftp_nb_get.

This regression was added in a93a462dce
and this patch restores the behavior that was seen pre-patch.
2013-10-04 17:25:46 +02:00
Michael Wallner d72a4d1634 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fix bug #64146 (serialize incorrectly saving objects when they are cloned)
2013-10-04 16:17:37 +02:00
Michael Wallner 8973390541 fix bug #64146 (serialize incorrectly saving objects when they are
cloned)
2013-10-04 16:16:15 +02:00
Michael Wallner adfb5ab7ce Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  such a weird hack probably helps in finding regressions in the future
2013-10-04 16:12:23 +02:00
Michael Wallner e8ae795529 such a weird hack probably helps in finding regressions in the future 2013-10-04 16:11:49 +02:00
Christopher Jones 366491c1ce Merge branch 'PHP-5.5' of https://git.php.net/repository/php-src into PHP-5.5
* 'PHP-5.5' of https://git.php.net/repository/php-src:
  Fix bug #65821: By-ref foreach on property access of string offset segfaults
  Fixed bug #64230 (XMLReader does not suppress errors)
2013-10-04 05:40:43 -07:00
Christopher Jones 76d2d474be Merge branch 'PHP-5.4' of https://git.php.net/repository/php-src into PHP-5.4
* 'PHP-5.4' of https://git.php.net/repository/php-src:
  Fixed bug #64230 (XMLReader does not suppress errors)
2013-10-04 05:40:30 -07:00
Nikita Popov 536260f2c5 Fix bug #65821: By-ref foreach on property access of string offset segfaults
This removes the now unnecessary ZEND_FETCH_ADD_LOCK on the
container of a property fetch of a by-reference foreach.
2013-10-04 13:13:46 +02:00
Michael Wallner 2e2bda3508 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed bug #64230 (XMLReader does not suppress errors)
2013-10-04 11:22:43 +02:00
Michael Wallner f6ff3a28d6 Fixed bug #64230 (XMLReader does not suppress errors) 2013-10-04 11:22:17 +02:00
Christopher Jones 2e2636dcc5 Merge branch 'PHP-5.5' of https://git.php.net/repository/php-src into PHP-5.5
* 'PHP-5.5' of https://git.php.net/repository/php-src:
  typo: really fix bug #51936 	Crash with clone xmlreader
  fix bug #59613 (Crash with clone XMLReader)
  Fix Bug #60633 build warning in bcmath
  fix bug #65808 	the socket_connect() won't work with IPv6 address
  5.4.22-dev now
2013-10-03 05:40:31 -07:00
Christopher Jones 545363cce0 Merge branch 'PHP-5.4' of https://git.php.net/repository/php-src into PHP-5.4
* 'PHP-5.4' of https://git.php.net/repository/php-src:
  typo: really fix bug #51936 	Crash with clone xmlreader
  fix bug #59613 (Crash with clone XMLReader)
  fix bug #65808 	the socket_connect() won't work with IPv6 address
2013-10-03 05:40:24 -07:00
Michael Wallner 92fd085ebf Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  typo: really fix bug #51936 	Crash with clone xmlreader
2013-10-03 13:35:00 +02:00
Michael Wallner dc3d360a0f typo: really fix bug #51936 Crash with clone xmlreader 2013-10-03 13:34:31 +02:00
Michael Wallner 86f2b33629 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fix bug #59613 (Crash with clone XMLReader)
2013-10-03 13:29:18 +02:00
Michael Wallner fc3f8a8f54 fix bug #59613 (Crash with clone XMLReader) 2013-10-03 13:28:41 +02:00
Remi Collet 60d9175280 Fix Bug #60633 build warning in bcmath 2013-10-03 08:45:31 +02:00
Michael Wallner 2ba3926815 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fix bug #65808 	the socket_connect() won't work with IPv6 address
  5.4.22-dev now

Conflicts:
	configure.in
	ext/sockets/sockets.c
	main/php_version.h
2013-10-02 15:55:38 +02:00
Michael Wallner 9209c19f8f fix bug #65808 the socket_connect() won't work with IPv6 address 2013-10-02 15:19:25 +02:00
Christopher Jones 6cd0bd82dc Merge branch 'PHP-5.5' of https://git.php.net/repository/php-src into PHP-5.5
* 'PHP-5.5' of https://git.php.net/repository/php-src:
  Revert "Make 'make distclean' remove the downloaded pear PHAR"
  fix bug #62396 'make test' crashes starting with 5.3.14 (missing gzencode())
2013-10-02 05:40:42 -07:00
Christopher Jones dbe2d7745f Merge branch 'PHP-5.4' of https://git.php.net/repository/php-src into PHP-5.4
* 'PHP-5.4' of https://git.php.net/repository/php-src:
  5.4.22-dev now
  fix bug #62396 'make test' crashes starting with 5.3.14 (missing gzencode())
2013-10-02 05:40:33 -07:00
Stanislav Malyshev b2f8f35a88 5.4.22-dev now 2013-10-01 22:25:56 -07:00
Christopher Jones 60e38b3243 Revert "Make 'make distclean' remove the downloaded pear PHAR"
This reverts commit d7baf0427f.
2013-10-01 10:33:39 -07:00
Christopher Jones ec5b87c50d Merge branch 'PHP-5.5' of https://git.php.net/repository/php-src into PHP-5.5
# By Michael Wallner (2) and Dmitry Stogov (1)
# Via Michael Wallner (3) and Christopher Jones (1)
* 'PHP-5.5' of https://git.php.net/repository/php-src:
  fix bug #62396 'make test' crashes starting with 5.3.14 (missing gzencode())
  Fixed bug #61548
  Reverted patch (it was used for internal testing and was committed by accident)
2013-10-01 10:19:40 -07:00
Christopher Jones 33fd0e0b78 Merge branch 'PHP-5.4' of https://git.php.net/repository/php-src into PHP-5.4
# By Michael Wallner
# Via Michael Wallner
* 'PHP-5.4' of https://git.php.net/repository/php-src:
  fix bug #62396 'make test' crashes starting with 5.3.14 (missing gzencode())
  Fixed bug #61548
2013-10-01 10:19:24 -07:00
Michael Wallner 4b61203b01 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fix bug #62396 'make test' crashes starting with 5.3.14 (missing gzencode())
2013-10-01 17:01:44 +02:00
Michael Wallner cd1cab3f47 fix bug #62396 'make test' crashes starting with 5.3.14
(missing gzencode())
2013-10-01 17:01:03 +02:00
Christopher Jones d56850aaff Merge branch 'PHP-5.5' of https://git.php.net/repository/php-src into PHP-5.5
* 'PHP-5.5' of https://git.php.net/repository/php-src:
  Fixed bug #61548
  Reverted patch (it was used for internal testing and was committed by accident)
2013-10-01 05:40:28 -07:00
Christopher Jones 930946005e Merge branch 'PHP-5.4' of https://git.php.net/repository/php-src into PHP-5.4
* 'PHP-5.4' of https://git.php.net/repository/php-src:
  Fixed bug #61548
2013-10-01 05:40:24 -07:00
Michael Wallner ad139d9a00 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed bug #61548
2013-10-01 11:08:20 +02:00
Michael Wallner 18b04b480e Fixed bug #61548 2013-10-01 11:07:55 +02:00
Dmitry Stogov 51fca2b4b3 Reverted patch (it was used for internal testing and was committed by accident) 2013-10-01 11:32:11 +04:00
Christopher Jones aeb6e9c264 Merge branch 'PHP-5.5' of https://git.php.net/repository/php-src into PHP-5.5
# By Michael Wallner (2) and others
# Via Christopher Jones (4) and others
* 'PHP-5.5' of https://git.php.net/repository/php-src:
  Make 'make distclean' remove the downloaded pear PHAR
  fix test
  fix memleak on resetting rebind_proc
  Fix bug #64979: Wrong behavior of static variables in closure generators
  Fix bug #65322: compile time errors won't trigger auto loading
  5.5.4 release date
  5.4.20 release date
2013-09-30 15:54:36 -07:00
Christopher Jones 679bf479b6 Merge branch 'PHP-5.4' of https://git.php.net/repository/php-src into PHP-5.4
# By Michael Wallner (2) and others
# Via Michael Wallner
* 'PHP-5.4' of https://git.php.net/repository/php-src:
  fix test
  fix memleak on resetting rebind_proc
  Fix bug #65322: compile time errors won't trigger auto loading
  5.4.20 release date
2013-09-30 15:54:34 -07:00
Christopher Jones d7baf0427f Make 'make distclean' remove the downloaded pear PHAR 2013-09-30 15:46:22 -07:00
Michael Wallner d4d6a95105 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fix test
  fix memleak on resetting rebind_proc
2013-09-30 14:04:48 +02:00
Michael Wallner 2b78edfba2 fix test 2013-09-30 11:41:35 +02:00
Michael Wallner e9e63f9223 fix memleak on resetting rebind_proc 2013-09-30 11:23:33 +02:00
Nikita Popov 6b68f44e6b Fix bug #64979: Wrong behavior of static variables in closure generators 2013-09-29 20:18:12 +02:00
Nikita Popov 1d1fb69c8b Merge branch 'PHP-5.4' into PHP-5.5 2013-09-29 18:01:18 +02:00
Nikita Popov f0c926564c Fix bug #65322: compile time errors won't trigger auto loading
Also fixes duplicate bugs #54054 and #42098.

Furthermore this fixes incorrect error messages thrown from code
running inside an error handler when a compilation is in progress.
The error file and line are now correctly associated with the
file/line of the executor, rather than the compiler.
2013-09-29 17:58:25 +02:00
Stanislav Malyshev f0c1ea1d2e 5.5.4 release date 2013-09-28 18:06:15 -07:00
Stanislav Malyshev c91a638ed7 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  5.4.20 release date
2013-09-28 18:05:38 -07:00
Stanislav Malyshev d143c2b60f 5.4.20 release date 2013-09-28 18:04:44 -07:00
Christopher Jones 0eb414e2a5 Merge branch 'PHP-5.5' of https://git.php.net/repository/php-src into PHP-5.5
# By Dmitry Stogov (2) and others
# Via Lior Kaplan (2) and others
* 'PHP-5.5' of https://git.php.net/repository/php-src:
  Add information about which INI file is which inside respective files
  Removed references to "Zend Support"
  Added support for GNU Hurd. (Svante Signell)
  - Updated to version 2013.6 (2013f)
  FIX BUG #48539 - Disable TEXTLIMIT for FreeTDS driver
2013-09-27 15:57:08 -07:00
Christopher Jones 7e35004e39 Merge branch 'PHP-5.4' of https://git.php.net/repository/php-src into PHP-5.4
# By Derick Rethans (1) and others
# Via Lior Kaplan (1) and Stanley Sufficool (1)
* 'PHP-5.4' of https://git.php.net/repository/php-src:
  Add information about which INI file is which inside respective files
  - Updated to version 2013.6 (2013f)
  FIX BUG #48539 - Disable TEXTLIMIT for FreeTDS driver
2013-09-27 15:57:04 -07:00
Lior Kaplan e98fc7de52 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Add information about which INI file is which inside respective files
2013-09-27 17:50:03 +02:00
Ondřej Surý 0ad0a2f56e Add information about which INI file is which inside respective files 2013-09-27 17:46:14 +02:00
Dmitry Stogov 80346690ba Removed references to "Zend Support" 2013-09-27 14:01:07 +04:00
Dmitry Stogov f904830012 Added support for GNU Hurd. (Svante Signell) 2013-09-27 13:43:25 +04:00
Derick Rethans ea0f832f10 Merge branch 'PHP-5.4' into PHP-5.5 2013-09-27 10:14:47 +01:00
Derick Rethans 7a1a1aec8c - Updated to version 2013.6 (2013f) 2013-09-27 10:14:46 +01:00
Stanley Sufficool 577b10b214 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  FIX BUG #48539 - Disable TEXTLIMIT for FreeTDS driver
2013-09-26 20:16:28 -07:00
Stanley Sufficool ac05cfb499 FIX BUG #48539 - Disable TEXTLIMIT for FreeTDS driver 2013-09-26 19:53:47 -07:00
Stanley Sufficool 9aa904c375 Merge branch 'PHP-5.4' of https://git.php.net/push/php-src into PHP-5.4
* 'PHP-5.4' of https://git.php.net/push/php-src: (140 commits)
  Copy dba_*() keys before converting to string.
  Fix the broken sh syntax in ext/imap/config.m4.
  Revert "EmptyIterator now implements Countable; fixes bug 60577"
  RFC 6598 reserved ip range starts at 100.64.0.0
  fix a very rare case of use of uninitialized value combined with a memleak
  NEWS for added reserved ip addresses according to RFC 6598
  Add RFC 6598 IPs to reserved addresses
  NEWS for #60577
  NEWS for bug #64441
  Fix bug #64441 (FILTER_VALIDATE_URL rejects fully qualified domain names)
  EmptyIterator now implements Countable; fixes bug 60577
  News for bugfix #64157
  Bug 64157 Changed error message to make sense
  Tinker with the wording of the short_open_tag description.
  Handle CLI server request headers case insensitively.
  5.4.21 now
  Typo....
  Add a XFAIL test for #64896
  Fixed Bug #65564 stack-buffer-overflow in DateTimeZone stuff caught by AddressSanitizer
  Fixed bug #60598 (cli/apache sapi segfault on objects manipulation)
  ...
2013-09-26 19:52:01 -07:00
Christopher Jones 9a655fcb18 Merge branch 'PHP-5.5' of https://git.php.net/repository/php-src into PHP-5.5
# By Dmitry Stogov (2) and others
# Via Adam Harvey (1) and Dmitry Stogov (1)
* 'PHP-5.5' of https://git.php.net/repository/php-src:
  Added function opcache_compile_file() to load PHP scripts into cache without execution.
  Fixed issue #135 (segfault in interned strings if initial memory is too low)
  Make message and format arguments const char * to avoid build warning about invalid cast.
  Copy dba_*() keys before converting to string.
2013-09-26 09:57:32 -07:00
Christopher Jones b4b4372c88 Merge branch 'PHP-5.4' of https://git.php.net/repository/php-src into PHP-5.4
# By Adam Harvey
# Via Adam Harvey
* 'PHP-5.4' of https://git.php.net/repository/php-src:
  Copy dba_*() keys before converting to string.
2013-09-26 09:57:30 -07:00
Dmitry Stogov 69454d9f0f Added function opcache_compile_file() to load PHP scripts into cache without execution. 2013-09-25 12:14:06 +04:00
Dmitry Stogov dc8705c256 Fixed issue #135 (segfault in interned strings if initial memory is too low) 2013-09-25 11:02:39 +04:00
Remi Collet f7eff9cd41 Make message and format arguments const char * to avoid
build warning about invalid cast.
2013-09-23 13:21:57 +02:00
Adam Harvey a92a350cce Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Copy dba_*() keys before converting to string.
2013-09-22 16:52:41 -07:00
Adam Harvey 30e0442c54 Copy dba_*() keys before converting to string.
A nice Sunday afternoon project for somebody would be to refactor the dba
functions to use zend_parse_parameters() reliably and try to untangle some of
the macros in dba.c. Sadly, it is not a nice Sunday afternoon here.

Fixes bug #65708 (dba functions cast $key param to string in-place, bypassing
copy on write).
2013-09-22 16:46:17 -07:00
Christopher Jones 9bf997c1db Merge branch 'PHP-5.5' of https://git.php.net/repository/php-src into PHP-5.5
# By Adam Harvey (1) and Anatol Belski (1)
# Via Adam Harvey (2) and Christopher Jones (2)
* 'PHP-5.5' of https://git.php.net/repository/php-src:
  Fix the broken sh syntax in ext/imap/config.m4.
  Fixed bug #65678 the test cli_process_title_windows will fails on particular environnement
2013-09-20 17:09:50 -07:00
Christopher Jones 34fc79bd61 Merge branch 'PHP-5.4' of https://git.php.net/repository/php-src into PHP-5.4
# By Adam Harvey
# Via Adam Harvey
* 'PHP-5.4' of https://git.php.net/repository/php-src:
  Fix the broken sh syntax in ext/imap/config.m4.
2013-09-20 17:09:47 -07:00
Adam Harvey 3f64d35559 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix the broken sh syntax in ext/imap/config.m4.
2013-09-20 14:19:01 -07:00
Adam Harvey cc66eaa04b Fix the broken sh syntax in ext/imap/config.m4.
Patch by ryotakatsuki at gmail dot com. Fixes bug #65721 (configure script
broken in 5.5.4 and 5.4.20 when enabling imap).
2013-09-20 14:15:19 -07:00
Anatol Belski 8f146c2bb0 Fixed bug #65678 the test cli_process_title_windows will fails on particular environnement
Patch by Pierre Renaudet
2013-09-20 15:59:33 +02:00
Christopher Jones dfa43d55dd Added application/pdf to PHP CLI Web Server mime types. 2013-09-19 20:22:50 -07:00
Christopher Jones c2b8a72673 Merge branch 'PHP-5.5' of https://git.php.net/repository/php-src into PHP-5.5
# By David Soria Parra (6) and others
# Via David Soria Parra (5) and Michael Wallner (1)
* 'PHP-5.5' of https://git.php.net/repository/php-src:
  Revert "EmptyIterator now implements Countable; fixes bug 60577"
  RFC 6598 reserved ip range starts at 100.64.0.0
  fix a very rare case of use of uninitialized value combined with a memleak
  NEWS for added reserved ip addresses according to RFC 6598
  Add RFC 6598 IPs to reserved addresses
  NEWS for #60577
  NEWS for bug #64441
  Fix bug #64441 (FILTER_VALIDATE_URL rejects fully qualified domain names)
  EmptyIterator now implements Countable; fixes bug 60577
  News for bugfix #64157
  Bug 64157 Changed error message to make sense
2013-09-18 19:49:36 -07:00
Christopher Jones d5ba2d8a99 Merge branch 'PHP-5.4' of https://git.php.net/repository/php-src into PHP-5.4
# By David Soria Parra (6) and others
# Via David Soria Parra
* 'PHP-5.4' of https://git.php.net/repository/php-src:
  Revert "EmptyIterator now implements Countable; fixes bug 60577"
  RFC 6598 reserved ip range starts at 100.64.0.0
  fix a very rare case of use of uninitialized value combined with a memleak
  NEWS for added reserved ip addresses according to RFC 6598
  Add RFC 6598 IPs to reserved addresses
  NEWS for #60577
  NEWS for bug #64441
  Fix bug #64441 (FILTER_VALIDATE_URL rejects fully qualified domain names)
  EmptyIterator now implements Countable; fixes bug 60577
  News for bugfix #64157
  Bug 64157 Changed error message to make sense
2013-09-18 19:49:30 -07:00
David Soria Parra 94e4c4df86 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Revert "EmptyIterator now implements Countable; fixes bug 60577"
2013-09-18 15:06:51 +02:00
David Soria Parra 7a24ee13ec Revert "EmptyIterator now implements Countable; fixes bug 60577"
This reverts commit 8a936e8eb9.
2013-09-18 15:06:36 +02:00
David Soria Parra 2eb5661886 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  RFC 6598 reserved ip range starts at 100.64.0.0
2013-09-18 14:28:57 +02:00
David Soria Parra 7e9044b6a2 RFC 6598 reserved ip range starts at 100.64.0.0 2013-09-18 14:27:58 +02:00
Michael Wallner a34b141e08 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fix a very rare case of use of uninitialized value combined with a memleak
2013-09-18 11:12:11 +02:00
Michael Wallner 9bfd55cda3 fix a very rare case of use of uninitialized value combined with a
memleak
2013-09-18 11:10:55 +02:00
Andrea Faulds 2524428504 Fixed whitespace part of bug #64874 ("json_decode handles whitespace and case-sensitivity incorrectly") 2013-09-17 19:09:52 +00:00
David Soria Parra 5e3da04fb0 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  NEWS for added reserved ip addresses according to RFC 6598
  Add RFC 6598 IPs to reserved addresses
2013-09-17 09:55:03 +02:00
David Soria Parra dfd7d1063a NEWS for added reserved ip addresses according to RFC 6598 2013-09-17 09:54:58 +02:00
Sebastian Nohn 7c279df6ae Add RFC 6598 IPs to reserved addresses
(cherry picked from commit b3f5b822e9f83d99d7cb5eed36ba8d307d1408ee)
2013-09-17 09:52:53 +02:00
David Soria Parra 3d6ac70e66 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  NEWS for #60577
  NEWS for bug #64441
  Fix bug #64441 (FILTER_VALIDATE_URL rejects fully qualified domain names)
  EmptyIterator now implements Countable; fixes bug 60577
  News for bugfix #64157
  Bug 64157 Changed error message to make sense
2013-09-16 23:36:37 +02:00
Christopher Jones e06a712c90 Merge branch 'PHP-5.5' of https://git.php.net/repository/php-src into PHP-5.5
# By Xinchen Hui (2) and Michael Wallner (1)
# Via Michael Wallner
* 'PHP-5.5' of https://git.php.net/repository/php-src:
  double test timeout for travis
  Add test for ISSUE #128
  Fixed bug #65665 (Exception not properly caught when opcache enabled)
2013-09-16 10:21:22 -07:00
David Soria Parra 6a0b90da84 NEWS for #60577 2013-09-16 16:23:29 +02:00
David Soria Parra 1939d9e3db NEWS for bug #64441 2013-09-16 16:21:35 +02:00
Michael Wallner b5283b9b7a double test timeout for travis 2013-09-16 09:35:08 +02:00
Xinchen Hui 1916aaa272 Add test for ISSUE #128 2013-09-16 14:58:18 +08:00
Xinchen Hui 46f18ccf0d Fixed bug #65665 (Exception not properly caught when opcache enabled) 2013-09-16 14:43:01 +08:00
Alex Bobrov 18b54a2366 Fix bug #64441 (FILTER_VALIDATE_URL rejects fully qualified domain names)
(cherry picked from commit c149d4ee4be81ecf005eafd43ede06e70aa4c985)
2013-09-16 05:23:52 +02:00
Levi Morrison 8a936e8eb9 EmptyIterator now implements Countable; fixes bug 60577
(cherry picked from commit 6398844c86bee08abe4ee3f206ecd86ad0a498f9)
2013-09-16 04:04:53 +02:00
David Soria Parra c0afe829e3 News for bugfix #64157 2013-09-16 04:04:51 +02:00
Boro Sitnikovski a475b2c1db Bug 64157
Changed error message to make sense
2013-09-16 03:42:49 +02:00
Christopher Jones d52dbd569f Merge branch 'PHP-5.5' of https://git.php.net/repository/php-src into PHP-5.5
# By Adam Harvey (3) and others
# Via Adam Harvey (2) and Michael Wallner (1)
* 'PHP-5.5' of https://git.php.net/repository/php-src:
  fix broken sha2 configure tests
  Fixed minor bug in test.
  Move NEWS entries to correct version
  Fix bug #64782: SplFileObject constructor make $context optional
  Fix bug #65502: DateTimeImmutable::createFromFormat returns DateTime
  Fix bug #65548: Comparison for DateTimeImmutable doesn't work
  Tinker with the wording of the short_open_tag description.
  Fix NEWS: these commits were after 5.5.4 was branched and will be in 5.5.5.
  Handle CLI server request headers case insensitively.
  ensure that the defined interpolation method is used by the generic scaling functions
  Fixed issue #128 (opcache_invalidate segmentation fault)
  5.4.21 now
2013-09-13 14:10:53 -07:00
Christopher Jones 7bb8cbcdee Merge branch 'PHP-5.4' of https://git.php.net/repository/php-src into PHP-5.4
# By Adam Harvey
# Via Adam Harvey
* 'PHP-5.4' of https://git.php.net/repository/php-src:
  Tinker with the wording of the short_open_tag description.
  Handle CLI server request headers case insensitively.
2013-09-13 14:10:50 -07:00
Michael Wallner 9eaffd34c1 fix broken sha2 configure tests
see http://patch-tracker.debian.org/patch/series/view/php5/5.5.3+dfsg-1/fix_broken_sha2_test.patch
2013-09-13 12:56:26 +02:00
Levi Morrison d76959a3b9 Fixed minor bug in test. 2013-09-12 23:29:52 +02:00
Nikita Popov 506a61549f Move NEWS entries to correct version
Accidentially inserted NEWS entries in previous release.
2013-09-12 18:24:58 +02:00
Nikita Popov ad976d8240 Fix bug #64782: SplFileObject constructor make $context optional 2013-09-12 17:46:14 +02:00
Boro Sitnikovski 165f544ae9 Fix bug #65502: DateTimeImmutable::createFromFormat returns DateTime
DateTimeImmutable::createFromFormat should call
date_create_immutable_from_format instead of date_create_from_format
2013-09-12 15:21:45 +02:00
Boro Sitnikovski d7f5f1ef35 Fix bug #65548: Comparison for DateTimeImmutable doesn't work 2013-09-12 15:12:16 +02:00
Adam Harvey d209c362d2 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Tinker with the wording of the short_open_tag description.
2013-09-09 16:58:35 -07:00
Adam Harvey 160cd8d0a7 Tinker with the wording of the short_open_tag description.
I'm still not thrilled with this, but it's a bit better and addresses the
issues noted in bug #65644. Plus, it now mentions the decoupling of <?=.
2013-09-09 16:56:57 -07:00
Adam Harvey 144f2f1773 Fix NEWS: these commits were after 5.5.4 was branched and will be in 5.5.5. 2013-09-09 16:46:14 -07:00
Adam Harvey 8b6270271e Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Handle CLI server request headers case insensitively.
  5.4.21 now

Conflicts:
	configure.in
	main/php_version.h
2013-09-09 16:32:16 -07:00
Adam Harvey 3c3b2b5bdc Handle CLI server request headers case insensitively.
Fixes bug #65633 (built-in server treat some http headers as case-sensitive).
2013-09-09 16:24:49 -07:00
unknown b54b6e30a4 ensure that the defined interpolation method is used by the generic scaling functions 2013-09-09 11:56:05 +02:00
Dmitry Stogov 8d860c1218 Fixed issue #128 (opcache_invalidate segmentation fault) 2013-09-09 10:05:59 +04:00
Christopher Jones e5678c9b95 Merge branch 'PHP-5.5' of https://git.php.net/repository/php-src into PHP-5.5
* 'PHP-5.5' of https://git.php.net/repository/php-src:
2013-09-06 11:05:08 -07:00
Christopher Jones 768c776d30 Merge branch 'PHP-5.5' of https://git.php.net/repository/php-src into PHP-5.5
# By Julien Pauli
# Via Julien Pauli
* 'PHP-5.5' of https://git.php.net/repository/php-src:
  5.5.5 now
2013-09-05 10:49:21 -07:00
Christopher Jones fc9d886f6c Merge branch 'PHP-5.5' of https://git.php.net/repository/php-src into PHP-5.5
* 'PHP-5.5' of https://git.php.net/repository/php-src:
  5.5.5 now
2013-09-04 05:40:24 -07:00
Julien Pauli 0e10f26e27 5.5.5 now 2013-09-04 11:22:23 +02:00
Stanislav Malyshev 7beef74a82 5.4.21 now 2013-09-03 13:38:15 -07:00
Christopher Jones 2452e7b680 Merge branch 'PHP-5.5' of https://git.php.net/repository/php-src into PHP-5.5
* 'PHP-5.5' of https://git.php.net/repository/php-src:
  Typo....
  Add a XFAIL test for #64896
2013-09-02 05:40:40 -07:00
Xinchen Hui b2ee1b629e Merge branch 'PHP-5.4' into PHP-5.5 2013-09-02 16:16:07 +08:00
Xinchen Hui 6c48c6bc78 Typo.... 2013-09-02 16:15:52 +08:00
Xinchen Hui dd1cbd140b Merge branch 'PHP-5.4' into PHP-5.5 2013-09-02 16:02:59 +08:00
Xinchen Hui ed038d2ee3 Add a XFAIL test for #64896 2013-09-02 16:02:24 +08:00
Christopher Jones c8b0da6ef7 Merge branch 'PHP-5.5' of https://git.php.net/repository/php-src into PHP-5.5
* 'PHP-5.5' of https://git.php.net/repository/php-src:
  Fixed bug #65564 stack-buffer-overflow in DateTimeZone stuff caught by AddressSanitizer
  Fixed Bug #65564 stack-buffer-overflow in DateTimeZone stuff caught by AddressSanitizer
  Update NEWS
  Fixed bug #60598 (cli/apache sapi segfault on objects manipulation)
2013-08-30 05:40:30 -07:00
Christopher Jones bfb1fe10cb Merge branch 'PHP-5.4' of https://git.php.net/repository/php-src into PHP-5.4
* 'PHP-5.4' of https://git.php.net/repository/php-src:
  Fixed Bug #65564 stack-buffer-overflow in DateTimeZone stuff caught by AddressSanitizer
  Fixed bug #60598 (cli/apache sapi segfault on objects manipulation)
2013-08-30 05:40:24 -07:00
Remi Collet 6fab1caa41 Fixed bug #65564 stack-buffer-overflow in DateTimeZone stuff caught by AddressSanitizer 2013-08-30 10:45:33 +02:00
Remi Collet a5749eb0cb Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed Bug #65564 stack-buffer-overflow in DateTimeZone stuff caught by AddressSanitizer
2013-08-30 10:43:12 +02:00
Remi Collet d69513afec Fixed Bug #65564 stack-buffer-overflow in DateTimeZone stuff caught by AddressSanitizer 2013-08-30 10:42:08 +02:00
Xinchen Hui 4e3de606b5 Update NEWS 2013-08-30 11:22:58 +08:00
Xinchen Hui e4fe53e200 Merge branch 'PHP-5.4' into PHP-5.5 2013-08-30 11:20:46 +08:00
Xinchen Hui 7da6498342 Fixed bug #60598 (cli/apache sapi segfault on objects manipulation) 2013-08-30 11:20:24 +08:00
Christopher Jones a4ff610e1c Merge branch 'PHP-5.5' of https://git.php.net/repository/php-src into PHP-5.5
* 'PHP-5.5' of https://git.php.net/repository/php-src:
  Fixed bug #65510 (5.5.2 crashes in _get_zval_ptr_ptr_var)
  Fixed bug #61759 (class_alias() should accept classes with leading backslashes). (Julien)
  Fixed bug #61759 (class_alias() should accept classes with leading backslashes). (Julien)
  Fixed compatibility with php-5.2
  Fixed bug #65561 (Zend Opcache on Solaris 11 x86 needs ZEND_MM_ALIGNMENT=4). (Terry Ellison)
  Avoid compiler warning
  Fix bug #65579 (Using traits with get_class_methods causes segfault).
2013-08-29 05:40:27 -07:00
Christopher Jones 5bff1286b6 Merge branch 'PHP-5.4' of https://git.php.net/repository/php-src into PHP-5.4
* 'PHP-5.4' of https://git.php.net/repository/php-src:
  Fixed bug #61759 (class_alias() should accept classes with leading backslashes). (Julien)
  Fixed bug #61759 (class_alias() should accept classes with leading backslashes). (Julien)
  Avoid compiler warning
  Fix bug #65579 (Using traits with get_class_methods causes segfault).
2013-08-29 05:40:23 -07:00
Dmitry Stogov 5015c4af6c Fixed bug #65510 (5.5.2 crashes in _get_zval_ptr_ptr_var) 2013-08-29 11:56:01 +04:00
Dmitry Stogov 0f3977bc0f Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed bug #61759 (class_alias() should accept classes with leading backslashes). (Julien)
  Fixed bug #61759 (class_alias() should accept classes with leading backslashes). (Julien)

Conflicts:
	NEWS
2013-08-29 11:19:02 +04:00
Dmitry Stogov dfc6feb6e8 Fixed bug #61759 (class_alias() should accept classes with leading backslashes). (Julien) 2013-08-29 11:16:56 +04:00
Dmitry Stogov 15694f66b2 Fixed bug #61759 (class_alias() should accept classes with leading backslashes). (Julien) 2013-08-29 11:12:06 +04:00
Dmitry Stogov 94816ed9bf Fixed compatibility with php-5.2 2013-08-29 10:44:07 +04:00
Dmitry Stogov 632f733ce4 Merge branch 'PHP-5.5' of git.php.net:php-src into PHP-5.5
* 'PHP-5.5' of git.php.net:php-src:
  Avoid compiler warning
  Fix bug #65579 (Using traits with get_class_methods causes segfault).
2013-08-29 10:32:21 +04:00
Dmitry Stogov 790db9ff9b Fixed bug #65561 (Zend Opcache on Solaris 11 x86 needs ZEND_MM_ALIGNMENT=4). (Terry Ellison) 2013-08-29 10:29:48 +04:00
Xinchen Hui e356d790cc Merge branch 'PHP-5.4' into PHP-5.5 2013-08-29 14:02:34 +08:00
Xinchen Hui 747daa5354 Avoid compiler warning 2013-08-29 14:02:15 +08:00
Xinchen Hui f0cb67402f Merge branch 'PHP-5.4' into PHP-5.5 2013-08-29 14:01:54 +08:00
Adam Harvey 72027cd084 Fix bug #65579 (Using traits with get_class_methods causes segfault).
Specifically, this checks if there are trait aliases defined in the class scope
before attempting to dereference the first trait alias. This handles the case
where a trait alias was used in a child trait but no aliases exist in the
concrete class.
2013-08-28 20:33:42 -07:00
Christopher Jones 3697584e05 Merge branch 'PHP-5.5' of https://git.php.net/repository/php-src into PHP-5.5
* 'PHP-5.5' of https://git.php.net/repository/php-src:
  removed the /Wp64 switch as we use true 64 bit compiler now
  updated lib versions
  updated lib versions, the vc11 ones only matter now
2013-08-28 11:14:37 -07:00
Christopher Jones 1fdcc705a4 Merge branch 'PHP-5.4' of https://git.php.net/repository/php-src into PHP-5.4
* 'PHP-5.4' of https://git.php.net/repository/php-src:
  updated lib versions
2013-08-28 11:14:29 -07:00
Anatol Belski bd677b43a7 removed the /Wp64 switch as we use true 64 bit compiler now 2013-08-28 15:10:05 +02:00
Anatol Belski 5a525bc823 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  updated lib versions
2013-08-28 14:43:36 +02:00
Anatol Belski 3745bdadc0 updated lib versions 2013-08-28 14:43:00 +02:00
Anatol Belski 51016262a7 updated lib versions, the vc11 ones only matter now 2013-08-28 14:25:39 +02:00
Xinchen Hui 0119bbba6b Fixed compiler warnings
warning: 'local_dval' may be used uninitialized in this function
[-Wmaybe-uninitialized]

warning: 'dval2' may be used uninitialized in this function
[-Wmaybe-uninitialized]
2013-08-27 15:44:30 +08:00
Dmitry Stogov 1c67a9940a Fixed compilation warning 2013-08-26 09:48:10 +04:00
Stanislav Malyshev 825a505494 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix bug #65554 in DateTime, when use it with D/l in format and textual day have dot at the end

Conflicts:
	ext/date/lib/parse_date.c
	ext/date/lib/parse_date.re
2013-08-25 15:14:17 -07:00
gron1987 e6424d89e9 Fix bug #65554 in DateTime, when use it with D/l in format and textual day have dot at the end 2013-08-25 15:09:29 -07:00
Stanislav Malyshev e045cbaa14 Merge branch 'fix_travis' into PHP-5.5
* fix_travis:
  fix mysql tests & mark nextRowset problematic tests
  fix mysql init
  add openssl
  add mysql settings
2013-08-25 00:29:33 -07:00
Stanislav Malyshev a2d8ae9a1f fix mysql tests & mark nextRowset problematic tests 2013-08-24 23:56:48 -07:00
Stanislav Malyshev c0bfccafd2 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix DateInterval->days value when object was created not from DateTime::diff()
2013-08-24 23:38:54 -07:00
Alexander Moskalev b378b0b081 Fix DateInterval->days value when object was created not from DateTime::diff() 2013-08-24 23:38:33 -07:00
Stanislav Malyshev a89e71397d Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Test extension xmlrpc encode type double and string decode type string and int
2013-08-24 21:45:14 -07:00
root e22c139fe0 Test extension xmlrpc encode type double and string decode type string and int 2013-08-24 21:44:50 -07:00
Stanislav Malyshev 286c745d81 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Stricter libc-client symlink check
2013-08-24 21:40:52 -07:00
Ole Markus With 6b8dade6dc Stricter libc-client symlink check 2013-08-24 21:40:26 -07:00
Joey Smith 2139d2702d Expose fputcsv's escape_char to userland
Allows users to assert that something other than the backslash
should be considered an escape char; also follows the RFC 4180
recommendation that fields containing a " be enclosed.
2013-08-24 20:45:14 -07:00
Stanislav Malyshev bdccf0a61d Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix #65483: quoted-printable encode stream filter incorrectly encoding spaces
  Update NEWS
2013-08-24 19:49:27 -07:00
Michael M Slusarz 3f9af558e7 Fix #65483: quoted-printable encode stream filter incorrectly encoding spaces 2013-08-24 19:45:54 -07:00
Stanislav Malyshev 817eebc733 fix mysql init 2013-08-24 19:39:00 -07:00
Stanislav Malyshev f57a722c85 add openssl 2013-08-24 19:38:46 -07:00
Stanislav Malyshev f31d6bc0d9 add mysql settings 2013-08-24 19:38:30 -07:00
Anatol Belski 716fc80fda Suppress static analyzer warnings in specialized executor
As things like if(0) will be removed by the compiler, no need
to see that tons of warnings with static analyzer enabled.
2013-08-23 17:41:07 +02:00
Christopher Jones 38f9c515cd Update NEWS 2013-08-23 08:18:33 -07:00
Christopher Jones 768c34e7cd Update NEWS 2013-08-23 08:13:59 -07:00
Anatol Belski a2b1546f3b ensure the test doesn't fail because of tz warning 2013-08-23 16:40:28 +02:00
Nikita Popov 686402a865 Merge branch 'PHP-5.4' into PHP-5.5 2013-08-23 13:28:59 +02:00
Christopher Jones 5ab6d215fc Remove duplicate calls to set filename & lineno for the DTRACE_FUNCTION_ENTRY/RETURN cases 2013-08-23 13:27:42 +02:00
Christopher Jones c1ecdfbf6e Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Suppress compliation warning "warning: passing argument 1 of ‘_efree’ discards qualifiers from pointer target type"
  Revert "Suppress compliation warning "warning: passing argument 1 of ‘_efree’ discards qualifiers from pointer target type""
2013-08-22 09:06:43 -07:00
Christopher Jones 7109f369e8 Suppress compliation warning "warning: passing argument 1 of ‘_efree’ discards qualifiers from pointer target type" 2013-08-22 09:05:52 -07:00
Christopher Jones 18282f42c5 Revert "Suppress compliation warning "warning: passing argument 1 of ‘_efree’ discards qualifiers from pointer target type""
This reverts commit f38bd22ed2.
2013-08-22 08:58:35 -07:00
Christopher Jones f2ceb4963e Revert "Suppress compliation warning "warning: passing argument 1 of ‘_efree’ discards qualifiers from pointer target type""
This reverts commit f38bd22ed2.
2013-08-22 08:58:24 -07:00
Matteo Beccati 908da14bd1 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed other compiler warnings
2013-08-22 15:34:11 +02:00
Matteo Beccati d5987478a8 Fixed other compiler warnings 2013-08-22 15:33:54 +02:00
Nikita Popov c0d99fd76a Apply pgsql notice test fixes to PHP-5.5 2013-08-22 14:02:55 +02:00
Nikita Popov 592677d810 Fix intl build
Turns out that you can't use implicit void pointer casts if intl
is compiled.
2013-08-22 11:46:51 +02:00
Nikita Popov fc16b92313 Fix bug #46311: Pointer aliasing issue results in miscompile on gcc4.4
The code violated the strict aliasing restriction, because it
dereferenced the same pointer as zval** once and as void**
afterwards. Now both occurances dereference void** and cast to
zval* in the former case.
2013-08-22 10:56:50 +02:00
Christopher Jones 11087eece7 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Suppress compiler warning "warning: variable ‘length’ set but not used [-Wunused-but-set-variable]"
  Suppress compiler warning "warning: variable ‘retcount’ set but not used [-Wunused-but-set-variable]"
2013-08-21 15:43:19 -07:00
Christopher Jones 54d4a28003 Suppress compiler warning "warning: variable ‘length’ set but not used [-Wunused-but-set-variable]" 2013-08-21 15:39:14 -07:00
Christopher Jones 1af111dd68 Suppress compiler warning "warning: variable ‘retcount’ set but not used [-Wunused-but-set-variable]" 2013-08-21 15:37:02 -07:00
Christopher Jones d2a2e949fe Merge branch 'PHP-5.5' of https://git.php.net/repository/php-src into PHP-5.5
* 'PHP-5.5' of https://git.php.net/repository/php-src:
  Suppress compliation warning "warning: passing argument 1 of ‘_efree’ discards qualifiers from pointer target type"
2013-08-21 15:23:48 -07:00
Christopher Jones d0bede2efa Merge branch 'PHP-5.4' of https://git.php.net/repository/php-src into PHP-5.4
* 'PHP-5.4' of https://git.php.net/repository/php-src:
  Suppress compliation warning "warning: passing argument 1 of ‘_efree’ discards qualifiers from pointer target type"
2013-08-21 15:23:48 -07:00
Christopher Jones 9895e8bbe6 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Suppress compliation warning "warning: passing argument 1 of ‘_efree’ discards qualifiers from pointer target type"
2013-08-21 15:07:03 -07:00
Christopher Jones f38bd22ed2 Suppress compliation warning "warning: passing argument 1 of ‘_efree’ discards qualifiers from pointer target type" 2013-08-21 15:06:23 -07:00
Christopher Jones d85827fb7f Reduce compilation noise during normal compilation:
php-5.5/ext/session/session.c:836: warning: unused variable ‘struc’
    php-5.5/ext/session/session.c:836: warning: unused variable ‘num_key’
    php-5.5/ext/session/session.c:836: warning: unused variable ‘key_length’
    php-5.5/ext/session/session.c:836: warning: unused variable ‘key’
    php-5.5/ext/session/session.c:835: warning: unused variable ‘key_type’
    php-5.5/ext/session/session.c:834: warning: unused variable ‘_ht’
    php-5.5/ext/session/session.c:857: warning: unused variable ‘has_value’
    php-5.5/ext/session/session.c:856: warning: unused variable ‘namelen’
    php-5.5/ext/session/session.c:853: warning: unused variable ‘name’
    php-5.5/ext/session/session.c:852: warning: unused variable ‘p’

    php-5.5/ext/session/mod_user.c:191: warning: unused variable ‘ret’
2013-08-21 10:34:09 -07:00
Michael Wallner 6181948592 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix pointer sign warning showing up in EVERY build
2013-08-21 19:18:11 +02:00
Michael Wallner d8023d13eb Fix pointer sign warning showing up in EVERY build 2013-08-21 19:17:22 +02:00
Anthony Ferrara 83e3466898 Fix return types of password API helper functions.
This fixes issues that were found during static analysis by cjones where failure was impossible to detect due to return type mangling (casting an int to a char, then comparing to an int).
2013-08-21 12:10:40 -04:00
Matteo Beccati 4283f75c34 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed compiler warnings in ext/pgsql
  Fixed other compiler warnings in PDO_PGSQL
  Fixed compiler warning
2013-08-21 11:24:27 +02:00
Matteo Beccati 540f325664 Fixed compiler warnings in ext/pgsql 2013-08-21 11:24:12 +02:00
Matteo Beccati 696852f2bd Fixed other compiler warnings in PDO_PGSQL 2013-08-21 11:22:33 +02:00
Matteo Beccati 5c06e5c2e0 Fixed compiler warning
I moved the constant to the enum in order to avoid this:
ext/pgsql/pgsql.c:3491: warning: comparison is always false due to limited range of data type

Works in gcc 4.6, but I'm not sure about other compilers.
2013-08-21 11:22:32 +02:00
Yasuo Ohgaki 7be3c74339 Update NEWS 2013-08-21 11:19:06 +09:00
Yasuo Ohgaki c51f77fe83 Add php_serialize session.serialize_handler. This patch closes
Request #25630
  Request #43980
  Request #54383
  Bug #65359

and many others similar to these that are closed as "wont fix" or
"not a bug".

Current serializers have limitations due to register_globals support
that are no longer supported. Changing existing serializer may cause
compatibility issue. Therefore, new handler is needed to remove
needless limitations.

php_serialize does not have special characters and allow numerical
index in $_SESSION. $_SESSION can be used as ordinary array.
2013-08-21 10:51:51 +09:00
Yasuo Ohgaki 7318b857aa Update NEWS 2013-08-21 10:38:59 +09:00
Yasuo Ohgaki 1641158644 Fixed Bug #65475 2013-08-21 08:11:59 +09:00
Christopher Jones 268c2884fa Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Quash compile warning "warning: 'flags' may be used uninitialized in this function"
2013-08-20 13:37:02 -07:00
Christopher Jones e9b12bedc3 Quash compile warning "warning: 'flags' may be used uninitialized in this function" 2013-08-20 13:36:18 -07:00
Christopher Jones 9e1e0096d1 Merge branch 'PHP-5.5' of https://git.php.net/repository/php-src into PHP-5.5
* 'PHP-5.5' of https://git.php.net/repository/php-src:
  Fix bug #64953 (Postgres prepared statement positional parameter casting)
2013-08-20 11:26:57 -07:00
Christopher Jones 9c9fee3f43 Merge branch 'PHP-5.4' of https://git.php.net/repository/php-src into PHP-5.4
* 'PHP-5.4' of https://git.php.net/repository/php-src:
  Fix bug #64953 (Postgres prepared statement positional parameter casting)
2013-08-20 11:26:49 -07:00
Christopher Jones 433225a929 Remove compilation warning "warning: no newline at end of file" 2013-08-20 11:04:26 -07:00
Christopher Jones ec3f8d2b1f Remove compilation warnings: "warning: no newline at end of file" 2013-08-20 11:01:20 -07:00
Christopher Jones dfb187752e Fix compile warning "intl_cppshims.h:34:7: warning: no newline at end of file" 2013-08-20 10:55:10 -07:00
Christopher Jones db0166af2f Tabify 2013-08-20 10:46:15 -07:00
Christopher Jones 0ab8475db2 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Eliminate compiler warnings: "warning: pointer targets in initialization differ in signedness"
  Eliminate compiler warnings "warning: pointer targets in initialization differ in signedness"
2013-08-20 10:42:20 -07:00
Christopher Jones d82f9339fe Eliminate compiler warnings: "warning: pointer targets in initialization differ in signedness" 2013-08-20 10:41:29 -07:00
Christopher Jones eba85f91d8 Eliminate compiler warnings "warning: pointer targets in initialization differ in signedness" 2013-08-20 10:41:01 -07:00
Christopher Jones 7160adf4ad Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Remove some compilation warnings:   'unused variable' and   'enumeration value not handled in switch'
2013-08-20 10:34:13 -07:00
Christopher Jones b455ba971c Remove some compilation warnings:
'unused variable' and
  'enumeration value not handled in switch'
2013-08-20 10:33:00 -07:00
Michael Wallner 7f3e7eb958 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix bug #64953 (Postgres prepared statement positional parameter casting)

Conflicts:
	ext/pdo/pdo_sql_parser.c
2013-08-20 19:21:53 +02:00
Michael Wallner 27c803aaed Fix bug #64953 (Postgres prepared statement positional parameter casting) 2013-08-20 19:19:02 +02:00
Christopher Jones f32c0efc8f Merge branch 'PHP-5.5' of https://git.php.net/repository/php-src into PHP-5.5
* 'PHP-5.5' of https://git.php.net/repository/php-src:
  Add session.use_strict_mode description to php.ini-*
  bump version
  Update NEWS
2013-08-20 05:40:22 -07:00
Christopher Jones 72d1ec883e Merge branch 'PHP-5.4' of https://git.php.net/repository/php-src into PHP-5.4
* 'PHP-5.4' of https://git.php.net/repository/php-src:
  bump version
2013-08-20 05:40:19 -07:00
Yasuo Ohgaki 4cd9796be7 Add session.use_strict_mode description to php.ini-* 2013-08-20 18:30:30 +09:00
Yasuo Ohgaki 9789df7764 Merge branch 'PHP-5.4' of git.php.net:php-src into PHP-5.4
* 'PHP-5.4' of git.php.net:php-src:
  bump version
  Update NEWS
  fix bug #65481 (shutdown segfault due to serialize)
  Track created curl_slist structs by option so they can be updated in situ.
  Fixed bug #64503 (Compilation fails with error: conflicting types for 'zendparse').
  added new glob() test
  fix using wrong buffer pointer
  Fix bug #65470	Segmentation fault in zend_error() with --enable-dtrace
  Fix for php bug #64802 includes test case
  new for fix #65225
  Fixed #65225: PHP_BINARY incorrectly set
  Use pkg-config to detect iodbc
  Add -P option to use the current binary
  Create test to the extension xmlrpc
  Fixbug: phpize --clean will delete include/*.h
2013-08-20 17:48:47 +09:00
Yasuo Ohgaki 36122c74a2 Merge branch 'PHP-5.5' of git.php.net:php-src into PHP-5.5
* 'PHP-5.5' of git.php.net:php-src: (27 commits)
  bump version
  Remove compile warning:    warning: unused variable ‘j’ [-Wunused-variable]
  Remove compile warnings:   warning: variable ‘lastch’ set but not used [-Wunused-but-set-variable]   warning: variable ‘buf’ set but not used [-Wunused-but-set-variable]
  Remove compile warning: variable ‘streamp’ set but not used [-Wunused-but-set-variable]
  Remove compile warnings:   variable ‘obj_cnt’ set but not used [-Wunused-but-set-variable]   unused variable ‘last’ [-Wunused-variable]   unused variable ‘j’ [-Wunused-variable]
  Remove compile warning "variable ‘mekeylen’ set but not used"
  Reduce (some more) compile noise of 'unused variable' and 'may be used uninitialized' warnings.
  Update NEWS
  Update NEWS
  fix bug #65481 (shutdown segfault due to serialize)
  Track created curl_slist structs by option so they can be updated in situ.
  Fixed bug #64503 (Compilation fails with error: conflicting types for 'zendparse').
  Fixed bug #64503 (Compilation fails with error: conflicting types for 'zendparse').
  added new glob() test
  fix using wrong buffer pointer
  Fix bug #65470	Segmentation fault in zend_error() with --enable-dtrace
  Fix for php bug #64802 includes test case
  Use in preg_replace_callback() using variables by reference and test for bug #64979
  https://bugs.php.net/bug.php?id=64979
  add CVE-2011-4718
  ...
2013-08-20 17:48:24 +09:00
Stanislav Malyshev 53d9643431 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  bump version
  Update NEWS

Conflicts:
	configure.in
	main/php_version.h
2013-08-19 23:23:21 -07:00
Stanislav Malyshev d487f5e9ac bump version 2013-08-19 23:19:51 -07:00
Christopher Jones ee7f6e7d0d Merge branch 'PHP-5.5' of https://git.php.net/repository/php-src into PHP-5.5
* 'PHP-5.5' of https://git.php.net/repository/php-src:
  Remove compile warning:    warning: unused variable ‘j’ [-Wunused-variable]
  Remove compile warnings:   warning: variable ‘lastch’ set but not used [-Wunused-but-set-variable]   warning: variable ‘buf’ set but not used [-Wunused-but-set-variable]
  Remove compile warning: variable ‘streamp’ set but not used [-Wunused-but-set-variable]
  Remove compile warnings:   variable ‘obj_cnt’ set but not used [-Wunused-but-set-variable]   unused variable ‘last’ [-Wunused-variable]   unused variable ‘j’ [-Wunused-variable]
  Remove compile warning "variable ‘mekeylen’ set but not used"
  Reduce (some more) compile noise of 'unused variable' and 'may be used uninitialized' warnings.
2013-08-19 18:26:58 -07:00
Christopher Jones 1a00b9bd26 Remove compile warning:
warning: unused variable ‘j’ [-Wunused-variable]
2013-08-19 17:58:42 -07:00
Christopher Jones 33ff441996 Merge branch 'PHP-5.5' of https://git.php.net/repository/php-src into PHP-5.5
* 'PHP-5.5' of https://git.php.net/repository/php-src:
  Update NEWS
  fix bug #65481 (shutdown segfault due to serialize)
  Track created curl_slist structs by option so they can be updated in situ.
  Fixed bug #64503 (Compilation fails with error: conflicting types for 'zendparse').
  Fixed bug #64503 (Compilation fails with error: conflicting types for 'zendparse').
2013-08-19 17:55:26 -07:00
Christopher Jones dc384a571d Merge branch 'PHP-5.4' of https://git.php.net/repository/php-src into PHP-5.4
* 'PHP-5.4' of https://git.php.net/repository/php-src:
  Update NEWS
  fix bug #65481 (shutdown segfault due to serialize)
  Track created curl_slist structs by option so they can be updated in situ.
  Fixed bug #64503 (Compilation fails with error: conflicting types for 'zendparse').
2013-08-19 17:55:25 -07:00
Christopher Jones 83469477e7 Remove compile warnings:
warning: variable ‘lastch’ set but not used [-Wunused-but-set-variable]
  warning: variable ‘buf’ set but not used [-Wunused-but-set-variable]
2013-08-19 17:48:46 -07:00
Christopher Jones f69a5c520f Remove compile warning: variable ‘streamp’ set but not used [-Wunused-but-set-variable] 2013-08-19 17:46:50 -07:00
Christopher Jones cf7f50748a Remove compile warnings:
variable ‘obj_cnt’ set but not used [-Wunused-but-set-variable]
  unused variable ‘last’ [-Wunused-variable]
  unused variable ‘j’ [-Wunused-variable]
2013-08-19 17:44:36 -07:00
Christopher Jones 279b4fe614 Remove compile warning "variable ‘mekeylen’ set but not used" 2013-08-19 17:40:15 -07:00
Christopher Jones d5979c88ea Reduce (some more) compile noise of 'unused variable' and 'may be used
uninitialized' warnings.
2013-08-19 17:17:54 -07:00
Christopher Jones 4ee1ec4bcf Update NEWS 2013-08-19 17:14:38 -07:00
Christopher Jones c60067c09a Update NEWS 2013-08-19 17:14:15 -07:00
Michael Wallner 9d2cdacf4a Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fix bug #65481 (shutdown segfault due to serialize)

Conflicts:
	ext/standard/var_unserializer.c
2013-08-20 00:08:55 +02:00
Michael Wallner 1ac4d8f2c6 fix bug #65481 (shutdown segfault due to serialize) 2013-08-20 00:05:11 +02:00
Adam Harvey 69f12ad582 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Track created curl_slist structs by option so they can be updated in situ.

Conflicts:
	ext/curl/interface.c
2013-08-19 12:16:36 -07:00
Adam Harvey aa7d3d8e6d Track created curl_slist structs by option so they can be updated in situ.
At present, when curl_setopt() is called with an option that requires the
creation of a curl_slist, we simply push the new curl_slist onto a list to be
freed when the curl handle is freed. This avoids a memory leak, but means that
repeated calls to curl_setopt() on the same handle with the same option wastes
previously allocated memory on curl_slist structs that will no longer be read.

This commit changes the zend_llist that was previously used to track the lists
to a HashTable keyed by the option number, which means that we can simply
update the hash table each time curl_setopt() is called.

Fixes bug #65458 (curl memory leak).
2013-08-19 12:01:04 -07:00
Stanislav Malyshev d2c78c9e20 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed bug #64503 (Compilation fails with error: conflicting types for 'zendparse').
2013-08-19 11:19:11 -07:00
Stanislav Malyshev d0beb7daf9 Merge branch 'PHP-5.5' of git.php.net:php-src into PHP-5.5
* 'PHP-5.5' of git.php.net:php-src:
  added new glob() test
2013-08-19 11:18:57 -07:00
Xinchen Hui a4862503d4 Fixed bug #64503 (Compilation fails with error: conflicting types for 'zendparse'). 2013-08-19 11:18:51 -07:00
Christopher Jones ca57ce5132 Merge branch 'PHP-5.5' of https://git.php.net/repository/php-src into PHP-5.5
* 'PHP-5.5' of https://git.php.net/repository/php-src:
  added new glob() test
  fix using wrong buffer pointer
  Fix bug #65470	Segmentation fault in zend_error() with --enable-dtrace
  Fix for php bug #64802 includes test case
  Use in preg_replace_callback() using variables by reference and test for bug #64979
  https://bugs.php.net/bug.php?id=64979
  add CVE-2011-4718
  new for fix #65225
  Fixed #65225: PHP_BINARY incorrectly set
  Use pkg-config to detect iodbc
  Add -P option to use the current binary
  Create test to the extension xmlrpc
  Fixbug: phpize --clean will delete include/*.h
  code related typo fixes
2013-08-19 10:53:47 -07:00
Christopher Jones 32873cd0dd Merge branch 'PHP-5.3' of https://git.php.net/repository/php-src into PHP-5.3
* 'PHP-5.3' of https://git.php.net/repository/php-src:
  fix using wrong buffer pointer
2013-08-19 10:53:41 -07:00
Christopher Jones 71c24f4c2e Merge branch 'PHP-5.4' of https://git.php.net/repository/php-src into PHP-5.4
* 'PHP-5.4' of https://git.php.net/repository/php-src:
  added new glob() test
  fix using wrong buffer pointer
  Fix bug #65470	Segmentation fault in zend_error() with --enable-dtrace
  Fix for php bug #64802 includes test case
  new for fix #65225
  Fixed #65225: PHP_BINARY incorrectly set
  Use pkg-config to detect iodbc
  Add -P option to use the current binary
  Create test to the extension xmlrpc
  Fixbug: phpize --clean will delete include/*.h
2013-08-19 10:53:41 -07:00
Stanislav Malyshev 4ea9729cd0 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed bug #64503 (Compilation fails with error: conflicting types for 'zendparse').
2013-08-19 10:53:08 -07:00
Xinchen Hui 7a79cf0206 Fixed bug #64503 (Compilation fails with error: conflicting types for 'zendparse'). 2013-08-19 10:42:47 -07:00
Anatol Belski cdc64f0345 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  added new glob() test
2013-08-19 11:19:42 +02:00
Anatol Belski 4bad49e3bc added new glob() test 2013-08-19 11:17:13 +02:00
Stanislav Malyshev 8e0f110099 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fix using wrong buffer pointer
2013-08-19 01:04:19 -07:00
Stanislav Malyshev cf96aa155e Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  fix using wrong buffer pointer
2013-08-19 01:03:18 -07:00
Stanislav Malyshev c1c49d6e39 fix using wrong buffer pointer 2013-08-19 01:02:12 -07:00
Stanislav Malyshev bcf785fb66 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix bug #65470	Segmentation fault in zend_error() with --enable-dtrace
2013-08-18 17:23:59 -07:00
Stanislav Malyshev 14f5732096 Fix bug #65470 Segmentation fault in zend_error() with --enable-dtrace 2013-08-18 17:22:25 -07:00
Stanislav Malyshev bd29ff7c38 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix for php bug #64802 includes test case

Conflicts:
	ext/openssl/openssl.c
2013-08-18 15:45:17 -07:00
Mark Jones 9973658a44 Fix for php bug #64802 includes test case 2013-08-18 15:42:37 -07:00
Marcel Araujo 265224778b Use in preg_replace_callback() using variables by reference and test for bug #64979 2013-08-18 15:18:30 -07:00
Marcel Araujo 47678c06c6 https://bugs.php.net/bug.php?id=64979 2013-08-18 15:09:43 -07:00
Stanislav Malyshev b33a1a1397 add CVE-2011-4718 2013-08-18 14:42:06 -07:00
Stanislav Malyshev bf0c6f2858 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  new for fix #65225
  Fixed #65225: PHP_BINARY incorrectly set
2013-08-18 14:21:14 -07:00
Stanislav Malyshev 0154db1c5f new for fix #65225 2013-08-18 14:20:17 -07:00
Patrick Allaert 98d29d20a1 Fixed #65225: PHP_BINARY incorrectly set 2013-08-18 14:18:33 -07:00
Stanislav Malyshev 1794291ebe Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Use pkg-config to detect iodbc
2013-08-18 14:16:24 -07:00
Ole Markus With a3fa25e857 Use pkg-config to detect iodbc 2013-08-18 14:16:17 -07:00
Stanislav Malyshev 2ee7e122a7 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Add -P option to use the current binary
  Create test to the extension xmlrpc
2013-08-18 14:09:19 -07:00
Stanislav Malyshev 3da2fb335d Add -P option to use the current binary 2013-08-18 14:08:03 -07:00
root ac2d2b9b72 Create test to the extension xmlrpc 2013-08-18 13:59:39 -07:00
Stanislav Malyshev 296a434d52 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixbug: phpize --clean will delete include/*.h
2013-08-18 13:52:38 -07:00
Tianfeng 4a0e87e497 Fixbug: phpize --clean will delete include/*.h 2013-08-18 13:52:20 -07:00
Veres Lajos 144eab0889 code related typo fixes 2013-08-18 13:46:32 -07:00
Yasuo Ohgaki 83e251a055 Merge branch 'PHP-5.5' of git.php.net:php-src into PHP-5.5
* 'PHP-5.5' of git.php.net:php-src: (30 commits)
  Fix duplicated 5.5.2 NEWS in my tree
  fix typo
  merge news for 5.5.2
  Update NEWS
  Update NEWS
  With --enable-dtrace, the correct PIC/non-PIC .o files on Solaris and Linux are now used.  DTrace is part of Oracle Linux.  See https://oss.oracle.com/projects/DTrace/
  fix cve number
  New news section
  Prepare news for PHP-5.5.2
  Reduce compiler noise by removing unused variables and labels
  Fixed #65431 in zend_exception.c by Sixd
  Reduce (some) compile noise of 'unused variable' and 'may be used uninitialized' warnings.
  Skip test if SKIP_ONLINE_TESTS set
  Fix CVE-2013-4073 - handling of certs with null bytes
  Fix CVE-2013-4073 - handling of certs with null bytes
  Fixed #65431 (Discarded qualifiers from pointer target warnings when using --enable-dtrace) by Sixd
  removed unused vars
  fixed strndup usage in the pgsql ext
  use mysqlnd, some tests fail otherwise
  ensure notices are not ignored when tests need them
  ...
2013-08-18 12:29:36 +09:00
Christopher Jones 803045e3c7 Fix duplicated 5.5.2 NEWS in my tree 2013-08-16 12:03:01 -07:00
Christopher Jones a6f596f90f Merge branch 'PHP-5.5' of https://git.php.net/repository/php-src into PHP-5.5
* 'PHP-5.5' of https://git.php.net/repository/php-src:
  fix typo
  merge news for 5.5.2
2013-08-16 11:39:07 -07:00
Stanislav Malyshev 466584f40b fix typo 2013-08-16 11:34:16 -07:00
Stanislav Malyshev 4734b31953 merge news for 5.5.2 2013-08-16 11:30:54 -07:00
Christopher Jones 60c8d814e7 Update NEWS 2013-08-16 11:16:06 -07:00
Christopher Jones 7237c317d6 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Update NEWS
2013-08-16 11:13:55 -07:00
Christopher Jones cb539b3e96 Update NEWS 2013-08-16 11:13:27 -07:00
Christopher Jones 1eadd15607 Merge branch 'PHP-5.5' of https://git.php.net/repository/php-src into PHP-5.5
* 'PHP-5.5' of https://git.php.net/repository/php-src:
  fix cve number
2013-08-16 11:10:04 -07:00
Christopher Jones 6993ca5bd7 Merge branch 'PHP-5.4' of https://git.php.net/repository/php-src into PHP-5.4
* 'PHP-5.4' of https://git.php.net/repository/php-src:
  fix cve number
2013-08-16 11:07:25 -07:00
Christopher Jones 4b4ffaf703 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  With --enable-dtrace, the correct PIC/non-PIC .o files on Solaris and Linux are now used.  DTrace is part of Oracle Linux.  See https://oss.oracle.com/projects/DTrace/
2013-08-16 10:49:05 -07:00
Christopher Jones 0ebef462ce With --enable-dtrace, the correct PIC/non-PIC .o files on Solaris and
Linux are now used.  DTrace is part of Oracle Linux.  See
https://oss.oracle.com/projects/DTrace/

This patch does not change DTrace linking for non-Solaris/Linux
platforms.

For SystemTap users on Linux, this patch removes the compilation
warning:
  Warning: Linking the shared library libphp5.la against the
  non-libtool objects Zend/zend_dtrace.d.o is not portable!
2013-08-16 10:40:50 -07:00
Stanislav Malyshev 5788797964 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fix cve number
2013-08-16 10:23:31 -07:00
Stanislav Malyshev 060fadca31 fix cve number 2013-08-16 10:20:32 -07:00
David Soria Parra e8a4477a48 New news section 2013-08-15 22:41:18 +02:00
508 changed files with 12419 additions and 4635 deletions

No files matched your search

+10 -2
View File
@@ -8,7 +8,15 @@ notifications:
email: false
env:
- REPORT_EXIT_STATUS=1
global:
- MYSQL_TEST_HOST=127.0.0.1
- MYSQL_TEST_USER=travis
- PDO_MYSQL_TEST_DSN="mysql:host=127.0.0.1;dbname=test"
- PDO_MYSQL_TEST_USER=travis
- PDO_MYSQL_TEST_PASS=
- PDO_MYSQL_TEST_HOST=127.0.0.1
matrix:
- REPORT_EXIT_STATUS=1
before_script:
# Compile PHP
@@ -21,4 +29,4 @@ before_script:
- . ./travis/ext/pdo_pgsql/setup.sh
# Run PHPs run-tests.php
script: ./sapi/cli/php run-tests.php -p `pwd`/sapi/cli/php -g "FAIL,XFAIL,BORK,WARN,LEAK,SKIP" --show-diff
script: ./sapi/cli/php run-tests.php -p `pwd`/sapi/cli/php -g "FAIL,XFAIL,BORK,WARN,LEAK,SKIP" --show-diff --set-timeout 120
+3 -3
View File
@@ -59,8 +59,8 @@ Exceptions:
you're calling.
7. When commenting out code using a #if statement, do NOT use 0 only. Instead
use "<svn username here>_0". For example, #if FOO_0, where FOO is your
svn user foo. This allows easier tracking of why code was commented out,
use "<git username here>_0". For example, #if FOO_0, where FOO is your
git user foo. This allows easier tracking of why code was commented out,
especially in bundled libraries.
8. Do not define functions that are not available. For instance, if a
@@ -151,7 +151,7 @@ Naming Conventions
7. Classes should be given descriptive names. Avoid using abbreviations where
possible. Each word in the class name should start with a capital letter,
without underscore delimiters (CampelCaps starting with a capital letter).
without underscore delimiters (CamelCaps starting with a capital letter).
The class name should be prefixed with the name of the 'parent set' (e.g.
the name of the extension)::
+285 -21
View File
@@ -1,31 +1,274 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
15 Aug 2013, PHP 5.5.2
9 Jan 2014, PHP 5.5.8
- Core:
. Fixed bug #62691 (solaris sed has no -i switch). (Chris Jones)
. Fixed bug #61345 (CGI mode - make install don't work). (Michael Heimpold)
. Fixed bug #61268 (--enable-dtrace leads make to clobber
Zend/zend_dtrace.d) (Chris Jones)
. Disallowed JMP into a finally block. (Laruence)
. Added validation of class names in the autoload process. (Dmitry)
. Fixed invalid C code in zend_strtod.c. (Lior Kaplan)
. Fixed bug #66041 (list() fails to unpack yielded ArrayAccess object).
(Nikita)
. Fixed bug #65764 (generators/throw_rethrow FAIL with
ZEND_COMPILE_EXTENDED_INFO). (Nikita)
. Fixed bug #61645 (fopen and O_NONBLOCK). (Mike)
. Fixed bug #66218 (zend_register_functions breaks reflection). (Remi)
- Date:
. Fixed bug #66060 (Heap buffer over-read in DateInterval). (Remi)
. Fixed bug #65768 (DateTimeImmutable::diff does not work). (Nikita Nefedov)
- DOM:
. Added flags option to DOMDocument::schemaValidate() and
DOMDocument::schemaValidateSource(). Added LIBXML_SCHEMA_CREATE flag.
(Chris Wright)
. Fixed bug #65196 (Passing DOMDocumentFragment to DOMDocument::saveHTML()
Produces invalid Markup). (Mike)
- Sessions:
. Implemented strict sessions RFC (https://wiki.php.net/rfc/strict_sessions)
which protects against session fixation attacks and session collisions.
(Yasuo Ohgaki)
. Fixed possible buffer overflow under Windows. Note: Not a security fix.
(Yasuo)
. Changed session.auto_start to PHP_INI_PERDIR. (Yasuo)
- Exif:
. Fixed bug #65873 (Integer overflow in exif_read_data()). (Stas)
- Pgsql:
. Fixed bug #62978 (Disallow possible SQL injections with pg_select()/pg_update()
/pg_delete()/pg_insert()). (Yasuo)
- Filter:
. Fixed bug #66229 (128.0.0.0/16 isn't reserved any longer). (Adam)
?? ??? 2013, PHP 5.5.2
- GD:
. Fixed bug #64405 (Use freetype-config for determining freetype2 dir(s)).
(Adam)
- PDO_odbc:
. Fixed bug #66311 (Stack smashing protection kills PDO/ODBC queries).
(michael at orlitzky dot com)
- MySQLi:
. Fixed bug #65486 (mysqli_poll() is broken on win x64). (Anatol)
- OPCache:
. Fixed reavlidate_path=1 behavior to avoid caching of symlinks values.
(Dmitry)
. Fixed Issue #140: "opcache.enable_file_override" doesn't respect
"opcache.revalidate_freq". (Dmitry).
- SNMP:
. Fixed SNMP_ERR_TOOBIG handling for bulk walk operations. (Boris Lytochkin)
- SOAP
. Fixed bug #66112 (Use after free condition in SOAP extension).
(martin dot koegler at brz dot gv dot at)
- Sockets:
. Fixed bug #65923 (ext/socket assumes AI_V4MAPPED is defined). (Felipe)
- XSL
. Fixed bug #49634 (Segfault throwing an exception in a XSL registered
function). (Mike)
- ZIP:
. Fixed Bug #66321 (ZipArchive::open() ze_obj->filename_len not real). (Remi)
12 Dec 2013, PHP 5.5.7
- CLI server:
. Added some MIME types to the CLI web server (Chris Jones)
. Implemented FR #65917 (getallheaders() is not supported by the built-in web
server) - also implements apache_response_headers() (Andrea Faulds)
- Core:
. Fixed bug #66094 (unregister_tick_function tries to cast a Closure to a
string). (Laruence)
. Fixed bug #65969 (Chain assignment with T_LIST failure). (Dmitry)
- OPCache
. Fixed bug #66176 (Invalid constant substitution). (Dmitry)
. Fixed bug #65915 (Inconsistent results with require return value). (Dmitry)
. Fixed bug #65559 (Opcache: cache not cleared if changes occur while
running). (Dmitry)
- readline
. Fixed Bug #65714 (PHP cli forces the tty to cooked mode). (Remi)
- Openssl:
. Fixed memory corruption in openssl_x509_parse() (CVE-2013-6420).
(Stefan Esser).
14 Nov 2013, PHP 5.5.6
- Core:
. Fixed bug #65947 (basename is no more working after fgetcsv in certain
situation). (Laruence)
. Improved performance of array_merge() and func_get_args() by eliminating
useless copying. (Dmitry)
. Fixed bug #65939 (Space before ";" breaks php.ini parsing).
(brainstorm at nopcode dot org)
. Fixed bug #65911 (scope resolution operator - strange behavior with $this).
(Bob Weinand)
. Fixed bug #65936 (dangling context pointer causes crash). (Tony)
- FPM:
. Changed default listen() backlog to 65535. (Tony)
- JSON
. Fixed whitespace part of bug #64874 ("json_decode handles whitespace and
case-sensitivity incorrectly"). (Andrea Faulds)
- MySQLi:
. Fixed bug #66043 (Segfault calling bind_param() on mysqli). (Laruence)
- OPcache
. Increased limit for opcache.max_accelerated_files to 1,000,000. (Chris)
. Fixed issue #115 (path issue when using phar). (Dmitry)
. Fixed issue #149 (Phar mount points not working with OPcache enabled).
(Dmitry)
- ODBC
. Fixed bug #65950 (Field name truncation if the field name is bigger than
32 characters). (patch submitted by: michael dot y at zend dot com, Yasuo)
- PDO:
. Fixed bug #66033 (Segmentation Fault when constructor of PDO statement
throws an exception). (Laruence)
. Fixed bug 65946 (sql_parser permanently converts values bound to strings)
- Standard:
. Fixed bug #64760 (var_export() does not use full precision for floating-point
numbers) (Yasuo)
17 Oct 2013, PHP 5.5.5
- Core:
. Fixed bug #64979 (Wrong behavior of static variables in closure generators).
(Nikita)
. Fixed bug #65322 (compile time errors won't trigger auto loading). (Nikita)
. Fixed bug #65821 (By-ref foreach on property access of string offset
segfaults). (Nikita)
- CLI server:
. Fixed bug #65633 (built-in server treat some http headers as
case-sensitive). (Adam)
. Fixed bug #65818 (Segfault with built-in webserver and chunked transfer
encoding). (Felipe)
. Added application/pdf to PHP CLI Web Server mime types (Chris Jones)
- Datetime:
. Fixed bug #64157 (DateTime::createFromFormat() reports confusing error
message). (Boro Sitnikovski)
. Fixed bug #65502 (DateTimeImmutable::createFromFormat returns DateTime).
(Boro Sitnikovski)
. Fixed bug #65548 (Comparison for DateTimeImmutable doesn't work).
(Boro Sitnikovski)
- DBA extension:
. Fixed bug #65708 (dba functions cast $key param to string in-place,
bypassing copy on write). (Adam)
- Filter:
. Add RFC 6598 IPs to reserved addresses. (Sebastian Nohn)
. Fixed bug #64441 (FILTER_VALIDATE_URL rejects fully qualified domain names).
(Syra)
- FTP:
. Fixed bug #65667 (ftp_nb_continue produces segfault). (Philip Hofstetter)
- GD
. Ensure that the defined interpolation method is used with the generic
scaling methods. (Pierre)
- IMAP:
. Fixed bug #65721 (configure script broken in 5.5.4 and 5.4.20 when enabling
imap). (ryotakatsuki at gmail dot com)
- OPcache:
. Added support for GNU Hurd. (Svante Signell)
. Added function opcache_compile_file() to load PHP scripts into cache
without execution. (Julien)
. Fixed bug #65845 (Error when Zend Opcache Optimizer is fully enabled).
(Dmitry)
. Fixed bug #65665 (Exception not properly caught when opcache enabled).
(Laruence)
. Fixed bug #65510 (5.5.2 crashes in _get_zval_ptr_ptr_var). (Dmitry)
. Fixed issue #135 (segfault in interned strings if initial memory is too
low). (Julien)
- Sockets:
. Fixed bug #65808 (the socket_connect() won't work with IPv6 address).
(Mike)
- SPL:
. Fix bug #64782 (SplFileObject constructor make $context optional / give it
a default value). (Nikita)
- Standard:
. Fixed bug #61548 (content-type must appear at the end of headers for 201
Location to work in http). (Mike)
- XMLReader:
. Fixed bug #51936 (Crash with clone XMLReader). (Mike)
. Fixed bug #64230 (XMLReader does not suppress errors). (Mike)
- Build system:
. Fixed bug #51076 (race condition in shtool's mkdir -p implementation).
(Mike, Raphael Geissert)
. Fixed bug #62396 ('make test' crashes starting with 5.3.14 (missing
gzencode())). (Mike)
19 Sep 2013, PHP 5.5.4
- Core:
. Fixed bug #60598 (cli/apache sapi segfault on objects manipulation).
(Laruence)
. Improved fputcsv() to allow specifying escape character.
. Fixed bug #65490 (Duplicate calls to get lineno & filename for
DTRACE_FUNCTION_*). (Chris Jones)
. Fixed bug #65483 (quoted-printable encode stream filter incorrectly encoding
spaces). (Michael M Slusarz)
. Fixed bug #65481 (shutdown segfault due to serialize) (Mike)
. Fixed bug #65470 (Segmentation fault in zend_error() with
--enable-dtrace). (Chris Jones, Kris Van Hees)
. Fixed bug #65225 (PHP_BINARY incorrectly set). (Patrick Allaert)
. Fixed bug #62692 (PHP fails to build with DTrace). (Chris Jones, Kris Van Hees)
. Fixed bug #61759 (class_alias() should accept classes with leading
backslashes). (Julien)
. Fixed bug #46311 (Pointer aliasing issue results in miscompile on gcc4.4).
(Nikita Popov)
- cURL:
. Fixed bug #65458 (curl memory leak). (Adam)
- Datetime:
. Fixed bug #65554 (createFromFormat broken when weekday name is followed
by some delimiters). (Valentin Logvinskiy, Stas).
. Fixed bug #65564 (stack-buffer-overflow in DateTimeZone stuff caught
by AddressSanitizer). (Remi).
- OPCache:
. Fixed bug #65561 (Zend Opcache on Solaris 11 x86 needs ZEND_MM_ALIGNMENT=4).
(Terry Ellison)
- Openssl:
. Fixed bug #64802 (openssl_x509_parse fails to parse subject properly in
some cases). (Mark Jones)
- PDO:
. Fixed bug #64953 (Postgres prepared statement positional parameter
casting). (Mike)
- Session:
. Fixed bug #65475 (Session ID is not initialized properly when strict session
is enabled). (Yasuo)
. Fixed bug #51127/#65359 Request #25630/#43980/#54383 (Added php_serialize
session serialize handler that uses plain serialize()). (Yasuo)
- Standard:
. Fix issue with return types of password API helper functions. Found via
static analysis by cjones. (Anthony Ferrara)
- Zlib:
. Fixed bug #65391 (Unable to send vary header user-agent when
ob_start('ob_gzhandler') is called) (Mike)
22 Aug 2013, PHP 5.5.3
- Openssl:
. Fixed UMR in fix for CVE-2013-4248.
15 Aug 2013, PHP 5.5.2
- Core:
. Fixed bug #65372 (Segfault in gc_zval_possible_root when return reference
@@ -36,26 +279,47 @@ PHP NEWS
. Fixed bug #65304 (Use of max int in array_sum). (Laruence)
. Fixed bug #65291 (get_defined_constants() causes PHP to crash in a very
limited case). (Arpad)
. Fixed bug #62691 (solaris sed has no -i switch). (Chris Jones)
. Fixed bug #61345 (CGI mode - make install don't work). (Michael Heimpold)
. Fixed bug #61268 (--enable-dtrace leads make to clobber
Zend/zend_dtrace.d) (Chris Jones)
- DOM:
. Added flags option to DOMDocument::schemaValidate() and
DOMDocument::schemaValidateSource(). Added LIBXML_SCHEMA_CREATE flag.
(Chris Wright)
- OPcache:
. Added opcache.restrict_api configuration directive that may limit
usage of OPcahce API functions only to patricular script(s). (Dmitry)
usage of OPcache API functions only to particular script(s). (Dmitry)
. Added support for glob symbols in blacklist entries (?, *, **).
(Terry Elison, Dmitry)
. Fixed bug #65338 (Enabling both php_opcache and php_wincache AVs on
shutdown). (Dmitry)
- Openssl:
. Fixed handling null bytes in subjectAltName (CVE-2013-4073).
. Fixed handling null bytes in subjectAltName (CVE-2013-4248).
(Christian Heimes)
- PDO_mysql:
. Fixed bug #65299 (pdo mysql parsing errors). (Johannes)
- Pgsql:
. Fixed bug #62978 (Disallow possible SQL injections with pg_select()/pg_update()
/pg_delete()/pg_insert()). (Yasuo)
- Phar:
. Fixed bug #65028 (Phar::buildFromDirectory creates corrupt archives for
some specific contents). (Stas)
- Sessions:
. Implemented strict sessions RFC (https://wiki.php.net/rfc/strict_sessions)
which protects against session fixation attacks and session collisions.
(CVE-2011-4718). (Yasuo Ohgaki)
. Fixed possible buffer overflow under Windows. Note: Not a security fix.
(Yasuo)
. Changed session.auto_start to PHP_INI_PERDIR. (Yasuo)
- SOAP:
. Fixed bug #65018 (SoapHeader problems with SoapServer). (Dmitry)
+1 -1
View File
@@ -30,7 +30,7 @@ zend_module_entry foo_module_entry = {
PHP_RSHUTDOWN(foo), /* per-request shutdown function */
PHP_MINFO(foo), /* information function */
#if ZEND_MODULE_API_NO >= 20010901
FOO_VERSION, /* extension version number (string) */
PHP_FOO_VERSION, /* extension version number (string) */
#endif
STANDARD_MODULE_PROPERTIES
};
+5
View File
@@ -31,6 +31,11 @@ HOW TO USE IT
./buildconf; ./configure --enable-module_name; make
The definition of PHP_MODULE_NAME_VERSION will be present in the
php_module_name.h and injected into the zend_module_entry definition. This
is required by the PECL website for the version string conformity checks
against package.xml
But if you already have planned the overall scheme of your module, what
functions it will contain, their return types and the arguments they take
(a very good idea) and don't want to bother yourself with creating function
+5 -3
View File
@@ -69,9 +69,11 @@ The next few rules are more of a technical nature::
branches) an empty merge should be done.
2. All news updates intended for public viewing, such as new features,
bug fixes, improvements, etc., should go into the NEWS file of the
*first* to be released version with the given change. In other words
any NEWS file change only needs to done in one branch.
bug fixes, improvements, etc., should go into the NEWS file of *any
stable release* version with the given change. In other words,
news about a bug fix which went into PHP-5.4, PHP-5.5 and master
should be noted in both PHP-5.4/NEWS and PHP-5.5/NEWS but
not master, which is not a public released version yet.
3. Do not commit multiple file and dump all messages in one commit. If you
modified several unrelated files, commit each group separately and
+78 -75
View File
@@ -8,15 +8,16 @@ General notes and tips
1. Do not release on Fridays, Saturdays or Sundays
because the sysadmins can not upgrade stuff then.
2. Package the day before a release. So if the release is to be on Thursday,
package on Wednesday.
2. Package two days before a release. So if the release is to be on Thursday,
package on Tuesday. Think about timezones as well.
3. Ensure that Windows builds will work before packaging
4. Follow all steps to the letter. When unclear ask previous RM's (Derick/Ilia)
before proceeding. Ideally make sure that for the first releases one of the
previous RM's is around to answer questions. For the steps related to the
php/QA/bug websites try to have someone from the webmaster team (Bjori) on hand.
4. Follow all steps to the letter. When unclear ask previous RM's (David/Julien/
Johannes/Stas/Derick/Ilia) before proceeding. Ideally make sure that for the
first releases one of the previous RM's is around to answer questions. For the
steps related to the php/QA/bug websites try to have someone from the webmaster
team (Bjori) on hand.
5. Verify the tags to be extra sure everything was tagged properly.
@@ -50,37 +51,47 @@ Rolling a non stable release (alpha/beta/RC)
2. run the "scripts/dev/credits" script in php-src and commit the changes in the
credits files in ext/standard.
3. Checkout the release branch for this release (e.g., PHP-5.4.2).
3. Checkout the release branch for this release (e.g., PHP-5.4.2) from the main branch.
4. Bump the version numbers in ``main/php_version.h``, ``configure.in`` and possibly ``NEWS``.
Do not use abbreviations for alpha and beta.
Do not use abbreviations for alpha and beta. Do not use dashes, you should
``#define PHP_VERSION "5.4.22RC1"`` and not ``#define PHP_VERSION "5.4.22-RC1"``
5. Commit these changes to the branch with ``git commit -a``.
5. Compile and make test, with and without ZTS, using the right Bison version
(for example, for 5.5, Bison 2.4.1 is used)
6. Tag the repository with the version, e.g.:
6. Check ./sapi/cli/php -v output for version matching.
7. If all is right, commit the changes to the release branch with ``git commit -a``.
8. Tag the repository release branch with the version, e.g.:
``git tag -u YOURKEYID php-5.4.2RC2``
7. Push the changes to the main repo:
9. Bump the version numbers in ``main/php_version.h``, ``configure.in`` and ``NEWS``
in the *main* branch (PHP-5.4 for example) to prepare for the **next** version.
F.e. if the RC is "5.4.1RC1" then the new one should be "5.4.2-dev" - regardless if we get
a new RC or not. This is to make sure ``version_compare()`` can correctly work.
Commit the changes to the main branch.
10. Push the changes to the main repo, the tag, the main branch and the release branch :
``git push --tags origin HEAD``
``git push origin {main branch}``
``git push origin {release branch}``
8. run: ``./makedist 5.4.2RC2``, this will export the tree, create configure
and build three tarballs (gz,bz2 and xz). Make sure you use the same GNU Bison
version as snaps. Recent bison version are known to break ZTS.
11. run: ``PHPROOT=. ./makedist 5.4.2RC2``, this will export the tree, create configure
and build three tarballs (gz, bz2 and xz).
9. Copy those three tarballs to www.php.net, in your homedir there should be a
12. Copy those tarballs (scp, rsync) to downloads.php.net, in your homedir there should be a
directory "downloads/". Copy them into there, so that the system can generate
MD5 sums. If you do not have this directory, talk to Derick.
MD5 sums. If you do not have this directory, talk to Derick or Dan.
10. Now the RC can be found on http://downloads.php.net/yourname,
13. Now the RC can be found on http://downloads.php.net/yourname,
f.e. http://downloads.php.net/derick/
11. Once the release has been tagged, contact the PHP Windows development team
14. 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
those are made, they should be placed into the same directory as the source snapshots.
12. Notify the documentation team if documentations for new features are
not yet available but a stable release is imminent.
Getting the non stable release (alpha/beta/RC) announced
--------------------------------------------------------
@@ -109,9 +120,9 @@ Derick) run the following commands for you:
Note: Remember to update the MD5 checksum information.
4. Update ``php.git/include/version.inc`` (x=major version number)
4. Update ``web/php.git/include/version.inc`` (x=major version number)
a. ``$PHP_x_RC`` = "5.4.0RC1"
a. ``$PHP_x_RC`` = "5.4.0RC1" (should be set to "false" before)
b. ``$PHP_x_RC_DATE`` = "06 September 2007"
@@ -122,70 +133,61 @@ Derick) run the following commands for you:
6. For the first RC, write the doc team (phpdoc@lists.php.net) about updating the
INSTALL and win32/install.txt files which are generated from the PHP manual sources.
7. Publish the announce on www.php.net as well (for all releases, alpha, RCs or other)
Rolling a stable release
------------------------
1. Check windows snapshot builder logs (http://snaps.php.net/win32/snapshot-STABLE.log f.e.)
1. Checkout your release branch, you should have created when releasing previous RC
and bump the version numbers in ``main/php_version.h``, ``configure.in`` and possibly ``NEWS``.
2. Bump the version numbers in ``main/php_version.h``, ``configure.in`` and possibly ``NEWS``.
2. If a CVE commit needs to be merged to the release, then have it commited to
the base branches and merged upwards as usual (f.e commit the CVE fix to 5.3,
merge to 5.4, 5.5 etc...). Then you can cherry-pick it in your release branch.
Don't forget to update NEWS manually in an extra commit then.
3. **Merge** all related sections in NEWS (f.e. merge the 5.4.1RC1 and 5.4.0 sections)
3. Commit those changes
4. Commit those changes
5. run the "scripts/dev/credits" script in php-src and commit the changes in the
4. 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. "``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!!
5. Compile and make test, with and without ZTS, using the right Bison version
(for example, for 5.5, Bison 2.4.1 is used)
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 "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.
6. Check ./sapi/cli/php -v output for version matching.
8. Commit those changes
7. tag the repository with the version f.e. "``git tag -s php-5.4.1``"
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).
8. Push the tag f.e. "``git push origin php-5.4.1``"
10. You do not have to update the tree, but of course you can with "``git pull
origin <branch>``".
9. run: ``PHPROOT=. ./makedist php 5.4.1``, this will export the tag, create configure
and build three tarballs (gz, bz2 and xz).
Check if the pear files are updated (phar).
11. run: ``./makedist php 5.4.1``, this will export the tree, create configure
and build two tarballs (one gz and one bz2).
10. Generate the GPG signature files for the archives.
``gpg -u YOUREMAIL --armor --detach-sign php-X.Y.Z.tar.xxx``
12. Commit those two tarballs to web/php-distributions.git, then update the git
submodule reference in web/php.git:
git submodule init;
11. Commit and push all the tarballs and signature files to web/php-distributions.git,
then update the git submodule reference in web/php.git:
``git submodule init;
git submodule update;
cd distributions;
git pull origin master;
cd ..;
git commit distributions;
git push;
git push;``
This is to fetch the last commit id from php-distributions.git and commit this
last commit id to web/php.git, then, mirrors will now sync
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
those are made, they should be committed to SVN too.
14. Check if the pear files are updated (phar for 5.1+ or run pear/make-pear-bundle.php with 4.4)
15. When making a final release, also remind the PHP Windows development team
(internals-win@lists.php.net) to prepare the installer packages for Win32.
16. Make sure proper documentation exists for all new features/changes.
Coordinate the release with the PHP Documentation team.
12. Once the release has been tagged, contact the PHP Windows development team
(internals-win@lists.php.net) so that Windows binaries can be created.
Getting the stable release announced
------------------------------------
1. Run the bumpRelease script for phpweb on your local checkout
a. ``php bin/bumpRelease 5`` (or ``php bin/bumpRelease 4`` for PHP4)
a. ``php bin/bumpRelease 5`` to create the release file (releases/x_y_z.php)
The release announcement file should list in detail security fixes and
changes in behavior (whether due to a bug fix or not).
b. In case multiple PHP minor versions are in active development you have
to manually copy the old information to include/releases.inc
@@ -205,7 +207,13 @@ 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
3. Update phpweb/include/releases.php with the old release info
(updates the download archives)
4. Update php-qa/include/release-qa.php and add the next version as an QARELEASE
(prepare for next RC)
5. Update the ChangeLog file for the given major version
f.e. ``ChangeLog-5.php`` from the NEWS file
a. go over the list and put every element on one line
@@ -225,19 +233,10 @@ f.e. ``ChangeLog-5.php`` from the NEWS file
IV. ``s/Fixed PECL bug #\([0-9]\+\)/<?php peclbugfix(\1); ?>/``
V. ``s/FR #\([0-9]\+\)/FR <?php bugl(\1); ?>/``
e. You may want to try php-web/bin/news2html to automate this task
4. ``cp releases/5_4_0.php releases/5_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:
a. security fixes,
b. changes in behavior (whether due to a bug fix or not)
7. Add a short notice to phpweb stating that there is a new release, and
6. Add a short notice to phpweb stating that there is a new release, and
highlight the major important things (security fixes) and when it is important
to upgrade.
@@ -245,7 +244,11 @@ to upgrade.
b. Add the content for the news entry
8. Commit all the changes.
7. **Check mirrors have been synced before announcing or pushing news**
Try, f.e. http://www.php.net/get/php-5.5.1.tar.bz2/from/a/mirror
Try several mirrors, mirrors may update slowly (may take an hour)
8. Commit all the changes to their respective git repos
9. Wait an hour or two, then send a mail to php-announce@lists.php.net,
php-general@lists.php.net and internals@lists.php.net with a text similar to
+15
View File
@@ -153,3 +153,18 @@ ADDING SHARED MODULE SUPPORT TO A MODULE
#ifdef COMPILE_DL_FOO
ZEND_GET_MODULE(foo)
#endif
PECL SITE CONFORMITY
If you plan to release an extension to the PECL website, there are several
points to be regarded.
1. Add LICENSE or COPYING to the package.xml
2. The following should be defined in one of the extension header files
#define PHP_FOO_VERSION "1.2.3"
This macros has to be used within your foo_module_entry to indicate the
extension version.
+10 -1
View File
@@ -17,7 +17,7 @@ See https://wiki.php.net/rfc and https://wiki.php.net/rfc/voting for more
information on the process.
Bug fixes **do not** require an RFC, but require a bugtracker ticket. Always
open a ticket at http://bugs.php.net and reference the bug id using #NNNNNN.
open a ticket at https://bugs.php.net and reference the bug id using #NNNNNN.
Fix #55371: get_magic_quotes_gpc() throws deprecation warning
@@ -28,3 +28,12 @@ open a ticket at http://bugs.php.net and reference the bug id using #NNNNNN.
We do not merge pull requests directly on github. All PRs will be
pulled and pushed through http://git.php.net.
Guidelines for contributors
===========================
- [CODING_STANDARDS](/CODING_STANDARDS)
- [README.GIT-RULES](/README.GIT-RULES)
- [README.MAILINGLIST_RULES](/README.MAILINGLIST_RULES)
- [README.RELEASE_PROCESS](/README.RELEASE_PROCESS)
+5
View File
@@ -186,6 +186,9 @@ PHP 5.5 UPGRADE NOTES
DOMDocument::schemaValidate() accept flag parameter. Only flag
available now is LIBXML_SCHEMA_CREATE. Default is 0.
- Since 5.5.4, fputcsv() has fifth parameter escape_char, allowing to
specify escape char.
========================================
5. New Functions
========================================
@@ -340,6 +343,8 @@ None
- Intl:
- This extension now requires ICU 4.0+.
- Phar:
- Added ability of resolving alias created by Phar::map
========================================
9. New Global Constants
+1 -1
View File
@@ -10,7 +10,7 @@ libZend_la_SOURCES=\
zend_ini_parser.y zend_ini_scanner.l \
zend_alloc.c zend_compile.c zend_constants.c zend_dynamic_array.c \
zend_execute.c zend_execute_API.c zend_highlight.c zend_llist.c \
zend_opcode.c zend_operators.c zend_ptr_stack.c zend_stack.c \
zend_vm_opcodes.c zend_opcode.c zend_operators.c zend_ptr_stack.c zend_stack.c \
zend_variables.c zend.c zend_API.c zend_extensions.c zend_hash.c \
zend_list.c zend_indent.c zend_builtin_functions.c zend_sprintf.c \
zend_ini.c zend_qsort.c zend_objects.c zend_object_handlers.c \
+4
View File
@@ -261,6 +261,10 @@ SOURCE=.\zend_ts_hash.c
SOURCE=.\zend_variables.c
# End Source File
# Begin Source File
SOURCE=.\zend_vm_opcodes.c
# End Source File
# End Group
# Begin Group "Header Files"
+4
View File
@@ -291,6 +291,10 @@ SOURCE=.\zend_ts_hash.c
SOURCE=.\zend_variables.c
# End Source File
# Begin Source File
SOURCE=.\zend_vm_opcodes.c
# End Source File
# End Group
# Begin Group "Header Files"
+1 -1
View File
@@ -12,7 +12,7 @@ AC_DEFUN([LIBZEND_BISON_CHECK],[
bison_version=none
if test "$YACC"; then
AC_CACHE_CHECK([for bison version], php_cv_bison_version, [
bison_version_vars=`bison --version 2> /dev/null | grep 'GNU Bison' | cut -d ' ' -f 4 | $SED -e 's/\./ /' | tr -d a-z`
bison_version_vars=`$YACC --version 2> /dev/null | grep 'GNU Bison' | cut -d ' ' -f 4 | $SED -e 's/\./ /g' | tr -d a-z`
php_cv_bison_version=invalid
if test -n "$bison_version_vars"; then
set $bison_version_vars
+1 -1
View File
@@ -24,6 +24,6 @@ Warning: feof(): wrapper::stream_eof is not implemented! Assuming EOF in %s on l
Fatal error: Uncaught exception 'Exception' in %s:%d
Stack trace:
#0 [internal function]: wrapper->stream_eof()
#1 %s(%d): feof(Resource id #6)
#1 %s(%d): feof(Resource id #%d)
#2 {main}
thrown in %s on line %d
+30
View File
@@ -0,0 +1,30 @@
--TEST--
Bug #60598 (cli/apache sapi segfault on objects manipulation)
--FILE--
<?php
define('OBJECT_COUNT', 10000);
$containers = array();
class Object {
protected $_guid = 0;
public function __construct() {
global $containers;
$this->guid = 1;
$containers[spl_object_hash($this)] = $this;
}
public function __destruct() {
global $containers;
$containers[spl_object_hash($this)] = NULL;
}
}
for ($i = 0; $i < OBJECT_COUNT; ++$i) {
new Object();
}
// You probably won't see this because of the "zend_mm_heap corrupted"
?>
If you see this, try to increase OBJECT_COUNT to 100,000
--EXPECT--
If you see this, try to increase OBJECT_COUNT to 100,000
+47
View File
@@ -0,0 +1,47 @@
--TEST--
Bug #64896 (Segfault with gc_collect_cycles using unserialize on certain objects)
--XFAIL--
We can not fix this bug without a significant (performace slow down) change to gc
--FILE--
<?php
$bar = NULL;
class bad
{
private $_private = array();
public function __construct()
{
$this->_private[] = 'php';
}
public function __destruct()
{
global $bar;
$bar = $this;
}
}
$foo = new stdclass;
$foo->foo = $foo;
$foo->bad = new bad;
gc_disable();
unserialize(serialize($foo));
gc_collect_cycles();
var_dump($bar);
/* will output:
object(bad)#4 (1) {
["_private":"bad":private]=>
&UNKNOWN:0
}
*/
?>
--EXPECTF--
bject(bad)#%d (1) {
["_private":"bad":private]=>
array(1) {
[0]=>
string(3) "php"
}
}
+30
View File
@@ -0,0 +1,30 @@
--TEST--
Bug #64979 (Wrong behavior of static variables in closure generators)
--FILE--
<?php
function new_closure_gen() {
return function() {
static $foo = 0;
yield ++$foo;
};
}
$closure1 = new_closure_gen();
$closure2 = new_closure_gen();
$gen1 = $closure1();
$gen2 = $closure1();
$gen3 = $closure2();
foreach (array($gen1, $gen2, $gen3) as $gen) {
foreach ($gen as $val) {
var_dump($val);
}
}
?>
--EXPECT--
int(1)
int(2)
int(1)
+22
View File
@@ -0,0 +1,22 @@
--TEST--
Bug #65322: compile time errors won't trigger auto loading
--FILE--
<?php
spl_autoload_register(function($class) {
var_dump($class);
class B {}
});
set_error_handler(function($_, $msg, $file) {
var_dump($msg, $file);
new B;
});
eval('class A { function a() {} function __construct() {} }');
?>
--EXPECTF--
string(50) "Redefining already defined constructor for class A"
string(%d) "%s(%d) : eval()'d code"
string(1) "B"
+29
View File
@@ -0,0 +1,29 @@
--TEST--
Bug #65579 (Using traits with get_class_methods causes segfault)
--FILE--
<?php
trait ParentTrait {
public function testMethod() { }
}
trait ChildTrait {
use ParentTrait {
testMethod as testMethodFromParentTrait;
}
public function testMethod() { }
}
class TestClass {
use ChildTrait;
}
$obj = new TestClass();
var_dump(get_class_methods($obj));
?>
--EXPECT--
array(2) {
[0]=>
string(10) "testMethod"
[1]=>
string(25) "testmethodfromparenttrait"
}
+62
View File
@@ -0,0 +1,62 @@
--TEST--
Fixed Bug #65784 (Segfault with finally)
--XFAIL--
This bug is not fixed in 5.5 due to ABI BC
--FILE--
<?php
function foo1() {
try {
throw new Exception("not catch");
return true;
} finally {
try {
throw new Exception("catched");
} catch (Exception $e) {
}
}
}
try {
$foo = foo1();
var_dump($foo);
} catch (Exception $e) {
do {
var_dump($e->getMessage());
} while ($e = $e->getPrevious());
}
function foo2() {
try {
try {
throw new Exception("catched");
return true;
} finally {
try {
throw new Exception("catched");
} catch (Exception $e) {
}
}
} catch (Exception $e) {
}
}
$foo = foo2();
var_dump($foo);
function foo3() {
try {
throw new Exception("not catched");
return true;
} finally {
try {
throw new NotExists();
} catch (Exception $e) {
}
}
}
$bar = foo3();
--EXPECTF--
string(9) "not catch"
NULL
Fatal error: Class 'NotExists' not found in %sbug65784.php on line %d
+20
View File
@@ -0,0 +1,20 @@
--TEST--
Bug #65911 (scope resolution operator - strange behavior with $this)
--FILE--
<?php
class A {}
class B
{
public function go()
{
$this->foo = 'bar';
echo A::$this->foo; // should not output 'bar'
}
}
$obj = new B();
$obj->go();
?>
--EXPECTF--
Fatal error: Access to undeclared static property: A::$this in %s on line %d
+10
View File
@@ -0,0 +1,10 @@
--TEST--
Bug #65969 (Chain assignment with T_LIST failure)
--FILE--
<?php
$obj = new stdClass;
list($a,$b) = $obj->prop = [1,2];
var_dump($a,$b);
--EXPECT--
int(1)
int(2)
+21
View File
@@ -0,0 +1,21 @@
--TEST--
Bug #66218 zend_register_functions breaks reflection
--SKIPIF--
<?php
if (PHP_SAPI != "cli") die("skip CLI only test");
if (!function_exists("dl")) die("skip need dl");
?>
--FILE--
<?php
$tab = get_extension_funcs("standard");
$fcts = array("dl");
foreach ($fcts as $fct) {
if (in_array($fct, $tab)) {
echo "$fct Ok\n";
}
}
?>
Done
--EXPECTF--
dl Ok
Done
+26
View File
@@ -0,0 +1,26 @@
--TEST--
Closure 047: Use in preg_replace_callback() using variables by reference
--FILE--
<?php
function replace_variables($text, $params) {
preg_replace_callback( '/(\?)/', function($matches) use (&$params, &$text) {
$text = preg_replace( '/(\?)/', array_shift( $params ), $text, 1 );
}, $text );
return $text;
}
echo replace_variables('a=?', array('0')) . "\n";
echo replace_variables('a=?, b=?', array('0', '1')) . "\n";
echo replace_variables('a=?, b=?, c=?', array('0', '1', '2')) . "\n";
echo "Done\n";
?>
--EXPECT--
a=0
a=0, b=1
a=0, b=1, c=2
Done
+26
View File
@@ -0,0 +1,26 @@
--TEST--
Closure 048: Use in preg_replace_callback() using variables by reference
--FILE--
<?php
function replace_variables($text, $params) {
$c = function($matches) use (&$params, &$text) {
$text = preg_replace( '/(\?)/', array_shift( $params ), $text, 1 );
};
preg_replace_callback( '/(\?)/', $c, $text );
return $text;
}
echo replace_variables('a=?', array('0')) . "\n";
echo replace_variables('a=?, b=?', array('0', '1')) . "\n";
echo replace_variables('a=?, b=?, c=?', array('0', '1', '2')) . "\n";
echo "Done\n";
?>
--EXPECT--
a=0
a=0, b=1
a=0, b=1, c=2
Done
+18
View File
@@ -0,0 +1,18 @@
--TEST--
Error message in error handler during compilation
--FILE--
<?php
set_error_handler(function($_, $msg, $file) {
var_dump($msg, $file);
echo $undefined;
});
eval('class A { function a() {} function __construct() {} }');
?>
--EXPECTF--
string(50) "Redefining already defined constructor for class A"
string(%d) "%s(%d) : eval()'d code"
Notice: Undefined variable: undefined in %s on line %d
+17
View File
@@ -0,0 +1,17 @@
--TEST--
Bug #66041: list() fails to unpack yielded ArrayAccess object
--FILE--
<?php
function dumpElement() {
list($value) = yield;
var_dump($value);
};
$fixedArray = new SplFixedArray(1);
$fixedArray[0] = 'the element';
$generator = dumpElement();
$generator->send($fixedArray);
?>
--EXPECT--
string(11) "the element"
+2
View File
@@ -4,6 +4,7 @@ Generator::throw() where the exception is caught in the generator
<?php
function gen() {
echo "before yield\n";
try {
yield;
} catch (RuntimeException $e) {
@@ -18,6 +19,7 @@ var_dump($gen->throw(new RuntimeException('Test')));
?>
--EXPECTF--
before yield
exception 'RuntimeException' with message 'Test' in %s:%d
Stack trace:
#0 {main}
+2
View File
@@ -4,6 +4,7 @@ Generator::throw() where the generator throws a different exception
<?php
function gen() {
echo "before yield\n";
try {
yield;
} catch (RuntimeException $e) {
@@ -18,6 +19,7 @@ var_dump($gen->throw(new RuntimeException('throw')));
?>
--EXPECTF--
before yield
Caught: exception 'RuntimeException' with message 'throw' in %s:%d
Stack trace:
#0 {main}
+7 -7
View File
@@ -43,10 +43,6 @@
# define GLOBAL_CONSTANTS_TABLE EG(zend_constants)
#endif
#if defined(ZEND_WIN32) && ZEND_DEBUG
BOOL WINAPI IsDebuggerPresent(VOID);
#endif
/* true multithread-shared globals */
ZEND_API zend_class_entry *zend_standard_class_def = NULL;
ZEND_API int (*zend_printf)(const char *format, ...);
@@ -1092,17 +1088,19 @@ ZEND_API void zend_error(int type, const char *format, ...) /* {{{ */
error_filename = "Unknown";
}
va_start(args, format);
#ifdef HAVE_DTRACE
if(DTRACE_ERROR_ENABLED()) {
char *dtrace_error_buffer;
va_start(args, format);
zend_vspprintf(&dtrace_error_buffer, 0, format, args);
DTRACE_ERROR(dtrace_error_buffer, (char *)error_filename, error_lineno);
efree(dtrace_error_buffer);
va_end(args);
}
#endif /* HAVE_DTRACE */
va_start(args, format);
/* if we don't have a user defined error handler */
if (!EG(user_error_handler)
|| !(EG(user_error_handler_error_reporting) & type)
@@ -1182,7 +1180,7 @@ ZEND_API void zend_error(int type, const char *format, ...) /* {{{ */
* such scripts recursivly, but some CG() variables may be
* inconsistent. */
in_compilation = zend_is_compiling(TSRMLS_C);
in_compilation = CG(in_compilation);
if (in_compilation) {
saved_class_entry = CG(active_class_entry);
CG(active_class_entry) = NULL;
@@ -1194,6 +1192,7 @@ ZEND_API void zend_error(int type, const char *format, ...) /* {{{ */
SAVE_STACK(declare_stack);
SAVE_STACK(list_stack);
SAVE_STACK(context_stack);
CG(in_compilation) = 0;
}
if (call_user_function_ex(CG(function_table), NULL, orig_user_error_handler, &retval, 5, params, 1, NULL TSRMLS_CC) == SUCCESS) {
@@ -1218,6 +1217,7 @@ ZEND_API void zend_error(int type, const char *format, ...) /* {{{ */
RESTORE_STACK(declare_stack);
RESTORE_STACK(list_stack);
RESTORE_STACK(context_stack);
CG(in_compilation) = 1;
}
if (!EG(user_error_handler)) {
+15 -9
View File
@@ -2577,7 +2577,12 @@ ZEND_API int zend_register_class_alias_ex(const char *name, int name_len, zend_c
char *lcname = zend_str_tolower_dup(name, name_len);
int ret;
ret = zend_hash_add(CG(class_table), lcname, name_len+1, &ce, sizeof(zend_class_entry *), NULL);
if (lcname[0] == '\\') {
ret = zend_hash_add(CG(class_table), lcname+1, name_len, &ce, sizeof(zend_class_entry *), NULL);
} else {
ret = zend_hash_add(CG(class_table), lcname, name_len+1, &ce, sizeof(zend_class_entry *), NULL);
}
efree(lcname);
if (ret == SUCCESS) {
ce->refcount++;
@@ -3980,15 +3985,16 @@ ZEND_API const char* zend_find_alias_name(zend_class_entry *ce, const char *name
{
zend_trait_alias *alias, **alias_ptr;
alias_ptr = ce->trait_aliases;
alias = *alias_ptr;
while (alias) {
if (alias->alias_len == len &&
!strncasecmp(name, alias->alias, alias->alias_len)) {
return alias->alias;
}
alias_ptr++;
if ((alias_ptr = ce->trait_aliases)) {
alias = *alias_ptr;
while (alias) {
if (alias->alias_len == len &&
!strncasecmp(name, alias->alias, alias->alias_len)) {
return alias->alias;
}
alias_ptr++;
alias = *alias_ptr;
}
}
return name;
+35 -29
View File
@@ -1399,15 +1399,8 @@ ZEND_FUNCTION(class_alias)
return;
}
if (!autoload) {
lc_name = do_alloca(class_name_len + 1, use_heap);
zend_str_tolower_copy(lc_name, class_name, class_name_len);
found = zend_lookup_class_ex(class_name, class_name_len, NULL, autoload, &ce TSRMLS_CC);
found = zend_hash_find(EG(class_table), lc_name, class_name_len+1, (void **) &ce);
free_alloca(lc_name, use_heap);
} else {
found = zend_lookup_class(class_name, class_name_len, &ce TSRMLS_CC);
}
if (found == SUCCESS) {
if ((*ce)->type == ZEND_USER_CLASS) {
if (zend_register_class_alias_ex(alias_name, alias_name_len, *ce TSRMLS_CC) == SUCCESS) {
@@ -2444,36 +2437,49 @@ ZEND_FUNCTION(extension_loaded)
Returns an array with the names of functions belonging to the named extension */
ZEND_FUNCTION(get_extension_funcs)
{
char *extension_name;
int extension_name_len;
char *extension_name, *lcname;
int extension_name_len, array;
zend_module_entry *module;
const zend_function_entry *func;
HashPosition iterator;
zend_function *zif;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &extension_name, &extension_name_len) == FAILURE) {
return;
}
if (strncasecmp(extension_name, "zend", sizeof("zend"))) {
char *lcname = zend_str_tolower_dup(extension_name, extension_name_len);
if (zend_hash_find(&module_registry, lcname,
extension_name_len+1, (void**)&module) == FAILURE) {
efree(lcname);
RETURN_FALSE;
}
efree(lcname);
if (!(func = module->functions)) {
RETURN_FALSE;
}
lcname = zend_str_tolower_dup(extension_name, extension_name_len);
} else {
func = builtin_functions;
lcname = estrdup("core");
}
if (zend_hash_find(&module_registry, lcname,
extension_name_len+1, (void**)&module) == FAILURE) {
efree(lcname);
RETURN_FALSE;
}
array_init(return_value);
zend_hash_internal_pointer_reset_ex(CG(function_table), &iterator);
if (module->functions) {
/* avoid BC break, if functions list is empty, will return an empty array */
array_init(return_value);
array = 1;
} else {
array = 0;
}
while (zend_hash_get_current_data_ex(CG(function_table), (void **) &zif, &iterator) == SUCCESS) {
if (zif->common.type==ZEND_INTERNAL_FUNCTION
&& zif->internal_function.module == module) {
if (!array) {
array_init(return_value);
array = 1;
}
add_next_index_string(return_value, zif->common.function_name, 1);
}
zend_hash_move_forward_ex(CG(function_table), &iterator);
}
while (func->fname) {
add_next_index_string(return_value, func->fname, 1);
func++;
efree(lcname);
if (!array) {
RETURN_FALSE;
}
}
/* }}} */
+4 -32
View File
@@ -908,6 +908,7 @@ static zend_bool opline_is_fetch_this(const zend_op *opline TSRMLS_DC) /* {{{ */
{
if ((opline->opcode == ZEND_FETCH_W) && (opline->op1_type == IS_CONST)
&& (Z_TYPE(CONSTANT(opline->op1.constant)) == IS_STRING)
&& ((opline->extended_value & ZEND_FETCH_STATIC_MEMBER) != ZEND_FETCH_STATIC_MEMBER)
&& (Z_HASH_P(&CONSTANT(opline->op1.constant)) == THIS_HASHVAL)
&& (Z_STRLEN(CONSTANT(opline->op1.constant)) == (sizeof("this")-1))
&& !memcmp(Z_STRVAL(CONSTANT(opline->op1.constant)), "this", sizeof("this"))) {
@@ -1749,7 +1750,6 @@ void zend_do_begin_function_declaration(znode *function_token, znode *function_n
zend_op dummy_opline;
dummy_opline.result_type = IS_UNUSED;
dummy_opline.op1_type = IS_UNUSED;
zend_stack_push(&CG(foreach_copy_stack), (void *) &dummy_opline, sizeof(zend_op));
}
@@ -2662,7 +2662,7 @@ static int generate_free_switch_expr(const zend_switch_entry *switch_entry TSRML
opline->opcode = (switch_entry->cond.op_type == IS_TMP_VAR) ? ZEND_FREE : ZEND_SWITCH_FREE;
SET_NODE(opline->op1, &switch_entry->cond);
SET_UNUSED(opline->op2);
opline->extended_value = 0;
return 0;
}
/* }}} */
@@ -2672,7 +2672,7 @@ static int generate_free_foreach_copy(const zend_op *foreach_copy TSRMLS_DC) /*
zend_op *opline;
/* If we reach the separator then stop applying the stack */
if (foreach_copy->result_type == IS_UNUSED && foreach_copy->op1_type == IS_UNUSED) {
if (foreach_copy->result_type == IS_UNUSED) {
return 1;
}
@@ -2681,16 +2681,6 @@ static int generate_free_foreach_copy(const zend_op *foreach_copy TSRMLS_DC) /*
opline->opcode = (foreach_copy->result_type == IS_TMP_VAR) ? ZEND_FREE : ZEND_SWITCH_FREE;
COPY_NODE(opline->op1, foreach_copy->result);
SET_UNUSED(opline->op2);
opline->extended_value = 1;
if (foreach_copy->op1_type != IS_UNUSED) {
opline = get_next_op(CG(active_op_array) TSRMLS_CC);
opline->opcode = (foreach_copy->op1_type == IS_TMP_VAR) ? ZEND_FREE : ZEND_SWITCH_FREE;
COPY_NODE(opline->op1, foreach_copy->op1);
SET_UNUSED(opline->op2);
opline->extended_value = 0;
}
return 0;
}
@@ -2792,7 +2782,7 @@ void zend_do_yield(znode *result, znode *value, const znode *key, zend_bool is_v
SET_UNUSED(opline->op2);
}
opline->result_type = IS_TMP_VAR;
opline->result_type = IS_VAR;
opline->result.var = get_temporary_variable(CG(active_op_array));
GET_NODE(result, opline->result);
}
@@ -6227,7 +6217,6 @@ void zend_do_foreach_begin(znode *foreach_token, znode *open_brackets_token, zno
{
zend_op *opline;
zend_bool is_variable;
zend_bool push_container = 0;
zend_op dummy_opline;
if (variable) {
@@ -6239,14 +6228,6 @@ void zend_do_foreach_begin(znode *foreach_token, znode *open_brackets_token, zno
/* save the location of FETCH_W instruction(s) */
open_brackets_token->u.op.opline_num = get_next_op_number(CG(active_op_array));
zend_do_end_variable_parse(array, BP_VAR_W, 0 TSRMLS_CC);
if (CG(active_op_array)->last > 0 &&
CG(active_op_array)->opcodes[CG(active_op_array)->last-1].opcode == ZEND_FETCH_OBJ_W) {
/* Only lock the container if we are fetching from a real container and not $this */
if (CG(active_op_array)->opcodes[CG(active_op_array)->last-1].op1_type == IS_VAR) {
CG(active_op_array)->opcodes[CG(active_op_array)->last-1].extended_value |= ZEND_FETCH_ADD_LOCK;
push_container = 1;
}
}
} else {
is_variable = 0;
open_brackets_token->u.op.opline_num = get_next_op_number(CG(active_op_array));
@@ -6266,11 +6247,6 @@ void zend_do_foreach_begin(znode *foreach_token, znode *open_brackets_token, zno
opline->extended_value = is_variable ? ZEND_FE_RESET_VARIABLE : 0;
COPY_NODE(dummy_opline.result, opline->result);
if (push_container) {
COPY_NODE(dummy_opline.op1, CG(active_op_array)->opcodes[CG(active_op_array)->last-2].op1);
} else {
dummy_opline.op1_type = IS_UNUSED;
}
zend_stack_push(&CG(foreach_copy_stack), (void *) &dummy_opline, sizeof(zend_op));
/* save the location of FE_FETCH */
@@ -6327,7 +6303,6 @@ void zend_do_foreach_cont(znode *foreach_token, const znode *open_brackets_token
opline->extended_value |= ZEND_FE_FETCH_BYREF;
CG(active_op_array)->opcodes[foreach_token->u.op.opline_num].extended_value |= ZEND_FE_RESET_REFERENCE;
} else {
zend_op *foreach_copy;
zend_op *fetch = &CG(active_op_array)->opcodes[foreach_token->u.op.opline_num];
zend_op *end = &CG(active_op_array)->opcodes[open_brackets_token->u.op.opline_num];
@@ -6344,9 +6319,6 @@ void zend_do_foreach_cont(znode *foreach_token, const znode *open_brackets_token
fetch->opcode -= 3; /* FETCH_W -> FETCH_R */
}
}
/* prevent double SWITCH_FREE */
zend_stack_top(&CG(foreach_copy_stack), (void **) &foreach_copy);
foreach_copy->op1_type = IS_UNUSED;
}
GET_NODE(&value_node, opline->result);
-2
View File
@@ -58,10 +58,8 @@ ZEND_API void dtrace_execute_ex(zend_execute_data *execute_data TSRMLS_DC)
}
if (DTRACE_FUNCTION_ENTRY_ENABLED() || DTRACE_FUNCTION_RETURN_ENABLED()) {
filename = dtrace_get_executed_filename(TSRMLS_C);
classname = get_active_class_name(&scope TSRMLS_CC);
funcname = get_active_function_name(TSRMLS_C);
lineno = zend_get_executed_lineno(TSRMLS_C);
}
if (DTRACE_EXECUTE_ENTRY_ENABLED()) {
+4 -4
View File
@@ -560,7 +560,7 @@ ZEND_METHOD(exception, getPrevious)
RETURN_ZVAL(previous, 1, 0);
}
int zend_spprintf(char **message, int max_len, char *format, ...) /* {{{ */
int zend_spprintf(char **message, int max_len, const char *format, ...) /* {{{ */
{
va_list arg;
int len;
@@ -732,7 +732,7 @@ ZEND_API zend_class_entry *zend_get_error_exception(TSRMLS_D) /* {{{ */
}
/* }}} */
ZEND_API zval * zend_throw_exception(zend_class_entry *exception_ce, char *message, long code TSRMLS_DC) /* {{{ */
ZEND_API zval * zend_throw_exception(zend_class_entry *exception_ce, const char *message, long code TSRMLS_DC) /* {{{ */
{
zval *ex;
@@ -760,7 +760,7 @@ ZEND_API zval * zend_throw_exception(zend_class_entry *exception_ce, char *messa
}
/* }}} */
ZEND_API zval * zend_throw_exception_ex(zend_class_entry *exception_ce, long code TSRMLS_DC, char *format, ...) /* {{{ */
ZEND_API zval * zend_throw_exception_ex(zend_class_entry *exception_ce, long code TSRMLS_DC, const char *format, ...) /* {{{ */
{
va_list arg;
char *message;
@@ -775,7 +775,7 @@ ZEND_API zval * zend_throw_exception_ex(zend_class_entry *exception_ce, long cod
}
/* }}} */
ZEND_API zval * zend_throw_error_exception(zend_class_entry *exception_ce, char *message, long code, int severity TSRMLS_DC) /* {{{ */
ZEND_API zval * zend_throw_error_exception(zend_class_entry *exception_ce, const char *message, long code, int severity TSRMLS_DC) /* {{{ */
{
zval *ex = zend_throw_exception(exception_ce, message, code TSRMLS_CC);
zend_update_property_long(default_exception_ce, ex, "severity", sizeof("severity")-1, severity TSRMLS_CC);
+4 -4
View File
@@ -40,12 +40,12 @@ ZEND_API void zend_register_default_classes(TSRMLS_D);
/* exception_ce NULL or zend_exception_get_default() or a derived class
* message NULL or the message of the exception */
ZEND_API zval * zend_throw_exception(zend_class_entry *exception_ce, char *message, long code TSRMLS_DC);
ZEND_API zval * zend_throw_exception_ex(zend_class_entry *exception_ce, long code TSRMLS_DC, char *format, ...);
ZEND_API zval * zend_throw_exception(zend_class_entry *exception_ce, const char *message, long code TSRMLS_DC);
ZEND_API zval * zend_throw_exception_ex(zend_class_entry *exception_ce, long code TSRMLS_DC, const char *format, ...);
ZEND_API void zend_throw_exception_object(zval *exception TSRMLS_DC);
ZEND_API void zend_clear_exception(TSRMLS_D);
ZEND_API zval * zend_throw_error_exception(zend_class_entry *exception_ce, char *message, long code, int severity TSRMLS_DC);
ZEND_API zval * zend_throw_error_exception(zend_class_entry *exception_ce, const char *message, long code, int severity TSRMLS_DC);
extern ZEND_API void (*zend_throw_exception_hook)(zval *ex TSRMLS_DC);
@@ -53,7 +53,7 @@ extern ZEND_API void (*zend_throw_exception_hook)(zval *ex TSRMLS_DC);
ZEND_API void zend_exception_error(zval *exception, int severity TSRMLS_DC);
/* do not export, in php it's available thru spprintf directly */
int zend_spprintf(char **message, int max_len, char *format, ...);
int zend_spprintf(char **message, int max_len, const char *format, ...);
END_EXTERN_C()
+1 -2
View File
@@ -1247,9 +1247,8 @@ convert_to_array:
}
}
static void zend_fetch_dimension_address_read(temp_variable *result, zval **container_ptr, zval *dim, int dim_type, int type TSRMLS_DC)
static void zend_fetch_dimension_address_read(temp_variable *result, zval *container, zval *dim, int dim_type, int type TSRMLS_DC)
{
zval *container = *container_ptr;
zval **retval;
switch (Z_TYPE_P(container)) {
+1 -1
View File
@@ -293,7 +293,7 @@ static zend_always_inline void zend_vm_stack_clear_multiple(int nested TSRMLS_DC
void **end = p - (int)(zend_uintptr_t)*p;
while (p != end) {
zval *q = *(zval **)(--p);
zval *q = (zval *) *(--p);
*p = NULL;
i_zval_ptr_dtor(q ZEND_FILE_LINE_CC);
}
+8
View File
@@ -1063,6 +1063,14 @@ ZEND_API int zend_lookup_class_ex(const char *name, int name_length, const zend_
return FAILURE;
}
/* Verify class name before passing it to __autoload() */
if (strspn(name, "0123456789_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\177\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377\\") != name_length) {
if (!key) {
free_alloca(lc_free, use_heap);
}
return FAILURE;
}
if (EG(in_autoload) == NULL) {
ALLOC_HASHTABLE(EG(in_autoload));
zend_hash_init(EG(in_autoload), 0, NULL, NULL, 0);
+108 -66
View File
@@ -29,6 +29,73 @@ static zend_object_handlers zend_generator_handlers;
static zend_object_value zend_generator_create(zend_class_entry *class_type TSRMLS_DC);
static void zend_generator_cleanup_unfinished_execution(zend_generator *generator TSRMLS_DC) /* {{{ */
{
zend_execute_data *execute_data = generator->execute_data;
zend_op_array *op_array = execute_data->op_array;
if (generator->send_target) {
Z_DELREF_PP(generator->send_target);
generator->send_target = NULL;
}
/* Manually free loop variables, as execution couldn't reach their
* SWITCH_FREE / FREE opcodes. */
{
/* -1 required because we want the last run opcode, not the
* next to-be-run one. */
zend_uint op_num = execute_data->opline - op_array->opcodes - 1;
int i;
for (i = 0; i < op_array->last_brk_cont; ++i) {
zend_brk_cont_element *brk_cont = op_array->brk_cont_array + i;
if (brk_cont->start < 0) {
continue;
} else if (brk_cont->start > op_num) {
break;
} else if (brk_cont->brk > op_num) {
zend_op *brk_opline = op_array->opcodes + brk_cont->brk;
switch (brk_opline->opcode) {
case ZEND_SWITCH_FREE:
{
temp_variable *var = EX_TMP_VAR(execute_data, brk_opline->op1.var);
zval_ptr_dtor(&var->var.ptr);
}
break;
case ZEND_FREE:
{
temp_variable *var = EX_TMP_VAR(execute_data, brk_opline->op1.var);
zval_dtor(&var->tmp_var);
}
break;
}
}
}
}
/* Clear any backed up stack arguments */
{
void **ptr = generator->stack->top - 1;
void **end = zend_vm_stack_frame_base(execute_data);
for (; ptr >= end; --ptr) {
zval_ptr_dtor((zval **) ptr);
}
}
/* If yield was used as a function argument there may be active
* method calls those objects need to be freed */
while (execute_data->call >= execute_data->call_slots) {
if (execute_data->call->object) {
zval_ptr_dtor(&execute_data->call->object);
}
execute_data->call--;
}
}
/* }}} */
ZEND_API void zend_generator_close(zend_generator *generator, zend_bool finished_execution TSRMLS_DC) /* {{{ */
{
if (generator->value) {
@@ -61,65 +128,6 @@ ZEND_API void zend_generator_close(zend_generator *generator, zend_bool finished
return;
}
/* If the generator is closed before it can finish execution (reach
* a return statement) we have to free loop variables manually, as
* we don't know whether the SWITCH_FREE / FREE opcodes have run */
if (!finished_execution) {
/* -1 required because we want the last run opcode, not the
* next to-be-run one. */
zend_uint op_num = execute_data->opline - op_array->opcodes - 1;
int i;
for (i = 0; i < op_array->last_brk_cont; ++i) {
zend_brk_cont_element *brk_cont = op_array->brk_cont_array + i;
if (brk_cont->start < 0) {
continue;
} else if (brk_cont->start > op_num) {
break;
} else if (brk_cont->brk > op_num) {
zend_op *brk_opline = op_array->opcodes + brk_cont->brk;
switch (brk_opline->opcode) {
case ZEND_SWITCH_FREE:
{
temp_variable *var = EX_TMP_VAR(execute_data, brk_opline->op1.var);
zval_ptr_dtor(&var->var.ptr);
}
break;
case ZEND_FREE:
{
temp_variable *var = EX_TMP_VAR(execute_data, brk_opline->op1.var);
zval_dtor(&var->tmp_var);
}
break;
}
}
}
}
/* Clear any backed up stack arguments */
if (generator->stack != EG(argument_stack)) {
void **ptr = generator->stack->top - 1;
void **end = zend_vm_stack_frame_base(execute_data);
/* If the top stack element is the argument count, skip it */
if (execute_data->function_state.arguments) {
ptr--;
}
for (; ptr >= end; --ptr) {
zval_ptr_dtor((zval**) ptr);
}
}
while (execute_data->call >= execute_data->call_slots) {
if (execute_data->call->object) {
zval_ptr_dtor(&execute_data->call->object);
}
execute_data->call--;
}
/* We have added an additional stack frame in prev_execute_data, so we
* have to free it. It also contains the arguments passed to the
* generator (for func_get_args) so those have to be freed too. */
@@ -138,6 +146,12 @@ ZEND_API void zend_generator_close(zend_generator *generator, zend_bool finished
}
}
/* Some cleanups are only necessary if the generator was closued
* before it could finish execution (reach a return statement). */
if (!finished_execution) {
zend_generator_cleanup_unfinished_execution(generator TSRMLS_CC);
}
/* Free a clone of closure */
if (op_array->fn_flags & ZEND_ACC_CLOSURE) {
destroy_op_array(op_array TSRMLS_CC);
@@ -145,10 +159,6 @@ ZEND_API void zend_generator_close(zend_generator *generator, zend_bool finished
}
efree(generator->stack);
if (generator->stack == EG(argument_stack)) {
/* abnormal exit for running generator */
EG(argument_stack) = NULL;
}
generator->execute_data = NULL;
}
}
@@ -226,6 +236,16 @@ static zend_object_value zend_generator_create(zend_class_entry *class_type TSRM
}
/* }}} */
static void copy_closure_static_var(zval **var TSRMLS_DC, int num_args, va_list args, zend_hash_key *key) /* {{{ */
{
HashTable *target = va_arg(args, HashTable *);
SEPARATE_ZVAL_TO_MAKE_IS_REF(var);
Z_ADDREF_PP(var);
zend_hash_quick_update(target, key->arKey, key->nKeyLength, key->h, var, sizeof(zval *), NULL);
}
/* }}} */
/* Requires globals EG(scope), EG(current_scope), EG(This),
* EG(active_symbol_table) and EG(current_execute_data). */
ZEND_API zval *zend_generator_create_zval(zend_op_array *op_array TSRMLS_DC) /* {{{ */
@@ -242,7 +262,23 @@ ZEND_API zval *zend_generator_create_zval(zend_op_array *op_array TSRMLS_DC) /*
if (op_array->fn_flags & ZEND_ACC_CLOSURE) {
zend_op_array *op_array_copy = (zend_op_array*)emalloc(sizeof(zend_op_array));
*op_array_copy = *op_array;
function_add_ref((zend_function *) op_array_copy);
(*op_array->refcount)++;
op_array->run_time_cache = NULL;
if (op_array->static_variables) {
ALLOC_HASHTABLE(op_array_copy->static_variables);
zend_hash_init(
op_array_copy->static_variables,
zend_hash_num_elements(op_array->static_variables),
NULL, ZVAL_PTR_DTOR, 0
);
zend_hash_apply_with_arguments(
op_array->static_variables TSRMLS_CC,
(apply_func_args_t) copy_closure_static_var,
1, op_array_copy->static_variables
);
}
op_array = op_array_copy;
}
@@ -493,8 +529,12 @@ ZEND_METHOD(Generator, send)
return;
}
/* Put sent value into the TMP_VAR slot */
MAKE_COPY_ZVAL(&value, &generator->send_target->tmp_var);
/* Put sent value in the target VAR slot, if it is used */
if (generator->send_target) {
Z_DELREF_PP(generator->send_target);
Z_ADDREF_P(value);
*generator->send_target = value;
}
zend_generator_resume(generator TSRMLS_CC);
@@ -520,6 +560,8 @@ ZEND_METHOD(Generator, throw)
generator = (zend_generator *) zend_object_store_get_object(getThis() TSRMLS_CC);
zend_generator_ensure_initialized(generator TSRMLS_CC);
if (generator->execute_data) {
/* Throw the exception in the context of the generator */
zend_execute_data *current_execute_data = EG(current_execute_data);
+1 -1
View File
@@ -49,7 +49,7 @@ typedef struct _zend_generator {
/* Current key */
zval *key;
/* Variable to put sent value into */
temp_variable *send_target;
zval **send_target;
/* Largest used integer key for auto-incrementing keys */
long largest_used_integer_key;
+1 -1
View File
@@ -1,4 +1,4 @@
/* Generated by re2c 0.13.5 */
/* Generated by re2c 0.13.5 on Sun Dec 22 13:03:33 2013 */
#line 1 "Zend/zend_language_scanner.l"
/*
+----------------------------------------------------------------------+
+1 -1
View File
@@ -1,4 +1,4 @@
/* Generated by re2c 0.13.5 */
/* Generated by re2c 0.13.5 on Sun Dec 22 13:03:33 2013 */
#line 3 "Zend/zend_language_scanner_defs.h"
enum YYCONDTYPE {
+5
View File
@@ -57,6 +57,11 @@ ZEND_API void zend_objects_store_call_destructors(zend_objects_store *objects TS
obj->dtor(obj->object, i TSRMLS_CC);
obj = &objects->object_buckets[i].bucket.obj;
obj->refcount--;
if (obj->refcount == 0) {
/* in case gc_collect_cycle is triggered before free_storage */
GC_REMOVE_ZOBJ_FROM_BUFFER(obj);
}
}
}
}
+10 -5
View File
@@ -489,17 +489,22 @@ static void zend_check_finally_breakout(zend_op_array *op_array, zend_uint op_nu
zend_uint i;
for (i = 0; i < op_array->last_try_catch; i++) {
if (op_array->try_catch_array[i].try_op > op_num) {
break;
}
if ((op_num >= op_array->try_catch_array[i].finally_op
if ((op_num < op_array->try_catch_array[i].finally_op ||
op_num >= op_array->try_catch_array[i].finally_end)
&& (dst_num >= op_array->try_catch_array[i].finally_op &&
dst_num <= op_array->try_catch_array[i].finally_end)) {
CG(in_compilation) = 1;
CG(active_op_array) = op_array;
CG(zend_lineno) = op_array->opcodes[op_num].lineno;
zend_error_noreturn(E_COMPILE_ERROR, "jump into a finally block is disallowed");
} else if ((op_num >= op_array->try_catch_array[i].finally_op
&& op_num <= op_array->try_catch_array[i].finally_end)
&& (dst_num > op_array->try_catch_array[i].finally_end
|| dst_num < op_array->try_catch_array[i].finally_op)) {
CG(in_compilation) = 1;
CG(active_op_array) = op_array;
CG(zend_lineno) = op_array->opcodes[op_num].lineno;
zend_error(E_COMPILE_ERROR, "jump out of a finally block is disallowed");
zend_error_noreturn(E_COMPILE_ERROR, "jump out of a finally block is disallowed");
}
}
}
+2 -2
View File
@@ -2138,8 +2138,8 @@ ZEND_API void zendi_smart_strcmp(zval *result, zval *s1, zval *s2) /* {{{ */
{
int ret1, ret2;
int oflow1, oflow2;
long lval1, lval2;
double dval1, dval2;
long lval1 = 0, lval2 = 0;
double dval1 = 0.0, dval2 = 0.0;
if ((ret1=is_numeric_string_ex(Z_STRVAL_P(s1), Z_STRLEN_P(s1), &lval1, &dval1, 0, &oflow1)) &&
(ret2=is_numeric_string_ex(Z_STRVAL_P(s2), Z_STRLEN_P(s2), &lval2, &dval2, 0, &oflow2))) {
+10 -3
View File
@@ -132,7 +132,7 @@ static inline zend_uchar is_numeric_string_ex(const char *str, int length, long
{
const char *ptr;
int base = 10, digits = 0, dp_or_e = 0;
double local_dval;
double local_dval = 0.0;
zend_uchar type;
if (!length) {
@@ -640,13 +640,18 @@ static zend_always_inline int fast_add_function(zval *result, zval *op1, zval *o
"n"(ZVAL_OFFSETOF_TYPE)
: "rax","cc");
#else
Z_LVAL_P(result) = Z_LVAL_P(op1) + Z_LVAL_P(op2);
/*
* 'result' may alias with op1 or op2, so we need to
* ensure that 'result' is not updated until after we
* have read the values of op1 and op2.
*/
if (UNEXPECTED((Z_LVAL_P(op1) & LONG_SIGN_MASK) == (Z_LVAL_P(op2) & LONG_SIGN_MASK)
&& (Z_LVAL_P(op1) & LONG_SIGN_MASK) != (Z_LVAL_P(result) & LONG_SIGN_MASK))) {
&& (Z_LVAL_P(op1) & LONG_SIGN_MASK) != ((Z_LVAL_P(op1) + Z_LVAL_P(op2)) & LONG_SIGN_MASK))) {
Z_DVAL_P(result) = (double) Z_LVAL_P(op1) + (double) Z_LVAL_P(op2);
Z_TYPE_P(result) = IS_DOUBLE;
} else {
Z_LVAL_P(result) = Z_LVAL_P(op1) + Z_LVAL_P(op2);
Z_TYPE_P(result) = IS_LONG;
}
#endif
@@ -789,6 +794,7 @@ static zend_always_inline int fast_mul_function(zval *result, zval *op1, zval *o
static zend_always_inline int fast_div_function(zval *result, zval *op1, zval *op2 TSRMLS_DC)
{
#if 0
if (EXPECTED(Z_TYPE_P(op1) == IS_LONG) && 0) {
if (EXPECTED(Z_TYPE_P(op2) == IS_LONG)) {
if (UNEXPECTED(Z_LVAL_P(op2) == 0)) {
@@ -843,6 +849,7 @@ static zend_always_inline int fast_div_function(zval *result, zval *op1, zval *o
return SUCCESS;
}
}
#endif
return div_function(result, op1, op2 TSRMLS_CC);
}
+1 -2
View File
@@ -267,8 +267,7 @@ BEGIN_EXTERN_C()
#if defined(IEEE_LITTLE_ENDIAN) + defined(IEEE_BIG_ENDIAN) + defined(VAX) + \
defined(IBM) != 1
Exactly one of IEEE_LITTLE_ENDIAN IEEE_BIG_ENDIAN, VAX, or
IBM should be defined.
#error "Exactly one of IEEE_LITTLE_ENDIAN IEEE_BIG_ENDIAN, VAX, or IBM should be defined."
#endif
typedef union {
+41 -51
View File
@@ -1166,28 +1166,17 @@ ZEND_VM_HANDLER(81, ZEND_FETCH_DIM_R, CONST|TMP|VAR|CV, CONST|TMP|VAR|CV)
{
USE_OPLINE
zend_free_op free_op1, free_op2;
zval **container;
zval *container;
SAVE_OPLINE();
if ((opline->extended_value & ZEND_FETCH_ADD_LOCK) &&
OP1_TYPE != IS_CV &&
EX_T(opline->op1.var).var.ptr_ptr) {
PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr);
if (OP1_TYPE == IS_VAR && (opline->extended_value & ZEND_FETCH_ADD_LOCK)) {
PZVAL_LOCK(EX_T(opline->op1.var).var.ptr);
}
if (OP1_TYPE == IS_TMP_VAR || OP1_TYPE == IS_CONST) {
zval *container = GET_OP1_ZVAL_PTR(BP_VAR_R);
zend_fetch_dimension_address_read(&EX_T(opline->result.var), &container, GET_OP2_ZVAL_PTR(BP_VAR_R), OP2_TYPE, BP_VAR_R TSRMLS_CC);
FREE_OP2();
FREE_OP1();
} else {
container = GET_OP1_ZVAL_PTR_PTR(BP_VAR_R);
zend_fetch_dimension_address_read(&EX_T(opline->result.var), container, GET_OP2_ZVAL_PTR(BP_VAR_R), OP2_TYPE, BP_VAR_R TSRMLS_CC);
FREE_OP2();
FREE_OP1_VAR_PTR();
}
container = GET_OP1_ZVAL_PTR(BP_VAR_R);
zend_fetch_dimension_address_read(&EX_T(opline->result.var), container, GET_OP2_ZVAL_PTR(BP_VAR_R), OP2_TYPE, BP_VAR_R TSRMLS_CC);
FREE_OP2();
FREE_OP1();
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -1252,13 +1241,13 @@ ZEND_VM_HANDLER(90, ZEND_FETCH_DIM_IS, VAR|CV, CONST|TMP|VAR|CV)
{
USE_OPLINE
zend_free_op free_op1, free_op2;
zval **container;
zval *container;
SAVE_OPLINE();
container = GET_OP1_ZVAL_PTR_PTR(BP_VAR_IS);
container = GET_OP1_ZVAL_PTR(BP_VAR_IS);
zend_fetch_dimension_address_read(&EX_T(opline->result.var), container, GET_OP2_ZVAL_PTR(BP_VAR_R), OP2_TYPE, BP_VAR_IS TSRMLS_CC);
FREE_OP2();
FREE_OP1_VAR_PTR();
FREE_OP1();
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -1267,12 +1256,12 @@ ZEND_VM_HANDLER(93, ZEND_FETCH_DIM_FUNC_ARG, VAR|CV, CONST|TMP|VAR|UNUSED|CV)
{
USE_OPLINE
zend_free_op free_op1, free_op2;
zval **container;
SAVE_OPLINE();
if (ARG_SHOULD_BE_SENT_BY_REF(EX(call)->fbc, (opline->extended_value & ZEND_FETCH_ARG_MASK))) {
container = GET_OP1_ZVAL_PTR_PTR(BP_VAR_W);
zval **container = GET_OP1_ZVAL_PTR_PTR(BP_VAR_W);
if (OP1_TYPE == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
@@ -1280,15 +1269,19 @@ ZEND_VM_HANDLER(93, ZEND_FETCH_DIM_FUNC_ARG, VAR|CV, CONST|TMP|VAR|UNUSED|CV)
if (OP1_TYPE == IS_VAR && OP1_FREE && READY_TO_DESTROY(free_op1.var)) {
EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
FREE_OP2();
FREE_OP1_VAR_PTR();
} else {
zval *container;
if (OP2_TYPE == IS_UNUSED) {
zend_error_noreturn(E_ERROR, "Cannot use [] for reading");
}
container = GET_OP1_ZVAL_PTR_PTR(BP_VAR_R);
container = GET_OP1_ZVAL_PTR(BP_VAR_R);
zend_fetch_dimension_address_read(&EX_T(opline->result.var), container, GET_OP2_ZVAL_PTR(BP_VAR_R), OP2_TYPE, BP_VAR_R TSRMLS_CC);
FREE_OP2();
FREE_OP1();
}
FREE_OP2();
FREE_OP1_VAR_PTR();
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -1392,11 +1385,6 @@ ZEND_VM_HANDLER(85, ZEND_FETCH_OBJ_W, VAR|UNUSED|CV, CONST|TMP|VAR|CV)
SAVE_OPLINE();
property = GET_OP2_ZVAL_PTR(BP_VAR_R);
if (OP1_TYPE == IS_VAR && (opline->extended_value & ZEND_FETCH_ADD_LOCK)) {
PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr);
EX_T(opline->op1.var).var.ptr = *EX_T(opline->op1.var).var.ptr_ptr;
}
if (IS_OP2_TMP_FREE()) {
MAKE_REAL_ZVAL_PTR(property);
}
@@ -4458,22 +4446,22 @@ ZEND_VM_HELPER_EX(zend_isset_isempty_dim_prop_obj_handler, VAR|UNUSED|CV, CONST|
{
USE_OPLINE
zend_free_op free_op1, free_op2;
zval **container;
zval *container;
zval **value = NULL;
int result = 0;
ulong hval;
zval *offset;
SAVE_OPLINE();
container = GET_OP1_OBJ_ZVAL_PTR_PTR(BP_VAR_IS);
container = GET_OP1_OBJ_ZVAL_PTR(BP_VAR_IS);
offset = GET_OP2_ZVAL_PTR(BP_VAR_R);
if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) {
if (Z_TYPE_P(container) == IS_ARRAY && !prop_dim) {
HashTable *ht;
int isset = 0;
ht = Z_ARRVAL_PP(container);
ht = Z_ARRVAL_P(container);
switch (Z_TYPE_P(offset)) {
case IS_DOUBLE:
@@ -4492,9 +4480,7 @@ ZEND_VM_C_LABEL(num_index_prop):
if (OP2_TYPE == IS_CONST) {
hval = Z_HASH_P(offset);
} else {
if (!prop_dim) {
ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, ZEND_VM_C_GOTO(num_index_prop));
}
ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, ZEND_VM_C_GOTO(num_index_prop));
if (IS_INTERNED(Z_STRVAL_P(offset))) {
hval = INTERNED_HASH(Z_STRVAL_P(offset));
} else {
@@ -4529,20 +4515,20 @@ ZEND_VM_C_LABEL(num_index_prop):
}
}
FREE_OP2();
} else if (Z_TYPE_PP(container) == IS_OBJECT) {
} else if (Z_TYPE_P(container) == IS_OBJECT) {
if (IS_OP2_TMP_FREE()) {
MAKE_REAL_ZVAL_PTR(offset);
}
if (prop_dim) {
if (Z_OBJ_HT_P(*container)->has_property) {
result = Z_OBJ_HT_P(*container)->has_property(*container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0, ((OP2_TYPE == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (Z_OBJ_HT_P(container)->has_property) {
result = Z_OBJ_HT_P(container)->has_property(container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0, ((OP2_TYPE == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
} else {
zend_error(E_NOTICE, "Trying to check property of non-object");
result = 0;
}
} else {
if (Z_OBJ_HT_P(*container)->has_dimension) {
result = Z_OBJ_HT_P(*container)->has_dimension(*container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0 TSRMLS_CC);
if (Z_OBJ_HT_P(container)->has_dimension) {
result = Z_OBJ_HT_P(container)->has_dimension(container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0 TSRMLS_CC);
} else {
zend_error(E_NOTICE, "Trying to check element of non-array");
result = 0;
@@ -4553,7 +4539,7 @@ ZEND_VM_C_LABEL(num_index_prop):
} else {
FREE_OP2();
}
} else if ((*container)->type == IS_STRING && !prop_dim) { /* string offsets */
} else if (Z_TYPE_P(container) == IS_STRING && !prop_dim) { /* string offsets */
zval tmp;
if (Z_TYPE_P(offset) != IS_LONG) {
@@ -4571,11 +4557,11 @@ ZEND_VM_C_LABEL(num_index_prop):
}
if (Z_TYPE_P(offset) == IS_LONG) {
if (opline->extended_value & ZEND_ISSET) {
if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container)) {
if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_P(container)) {
result = 1;
}
} else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container) && Z_STRVAL_PP(container)[offset->value.lval] != '0') {
if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_P(container) && Z_STRVAL_P(container)[offset->value.lval] != '0') {
result = 1;
}
}
@@ -5367,11 +5353,15 @@ ZEND_VM_HANDLER(160, ZEND_YIELD, CONST|TMP|VAR|CV|UNUSED, CONST|TMP|VAR|CV|UNUSE
ZVAL_LONG(generator->key, generator->largest_used_integer_key);
}
/* If a value is sent it should go into the result var */
generator->send_target = &EX_T(opline->result.var);
/* Initialize the sent value to NULL */
EX_T(opline->result.var).tmp_var = EG(uninitialized_zval);
if (RETURN_VALUE_USED(opline)) {
/* If the return value of yield is used set the send
* target and initialize it to NULL */
generator->send_target = &EX_T(opline->result.var).var.ptr;
Z_ADDREF(EG(uninitialized_zval));
EX_T(opline->result.var).var.ptr = &EG(uninitialized_zval);
} else {
generator->send_target = NULL;
}
/* We increment to the next op, so we are at the correct position when the
* generator is resumed. */
+590 -703
View File
File diff suppressed because it is too large. Load diff
+54 -4
View File
@@ -884,9 +884,15 @@ function gen_executor($f, $skl, $spec, $kind, $executor_name, $initializer_name,
out($f,"#undef CHECK_EXCEPTION\n");
out($f,"#undef HANDLE_EXCEPTION\n");
out($f,"#undef HANDLE_EXCEPTION_LEAVE\n");
out($f,"#define CHECK_EXCEPTION() if (UNEXPECTED(EG(exception) != NULL)) goto ZEND_HANDLE_EXCEPTION_SPEC_HANDLER\n");
out($f,"#define HANDLE_EXCEPTION() goto ZEND_HANDLE_EXCEPTION_SPEC_HANDLER\n");
out($f,"#define HANDLE_EXCEPTION_LEAVE() goto ZEND_HANDLE_EXCEPTION_SPEC_HANDLER\n");
if (ZEND_VM_SPEC) {
out($f,"#define CHECK_EXCEPTION() if (UNEXPECTED(EG(exception) != NULL)) goto ZEND_HANDLE_EXCEPTION_SPEC_HANDLER\n");
out($f,"#define HANDLE_EXCEPTION() goto ZEND_HANDLE_EXCEPTION_SPEC_HANDLER\n");
out($f,"#define HANDLE_EXCEPTION_LEAVE() goto ZEND_HANDLE_EXCEPTION_SPEC_HANDLER\n");
} else {
out($f,"#define CHECK_EXCEPTION() if (UNEXPECTED(EG(exception) != NULL)) goto ZEND_HANDLE_EXCEPTION_HANDLER\n");
out($f,"#define HANDLE_EXCEPTION() goto ZEND_HANDLE_EXCEPTION_HANDLER\n");
out($f,"#define HANDLE_EXCEPTION_LEAVE() goto ZEND_HANDLE_EXCEPTION_HANDLER\n");
}
out($f,"#define LOAD_REGS()\n");
out($f,"#define ZEND_VM_CONTINUE() goto *(void**)(OPLINE->handler)\n");
out($f,"#define ZEND_VM_RETURN() EG(in_execution) = original_in_execution; return\n");
@@ -1174,14 +1180,40 @@ function gen_vm($def, $skel) {
// Insert header
out($f, $GLOBALS['header_text']);
fputs($f, "#ifndef ZEND_VM_OPCODES_H\n#define ZEND_VM_OPCODES_H\n\n");
fputs($f, "ZEND_API const char *zend_get_opcode_name(zend_uchar opcode);\n\n");
foreach ($opcodes as $code => $dsc) {
$code = str_pad((string)$code,$code_len," ",STR_PAD_LEFT);
$op = str_pad($dsc["op"],$max_opcode_len);
fputs($f,"#define $op $code\n");
}
fputs($f, "\n#endif");
fclose($f);
echo "zend_vm_opcodes.h generated successfully.\n";
// zend_vm_opcodes.c
$f = fopen(__DIR__ . "/zend_vm_opcodes.c", "w+") or die("ERROR: Cannot create zend_vm_opcodes.c\n");
// Insert header
out($f, $GLOBALS['header_text']);
fputs($f,"#include <stdio.h>\n");
fputs($f,"#include <zend.h>\n\n");
fputs($f,"const char *zend_vm_opcodes_map[".($max_opcode + 1)."] = {\n");
for ($i = 0; $i <= $max_opcode; $i++) {
fputs($f,"\t".(isset($opcodes[$i]["op"])?'"'.$opcodes[$i]["op"].'"':"NULL").",\n");
}
fputs($f, "};\n\n");
fputs($f, "ZEND_API const char* zend_get_opcode_name(zend_uchar opcode) {\n");
fputs($f, "\treturn zend_vm_opcodes_map[opcode];\n");
fputs($f, "}\n");
fclose($f);
echo "zend_vm_opcodes.c generated successfully.\n";
// Generate zend_vm_execute.h
$f = fopen(__DIR__ . "/zend_vm_execute.h", "w+") or die("ERROR: Cannot create zend_vm_execute.h\n");
$executor_file = realpath(__DIR__ . "/zend_vm_execute.h");
@@ -1189,8 +1221,26 @@ function gen_vm($def, $skel) {
// Insert header
out($f, $GLOBALS['header_text']);
out($f, "#ifdef ZEND_WIN32\n");
// Suppress free_op1 warnings on Windows
out($f, "#ifdef ZEND_WIN32\n# pragma warning(once : 4101)\n#endif\n");
out($f, "# pragma warning(once : 4101)\n");
if (ZEND_VM_SPEC) {
// Suppress (<non-zero constant> || <expression>) warnings on windows
out($f, "# pragma warning(once : 6235)\n");
// Suppress (<zero> && <expression>) warnings on windows
out($f, "# pragma warning(once : 6237)\n");
// Suppress (<non-zero constant> && <expression>) warnings on windows
out($f, "# pragma warning(once : 6239)\n");
// Suppress (<expression> && <non-zero constant>) warnings on windows
out($f, "# pragma warning(once : 6240)\n");
// Suppress (<non-zero constant> || <non-zero constant>) warnings on windows
out($f, "# pragma warning(once : 6285)\n");
// Suppress (<non-zero constant> || <expression>) warnings on windows
out($f, "# pragma warning(once : 6286)\n");
// Suppress constant with constant comparsion warnings on windows
out($f, "# pragma warning(once : 6326)\n");
}
out($f, "#endif\n");
// Support for ZEND_USER_OPCODE
out($f, "static user_opcode_handler_t zend_user_opcode_handlers[256] = {\n");
+193
View File
@@ -0,0 +1,193 @@
/*
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
| Copyright (c) 1998-2013 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| available through the world-wide-web at the following url: |
| http://www.zend.com/license/2_00.txt. |
| If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Zeev Suraski <zeev@zend.com> |
| Dmitry Stogov <dmitry@zend.com> |
+----------------------------------------------------------------------+
*/
#include <stdio.h>
#include <zend.h>
const char *zend_vm_opcodes_map[164] = {
"ZEND_NOP",
"ZEND_ADD",
"ZEND_SUB",
"ZEND_MUL",
"ZEND_DIV",
"ZEND_MOD",
"ZEND_SL",
"ZEND_SR",
"ZEND_CONCAT",
"ZEND_BW_OR",
"ZEND_BW_AND",
"ZEND_BW_XOR",
"ZEND_BW_NOT",
"ZEND_BOOL_NOT",
"ZEND_BOOL_XOR",
"ZEND_IS_IDENTICAL",
"ZEND_IS_NOT_IDENTICAL",
"ZEND_IS_EQUAL",
"ZEND_IS_NOT_EQUAL",
"ZEND_IS_SMALLER",
"ZEND_IS_SMALLER_OR_EQUAL",
"ZEND_CAST",
"ZEND_QM_ASSIGN",
"ZEND_ASSIGN_ADD",
"ZEND_ASSIGN_SUB",
"ZEND_ASSIGN_MUL",
"ZEND_ASSIGN_DIV",
"ZEND_ASSIGN_MOD",
"ZEND_ASSIGN_SL",
"ZEND_ASSIGN_SR",
"ZEND_ASSIGN_CONCAT",
"ZEND_ASSIGN_BW_OR",
"ZEND_ASSIGN_BW_AND",
"ZEND_ASSIGN_BW_XOR",
"ZEND_PRE_INC",
"ZEND_PRE_DEC",
"ZEND_POST_INC",
"ZEND_POST_DEC",
"ZEND_ASSIGN",
"ZEND_ASSIGN_REF",
"ZEND_ECHO",
"ZEND_PRINT",
"ZEND_JMP",
"ZEND_JMPZ",
"ZEND_JMPNZ",
"ZEND_JMPZNZ",
"ZEND_JMPZ_EX",
"ZEND_JMPNZ_EX",
"ZEND_CASE",
"ZEND_SWITCH_FREE",
"ZEND_BRK",
"ZEND_CONT",
"ZEND_BOOL",
"ZEND_INIT_STRING",
"ZEND_ADD_CHAR",
"ZEND_ADD_STRING",
"ZEND_ADD_VAR",
"ZEND_BEGIN_SILENCE",
"ZEND_END_SILENCE",
"ZEND_INIT_FCALL_BY_NAME",
"ZEND_DO_FCALL",
"ZEND_DO_FCALL_BY_NAME",
"ZEND_RETURN",
"ZEND_RECV",
"ZEND_RECV_INIT",
"ZEND_SEND_VAL",
"ZEND_SEND_VAR",
"ZEND_SEND_REF",
"ZEND_NEW",
"ZEND_INIT_NS_FCALL_BY_NAME",
"ZEND_FREE",
"ZEND_INIT_ARRAY",
"ZEND_ADD_ARRAY_ELEMENT",
"ZEND_INCLUDE_OR_EVAL",
"ZEND_UNSET_VAR",
"ZEND_UNSET_DIM",
"ZEND_UNSET_OBJ",
"ZEND_FE_RESET",
"ZEND_FE_FETCH",
"ZEND_EXIT",
"ZEND_FETCH_R",
"ZEND_FETCH_DIM_R",
"ZEND_FETCH_OBJ_R",
"ZEND_FETCH_W",
"ZEND_FETCH_DIM_W",
"ZEND_FETCH_OBJ_W",
"ZEND_FETCH_RW",
"ZEND_FETCH_DIM_RW",
"ZEND_FETCH_OBJ_RW",
"ZEND_FETCH_IS",
"ZEND_FETCH_DIM_IS",
"ZEND_FETCH_OBJ_IS",
"ZEND_FETCH_FUNC_ARG",
"ZEND_FETCH_DIM_FUNC_ARG",
"ZEND_FETCH_OBJ_FUNC_ARG",
"ZEND_FETCH_UNSET",
"ZEND_FETCH_DIM_UNSET",
"ZEND_FETCH_OBJ_UNSET",
"ZEND_FETCH_DIM_TMP_VAR",
"ZEND_FETCH_CONSTANT",
"ZEND_GOTO",
"ZEND_EXT_STMT",
"ZEND_EXT_FCALL_BEGIN",
"ZEND_EXT_FCALL_END",
"ZEND_EXT_NOP",
"ZEND_TICKS",
"ZEND_SEND_VAR_NO_REF",
"ZEND_CATCH",
"ZEND_THROW",
"ZEND_FETCH_CLASS",
"ZEND_CLONE",
"ZEND_RETURN_BY_REF",
"ZEND_INIT_METHOD_CALL",
"ZEND_INIT_STATIC_METHOD_CALL",
"ZEND_ISSET_ISEMPTY_VAR",
"ZEND_ISSET_ISEMPTY_DIM_OBJ",
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
"ZEND_PRE_INC_OBJ",
"ZEND_PRE_DEC_OBJ",
"ZEND_POST_INC_OBJ",
"ZEND_POST_DEC_OBJ",
"ZEND_ASSIGN_OBJ",
NULL,
"ZEND_INSTANCEOF",
"ZEND_DECLARE_CLASS",
"ZEND_DECLARE_INHERITED_CLASS",
"ZEND_DECLARE_FUNCTION",
"ZEND_RAISE_ABSTRACT_ERROR",
"ZEND_DECLARE_CONST",
"ZEND_ADD_INTERFACE",
"ZEND_DECLARE_INHERITED_CLASS_DELAYED",
"ZEND_VERIFY_ABSTRACT_CLASS",
"ZEND_ASSIGN_DIM",
"ZEND_ISSET_ISEMPTY_PROP_OBJ",
"ZEND_HANDLE_EXCEPTION",
"ZEND_USER_OPCODE",
NULL,
"ZEND_JMP_SET",
"ZEND_DECLARE_LAMBDA_FUNCTION",
"ZEND_ADD_TRAIT",
"ZEND_BIND_TRAITS",
"ZEND_SEPARATE",
"ZEND_QM_ASSIGN_VAR",
"ZEND_JMP_SET_VAR",
"ZEND_DISCARD_EXCEPTION",
"ZEND_YIELD",
"ZEND_GENERATOR_RETURN",
"ZEND_FAST_CALL",
"ZEND_FAST_RET",
};
ZEND_API const char* zend_get_opcode_name(zend_uchar opcode) {
return zend_vm_opcodes_map[opcode];
}
+7
View File
@@ -18,6 +18,11 @@
+----------------------------------------------------------------------+
*/
#ifndef ZEND_VM_OPCODES_H
#define ZEND_VM_OPCODES_H
ZEND_API const char *zend_get_opcode_name(zend_uchar opcode);
#define ZEND_NOP 0
#define ZEND_ADD 1
#define ZEND_SUB 2
@@ -164,3 +169,5 @@
#define ZEND_GENERATOR_RETURN 161
#define ZEND_FAST_CALL 162
#define ZEND_FAST_RET 163
#endif
+38 -4
View File
@@ -2925,17 +2925,17 @@ dnl providerdesc
dnl header-file
ac_hdrobj=$2
dnl Add providerdesc.o into global objects when needed
dnl Add providerdesc.o or .lo into global objects when needed
case $host_alias in
*freebsd*)
PHP_GLOBAL_OBJS="[$]PHP_GLOBAL_OBJS [$]ac_bdir[$]ac_provsrc.o"
PHP_LDFLAGS="$PHP_LDFLAGS -lelf"
;;
*solaris*)
PHP_GLOBAL_OBJS="[$]PHP_GLOBAL_OBJS [$]ac_bdir[$]ac_provsrc.o"
PHP_GLOBAL_OBJS="[$]PHP_GLOBAL_OBJS [$]ac_bdir[$]ac_provsrc.lo"
;;
*linux*)
PHP_GLOBAL_OBJS="[$]PHP_GLOBAL_OBJS [$]ac_bdir[$]ac_provsrc.o"
PHP_GLOBAL_OBJS="[$]PHP_GLOBAL_OBJS [$]ac_bdir[$]ac_provsrc.lo"
;;
esac
@@ -2969,12 +2969,46 @@ dnl in GNU Make which causes the .d file to be overwritten (Bug 61268)
$abs_srcdir/$ac_provsrc:;
$ac_bdir[$]ac_hdrobj: $abs_srcdir/$ac_provsrc
CFLAGS="\$(CFLAGS_CLEAN)" dtrace -h -C -s $ac_srcdir[$]ac_provsrc -o \$[]@.bak && \$(SED) 's,PHP_,DTRACE_,g' \$[]@.bak > \$[]@
CFLAGS="\$(CFLAGS_CLEAN)" dtrace -h -C -s $ac_srcdir[$]ac_provsrc -o \$[]@.bak && \$(SED) -e 's,PHP_,DTRACE_,g' \$[]@.bak > \$[]@
\$(PHP_DTRACE_OBJS): $ac_bdir[$]ac_hdrobj
EOF
case $host_alias in
*solaris*|*linux*)
dtrace_prov_name="`echo $ac_provsrc | $SED -e 's#\(.*\)\/##'`.o"
dtrace_lib_dir="`echo $ac_bdir[$]ac_provsrc | $SED -e 's#\(.*\)/[^/]*#\1#'`/.libs"
dtrace_d_obj="`echo $ac_bdir[$]ac_provsrc | $SED -e 's#\(.*\)/\([^/]*\)#\1/.libs/\2#'`.o"
dtrace_nolib_objs='$(PHP_DTRACE_OBJS:.lo=.o)'
for ac_lo in $PHP_DTRACE_OBJS; do
dtrace_lib_objs="[$]dtrace_lib_objs `echo $ac_lo | $SED -e 's,\.lo$,.o,' -e 's#\(.*\)\/#\1\/.libs\/#'`"
done;
dnl Always attempt to create both PIC and non-PIC DTrace objects (Bug 63692)
cat>>Makefile.objects<<EOF
$ac_bdir[$]ac_provsrc.lo: \$(PHP_DTRACE_OBJS)
echo "[#] Generated by Makefile for libtool" > \$[]@
@test -d "$dtrace_lib_dir" || mkdir $dtrace_lib_dir
if CFLAGS="\$(CFLAGS_CLEAN)" dtrace -G -o $dtrace_d_obj -s $abs_srcdir/$ac_provsrc $dtrace_lib_objs 2> /dev/null && test -f "$dtrace_d_obj"; then [\\]
echo "pic_object=['].libs/$dtrace_prov_name[']" >> \$[]@ [;\\]
else [\\]
echo "pic_object='none'" >> \$[]@ [;\\]
fi
if CFLAGS="\$(CFLAGS_CLEAN)" dtrace -G -o $ac_bdir[$]ac_provsrc.o -s $abs_srcdir/$ac_provsrc $dtrace_nolib_objs 2> /dev/null && test -f "$ac_bdir[$]ac_provsrc.o"; then [\\]
echo "non_pic_object=[']$dtrace_prov_name[']" >> \$[]@ [;\\]
else [\\]
echo "non_pic_object='none'" >> \$[]@ [;\\]
fi
EOF
;;
*)
cat>>Makefile.objects<<EOF
$ac_bdir[$]ac_provsrc.o: \$(PHP_DTRACE_OBJS)
CFLAGS="\$(CFLAGS_CLEAN)" dtrace -G -o \$[]@ -s $abs_srcdir/$ac_provsrc $dtrace_objs
EOF
;;
esac
])
+8 -1
View File
@@ -1003,7 +1003,14 @@ mkdir )
if [ ".$opt_t" = .yes ]; then
echo "mkdir $pathcomp" 1>&2
fi
mkdir $pathcomp || errstatus=$?
# See https://bugs.php.net/51076
# The fix is from Debian who have sent it
# upstream, too; but upstream seems dead.
mkdir $pathcomp || {
_errstatus=$?
[ -d "$pathcomp" ] || errstatus=${_errstatus}
unset _errstatus
}
if [ ".$opt_o" != . ]; then
if [ ".$opt_t" = .yes ]; then
echo "chown $opt_o $pathcomp" 1>&2
+3 -3
View File
@@ -119,8 +119,8 @@ int zend_sprintf(char *buffer, const char *format, ...);
PHP_MAJOR_VERSION=5
PHP_MINOR_VERSION=5
PHP_RELEASE_VERSION=2
PHP_EXTRA_VERSION="-dev"
PHP_RELEASE_VERSION=8
PHP_EXTRA_VERSION=""
PHP_VERSION="$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION.$PHP_RELEASE_VERSION$PHP_EXTRA_VERSION"
PHP_VERSION_ID=`expr [$]PHP_MAJOR_VERSION \* 10000 + [$]PHP_MINOR_VERSION \* 100 + [$]PHP_RELEASE_VERSION`
@@ -1467,7 +1467,7 @@ PHP_ADD_SOURCES(Zend, \
zend_ini_parser.c zend_ini_scanner.c \
zend_alloc.c zend_compile.c zend_constants.c zend_dynamic_array.c zend_dtrace.c \
zend_execute_API.c zend_highlight.c zend_llist.c \
zend_opcode.c zend_operators.c zend_ptr_stack.c zend_stack.c \
zend_vm_opcodes.c zend_opcode.c zend_operators.c zend_ptr_stack.c zend_stack.c \
zend_variables.c zend.c zend_API.c zend_extensions.c zend_hash.c \
zend_list.c zend_indent.c zend_builtin_functions.c zend_sprintf.c \
zend_ini.c zend_qsort.c zend_multibyte.c zend_ts_hash.c zend_stream.c \
-3
View File
@@ -183,7 +183,6 @@ _bc_rec_mul (bc_num u, int ulen, bc_num v, int vlen, bc_num *prod,
int full_scale TSRMLS_DC)
{
bc_num u0, u1, v0, v1;
int u0len, v0len;
bc_num m1, m2, m3, d1, d2;
int n, prodlen, m1zero;
int d1len, d2len;
@@ -216,10 +215,8 @@ _bc_rec_mul (bc_num u, int ulen, bc_num v, int vlen, bc_num *prod,
}
_bc_rm_leading_zeros (u1);
_bc_rm_leading_zeros (u0);
u0len = u0->n_len;
_bc_rm_leading_zeros (v1);
_bc_rm_leading_zeros (v0);
v0len = v0->n_len;
m1zero = bc_is_zero(u1 TSRMLS_CC) || bc_is_zero(v1 TSRMLS_CC);
+1 -2
View File
@@ -97,6 +97,7 @@ static php_stream_filter_status_t php_bz2_decompress_filter(
status = BZ2_bzDecompressInit(streamp, 0, data->small_footprint);
if (BZ_OK != status) {
php_stream_bucket_delref(bucket TSRMLS_CC);
return PSFS_ERR_FATAL;
}
@@ -215,7 +216,6 @@ static php_stream_filter_status_t php_bz2_compress_filter(
size_t consumed = 0;
int status;
php_stream_filter_status_t exit_status = PSFS_FEED_ME;
bz_stream *streamp;
if (!thisfilter || !thisfilter->abstract) {
/* Should never happen */
@@ -223,7 +223,6 @@ static php_stream_filter_status_t php_bz2_compress_filter(
}
data = (php_bz2_filter_data *)(thisfilter->abstract);
streamp = &(data->strm);
while (buckets_in->head) {
size_t bin = 0, desired;
+10 -6
View File
@@ -1717,9 +1717,9 @@ static void curl_free_post(void **post)
/* {{{ curl_free_slist
*/
static void curl_free_slist(void **slist)
static void curl_free_slist(void *slist)
{
curl_slist_free_all((struct curl_slist *) *slist);
curl_slist_free_all(*((struct curl_slist **) slist));
}
/* }}} */
@@ -1790,9 +1790,11 @@ static void alloc_curl_handle(php_curl **ch)
(*ch)->handlers->read->stream = NULL;
zend_llist_init(&(*ch)->to_free->str, sizeof(char *), (llist_dtor_func_t) curl_free_string, 0);
zend_llist_init(&(*ch)->to_free->slist, sizeof(struct curl_slist), (llist_dtor_func_t) curl_free_slist, 0);
zend_llist_init(&(*ch)->to_free->post, sizeof(struct HttpPost), (llist_dtor_func_t) curl_free_post, 0);
(*ch)->safe_upload = 0; /* for now, for BC reason we allow unsafe API */
(*ch)->to_free->slist = emalloc(sizeof(HashTable));
zend_hash_init((*ch)->to_free->slist, 4, NULL, curl_free_slist, 0);
}
/* }}} */
@@ -2043,6 +2045,7 @@ PHP_FUNCTION(curl_copy_handle)
}
#endif
efree(dupch->to_free->slist);
efree(dupch->to_free);
dupch->to_free = ch->to_free;
@@ -2438,7 +2441,7 @@ string_copy:
ph = HASH_OF(*zvalue);
if (!ph) {
char *name;
char *name = NULL;
switch (option) {
case CURLOPT_HTTPHEADER:
name = "CURLOPT_HTTPHEADER";
@@ -2488,7 +2491,7 @@ string_copy:
return 1;
}
}
zend_llist_add_element(&ch->to_free->slist, &slist);
zend_hash_index_update(ch->to_free->slist, (ulong) option, &slist, sizeof(struct curl_slist *), NULL);
error = curl_easy_setopt(ch->cp, option, slist);
@@ -3266,8 +3269,9 @@ static void _php_curl_close_ex(php_curl *ch TSRMLS_DC)
/* cURL destructors should be invoked only by last curl handle */
if (Z_REFCOUNT_P(ch->clone) <= 1) {
zend_llist_clean(&ch->to_free->str);
zend_llist_clean(&ch->to_free->slist);
zend_llist_clean(&ch->to_free->post);
zend_hash_destroy(ch->to_free->slist);
efree(ch->to_free->slist);
efree(ch->to_free);
FREE_ZVAL(ch->clone);
} else {
+1 -1
View File
@@ -168,7 +168,7 @@ struct _php_curl_send_headers {
struct _php_curl_free {
zend_llist str;
zend_llist post;
zend_llist slist;
HashTable *slist;
};
typedef struct {
+25
View File
@@ -0,0 +1,25 @@
--TEST--
Bug #65458 (curl memory leak)
--SKIPIF--
<?php
if (!extension_loaded('curl')) exit("skip curl extension not loaded");
?>
--FILE--
<?php
$ch = curl_init();
$init = memory_get_usage();
for ($i = 0; $i < 10000; $i++) {
curl_setopt($ch, CURLOPT_HTTPHEADER, [ "SOAPAction: getItems" ]);
}
$preclose = memory_get_usage();
curl_close($ch);
// This is a slightly tricky heuristic, but basically, we want to ensure
// $preclose - $init has a delta in the order of bytes, not megabytes. Given
// the number of iterations in the loop, if we're wasting memory here, we
// should have megs and megs of extra allocations.
var_dump(($preclose - $init) < 10000);
?>
--EXPECT--
bool(true)
+3 -9
View File
@@ -25,10 +25,7 @@ static int m_table_leap[13] = { -1, 6, 2, 3, 6, 1, 4, 6, 2, 5, 0, 3, 5 }; /* 1
static timelib_sll century_value(timelib_sll j)
{
timelib_sll i = j - 17;
timelib_sll c = (4 - i * 2 + (i + 1) / 4) % 7;
return c < 0 ? c + 7 : c;
return 6 - (j % 4) * 2;
}
static timelib_sll timelib_day_of_week_ex(timelib_sll y, timelib_sll m, timelib_sll d, int iso)
@@ -36,11 +33,8 @@ static timelib_sll timelib_day_of_week_ex(timelib_sll y, timelib_sll m, timelib_
timelib_sll c1, y1, m1, dow;
/* Only valid for Gregorian calendar, commented out as we don't handle
* julian calendar. We just return the 'wrong' day of week to be
* consistent.
if (y < 1753) {
return -1;
} */
* Julian calendar. We just return the 'wrong' day of week to be
* consistent. */
c1 = century_value(y / 100);
y1 = (y % 100);
m1 = timelib_is_leap(y) ? m_table_leap[m] : m_table_common[m];
+98 -5
View File
@@ -25,7 +25,7 @@ timelib_rel_time *timelib_diff(timelib_time *one, timelib_time *two)
{
timelib_rel_time *rt;
timelib_time *swp;
timelib_sll dst_h_corr = 0, dst_m_corr = 0;
timelib_sll dst_corr = 0 ,dst_h_corr = 0, dst_m_corr = 0;
timelib_time one_backup, two_backup;
rt = timelib_rel_time_ctor();
@@ -43,8 +43,9 @@ timelib_rel_time *timelib_diff(timelib_time *one, timelib_time *two)
&& (strcmp(one->tz_info->name, two->tz_info->name) == 0)
&& (one->z != two->z))
{
dst_h_corr = (two->z - one->z) / 3600;
dst_m_corr = ((two->z - one->z) % 3600) / 60;
dst_corr = two->z - one->z;
dst_h_corr = dst_corr / 3600;
dst_m_corr = (dst_corr % 3600) / 60;
}
/* Save old TZ info */
@@ -57,16 +58,108 @@ timelib_rel_time *timelib_diff(timelib_time *one, timelib_time *two)
rt->y = two->y - one->y;
rt->m = two->m - one->m;
rt->d = two->d - one->d;
rt->h = two->h - one->h + dst_h_corr;
rt->i = two->i - one->i + dst_m_corr;
rt->h = two->h - one->h;
rt->i = two->i - one->i;
rt->s = two->s - one->s;
if (one_backup.dst == 0 && two_backup.dst == 1 && two->sse >= one->sse + 86400 - dst_corr) {
rt->h += dst_h_corr;
rt->i += dst_m_corr;
}
rt->days = abs(floor((one->sse - two->sse - (dst_h_corr * 3600) - (dst_m_corr * 60)) / 86400));
timelib_do_rel_normalize(rt->invert ? one : two, rt);
/* We need to do this after normalisation otherwise we can't get "24H" */
if (one_backup.dst == 1 && two_backup.dst == 0 && two->sse >= one->sse + 86400) {
if (two->sse < one->sse + 86400 - dst_corr) {
rt->d--;
rt->h = 24;
} else {
rt->h += dst_h_corr;
rt->i += dst_m_corr;
}
}
/* Restore old TZ info */
memcpy(one, &one_backup, sizeof(one_backup));
memcpy(two, &two_backup, sizeof(two_backup));
return rt;
}
timelib_time *timelib_add(timelib_time *old_time, timelib_rel_time *interval)
{
int bias = 1;
timelib_time *t = timelib_time_clone(old_time);
if (interval->have_weekday_relative || interval->have_special_relative) {
memcpy(&t->relative, interval, sizeof(struct timelib_rel_time));
} else {
if (interval->invert) {
bias = -1;
}
memset(&t->relative, 0, sizeof(struct timelib_rel_time));
t->relative.y = interval->y * bias;
t->relative.m = interval->m * bias;
t->relative.d = interval->d * bias;
t->relative.h = interval->h * bias;
t->relative.i = interval->i * bias;
t->relative.s = interval->s * bias;
}
t->have_relative = 1;
t->sse_uptodate = 0;
timelib_update_ts(t, NULL);
// printf("%lld %lld %d\n", old_time->dst, t->dst, (t->sse - old_time->sse));
/* Adjust for backwards DST changeover */
if (old_time->dst == 1 && t->dst == 0 && !interval->y && !interval->m && !interval->d) {
t->sse -= old_time->z;
t->sse += t->z;
}
timelib_update_from_sse(t);
t->have_relative = 0;
return t;
}
timelib_time *timelib_sub(timelib_time *old_time, timelib_rel_time *interval)
{
int bias = 1;
timelib_time *t = timelib_time_clone(old_time);
if (interval->invert) {
bias = -1;
}
memset(&t->relative, 0, sizeof(struct timelib_rel_time));
t->relative.y = 0 - (interval->y * bias);
t->relative.m = 0 - (interval->m * bias);
t->relative.d = 0 - (interval->d * bias);
t->relative.h = 0 - (interval->h * bias);
t->relative.i = 0 - (interval->i * bias);
t->relative.s = 0 - (interval->s * bias);
t->have_relative = 1;
t->sse_uptodate = 0;
timelib_update_ts(t, NULL);
/* Adjust for backwards DST changeover */
if (old_time->dst == 1 && t->dst == 0 && !interval->y && !interval->m && !interval->d) {
t->sse -= old_time->z;
t->sse += t->z;
}
/* Adjust for forwards DST changeover */
if (old_time->dst == 0 && t->dst == 1 && !interval->y && !interval->m && !interval->d ) {
t->sse -= old_time->z;
t->sse += t->z;
}
timelib_update_from_sse(t);
t->have_relative = 0;
return t;
}
+101 -100
View File
@@ -1,4 +1,4 @@
/* Generated by re2c 0.13.5 on Fri Apr 26 11:10:28 2013 */
/* Generated by re2c 0.13.5 on Sun Aug 25 15:12:48 2013 */
#line 1 "ext/date/lib/parse_date.re"
/*
+----------------------------------------------------------------------+
@@ -616,7 +616,8 @@ static const timelib_relunit* timelib_lookup_relunit(char **ptr)
char *begin = *ptr, *end;
const timelib_relunit *tp, *value = NULL;
while (**ptr != '\0' && **ptr != ' ' && **ptr != ',' && **ptr != '\t') {
while (**ptr != '\0' && **ptr != ' ' && **ptr != ',' && **ptr != '\t' && **ptr != ';' && **ptr != ':' &&
**ptr != '/' && **ptr != '.' && **ptr != '-' && **ptr != '(' && **ptr != ')' ) {
++*ptr;
}
end = *ptr;
@@ -836,11 +837,11 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper)
std:
s->tok = cursor;
s->len = 0;
#line 962 "ext/date/lib/parse_date.re"
#line 963 "ext/date/lib/parse_date.re"
#line 844 "ext/date/lib/parse_date.c"
#line 845 "ext/date/lib/parse_date.c"
{
YYCTYPE yych;
unsigned int yyaccept = 0;
@@ -960,7 +961,7 @@ std:
}
yy2:
YYDEBUG(2, *YYCURSOR);
#line 1048 "ext/date/lib/parse_date.re"
#line 1049 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("firstdayof | lastdayof");
TIMELIB_INIT;
@@ -976,7 +977,7 @@ yy2:
TIMELIB_DEINIT;
return TIMELIB_LF_DAY_OF_MONTH;
}
#line 980 "ext/date/lib/parse_date.c"
#line 981 "ext/date/lib/parse_date.c"
yy3:
YYDEBUG(3, *YYCURSOR);
++YYCURSOR;
@@ -999,7 +1000,7 @@ yy3:
}
yy4:
YYDEBUG(4, *YYCURSOR);
#line 1642 "ext/date/lib/parse_date.re"
#line 1643 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("tzcorrection | tz");
@@ -1012,7 +1013,7 @@ yy4:
TIMELIB_DEINIT;
return TIMELIB_TIMEZONE;
}
#line 1016 "ext/date/lib/parse_date.c"
#line 1017 "ext/date/lib/parse_date.c"
yy5:
YYDEBUG(5, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1323,12 +1324,12 @@ yy12:
if (yych <= '9') goto yy1385;
yy13:
YYDEBUG(13, *YYCURSOR);
#line 1737 "ext/date/lib/parse_date.re"
#line 1738 "ext/date/lib/parse_date.re"
{
add_error(s, "Unexpected character");
goto std;
}
#line 1332 "ext/date/lib/parse_date.c"
#line 1333 "ext/date/lib/parse_date.c"
yy14:
YYDEBUG(14, *YYCURSOR);
yych = *++YYCURSOR;
@@ -2385,11 +2386,11 @@ yy49:
if (yych <= '9') goto yy55;
yy50:
YYDEBUG(50, *YYCURSOR);
#line 1726 "ext/date/lib/parse_date.re"
#line 1727 "ext/date/lib/parse_date.re"
{
goto std;
}
#line 2393 "ext/date/lib/parse_date.c"
#line 2394 "ext/date/lib/parse_date.c"
yy51:
YYDEBUG(51, *YYCURSOR);
yych = *++YYCURSOR;
@@ -2398,12 +2399,12 @@ yy52:
YYDEBUG(52, *YYCURSOR);
++YYCURSOR;
YYDEBUG(53, *YYCURSOR);
#line 1731 "ext/date/lib/parse_date.re"
#line 1732 "ext/date/lib/parse_date.re"
{
s->pos = cursor; s->line++;
goto std;
}
#line 2407 "ext/date/lib/parse_date.c"
#line 2408 "ext/date/lib/parse_date.c"
yy54:
YYDEBUG(54, *YYCURSOR);
yych = *++YYCURSOR;
@@ -2790,7 +2791,7 @@ yy72:
if (yych == 's') goto yy74;
yy73:
YYDEBUG(73, *YYCURSOR);
#line 1710 "ext/date/lib/parse_date.re"
#line 1711 "ext/date/lib/parse_date.re"
{
timelib_ull i;
DEBUG_OUTPUT("relative");
@@ -2805,7 +2806,7 @@ yy73:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
#line 2809 "ext/date/lib/parse_date.c"
#line 2810 "ext/date/lib/parse_date.c"
yy74:
YYDEBUG(74, *YYCURSOR);
yych = *++YYCURSOR;
@@ -3567,7 +3568,7 @@ yy166:
}
yy167:
YYDEBUG(167, *YYCURSOR);
#line 1573 "ext/date/lib/parse_date.re"
#line 1574 "ext/date/lib/parse_date.re"
{
const timelib_relunit* relunit;
DEBUG_OUTPUT("daytext");
@@ -3584,7 +3585,7 @@ yy167:
TIMELIB_DEINIT;
return TIMELIB_WEEKDAY;
}
#line 3588 "ext/date/lib/parse_date.c"
#line 3589 "ext/date/lib/parse_date.c"
yy168:
YYDEBUG(168, *YYCURSOR);
yych = *++YYCURSOR;
@@ -4104,7 +4105,7 @@ yy193:
}
yy194:
YYDEBUG(194, *YYCURSOR);
#line 1632 "ext/date/lib/parse_date.re"
#line 1633 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("monthtext");
TIMELIB_INIT;
@@ -4113,7 +4114,7 @@ yy194:
TIMELIB_DEINIT;
return TIMELIB_DATE_TEXT;
}
#line 4117 "ext/date/lib/parse_date.c"
#line 4118 "ext/date/lib/parse_date.c"
yy195:
YYDEBUG(195, *YYCURSOR);
++YYCURSOR;
@@ -4164,7 +4165,7 @@ yy198:
}
yy199:
YYDEBUG(199, *YYCURSOR);
#line 1378 "ext/date/lib/parse_date.re"
#line 1379 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("datetextual | datenoyear");
@@ -4177,7 +4178,7 @@ yy199:
TIMELIB_DEINIT;
return TIMELIB_DATE_TEXT;
}
#line 4181 "ext/date/lib/parse_date.c"
#line 4182 "ext/date/lib/parse_date.c"
yy200:
YYDEBUG(200, *YYCURSOR);
yyaccept = 6;
@@ -4446,7 +4447,7 @@ yy222:
}
yy223:
YYDEBUG(223, *YYCURSOR);
#line 1680 "ext/date/lib/parse_date.re"
#line 1681 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("dateshortwithtimeshort | dateshortwithtimelong | dateshortwithtimelongtz");
@@ -4475,7 +4476,7 @@ yy223:
TIMELIB_DEINIT;
return TIMELIB_SHORTDATE_WITH_TIME;
}
#line 4479 "ext/date/lib/parse_date.c"
#line 4480 "ext/date/lib/parse_date.c"
yy224:
YYDEBUG(224, *YYCURSOR);
yyaccept = 7;
@@ -5173,7 +5174,7 @@ yy278:
YYDEBUG(278, *YYCURSOR);
++YYCURSOR;
YYDEBUG(279, *YYCURSOR);
#line 1656 "ext/date/lib/parse_date.re"
#line 1657 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("dateshortwithtimeshort12 | dateshortwithtimelong12");
TIMELIB_INIT;
@@ -5196,7 +5197,7 @@ yy278:
TIMELIB_DEINIT;
return TIMELIB_SHORTDATE_WITH_TIME;
}
#line 5200 "ext/date/lib/parse_date.c"
#line 5201 "ext/date/lib/parse_date.c"
yy280:
YYDEBUG(280, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5374,7 +5375,7 @@ yy294:
++YYCURSOR;
yy295:
YYDEBUG(295, *YYCURSOR);
#line 1350 "ext/date/lib/parse_date.re"
#line 1351 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("datenoday");
@@ -5387,7 +5388,7 @@ yy295:
TIMELIB_DEINIT;
return TIMELIB_DATE_NO_DAY;
}
#line 5391 "ext/date/lib/parse_date.c"
#line 5392 "ext/date/lib/parse_date.c"
yy296:
YYDEBUG(296, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6607,7 +6608,7 @@ yy362:
if (yych <= '9') goto yy365;
yy364:
YYDEBUG(364, *YYCURSOR);
#line 1494 "ext/date/lib/parse_date.re"
#line 1495 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("pgtextshort");
@@ -6620,7 +6621,7 @@ yy364:
TIMELIB_DEINIT;
return TIMELIB_PG_TEXT;
}
#line 6624 "ext/date/lib/parse_date.c"
#line 6625 "ext/date/lib/parse_date.c"
yy365:
YYDEBUG(365, *YYCURSOR);
yych = *++YYCURSOR;
@@ -7258,7 +7259,7 @@ yy392:
}
yy393:
YYDEBUG(393, *YYCURSOR);
#line 1552 "ext/date/lib/parse_date.re"
#line 1553 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("ago");
TIMELIB_INIT;
@@ -7278,7 +7279,7 @@ yy393:
TIMELIB_DEINIT;
return TIMELIB_AGO;
}
#line 7282 "ext/date/lib/parse_date.c"
#line 7283 "ext/date/lib/parse_date.c"
yy394:
YYDEBUG(394, *YYCURSOR);
yyaccept = 5;
@@ -9028,7 +9029,7 @@ yy454:
++YYCURSOR;
yy455:
YYDEBUG(455, *YYCURSOR);
#line 1255 "ext/date/lib/parse_date.re"
#line 1256 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("iso8601date4 | iso8601date2 | iso8601dateslash | dateslash");
TIMELIB_INIT;
@@ -9039,7 +9040,7 @@ yy455:
TIMELIB_DEINIT;
return TIMELIB_ISO_DATE;
}
#line 9043 "ext/date/lib/parse_date.c"
#line 9044 "ext/date/lib/parse_date.c"
yy456:
YYDEBUG(456, *YYCURSOR);
yyaccept = 0;
@@ -9599,7 +9600,7 @@ yy475:
}
yy476:
YYDEBUG(476, *YYCURSOR);
#line 1392 "ext/date/lib/parse_date.re"
#line 1393 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("datenoyearrev");
TIMELIB_INIT;
@@ -9610,7 +9611,7 @@ yy476:
TIMELIB_DEINIT;
return TIMELIB_DATE_TEXT;
}
#line 9614 "ext/date/lib/parse_date.c"
#line 9615 "ext/date/lib/parse_date.c"
yy477:
YYDEBUG(477, *YYCURSOR);
yyaccept = 10;
@@ -9751,7 +9752,7 @@ yy488:
YYDEBUG(488, *YYCURSOR);
++YYCURSOR;
YYDEBUG(489, *YYCURSOR);
#line 1110 "ext/date/lib/parse_date.re"
#line 1111 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("timetiny12 | timeshort12 | timelong12");
TIMELIB_INIT;
@@ -9767,7 +9768,7 @@ yy488:
TIMELIB_DEINIT;
return TIMELIB_TIME12;
}
#line 9771 "ext/date/lib/parse_date.c"
#line 9772 "ext/date/lib/parse_date.c"
yy490:
YYDEBUG(490, *YYCURSOR);
yyaccept = 11;
@@ -9780,7 +9781,7 @@ yy490:
}
yy491:
YYDEBUG(491, *YYCURSOR);
#line 1147 "ext/date/lib/parse_date.re"
#line 1148 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("timeshort24 | timelong24 | iso8601long");
@@ -9805,7 +9806,7 @@ yy491:
TIMELIB_DEINIT;
return TIMELIB_TIME24_WITH_ZONE;
}
#line 9809 "ext/date/lib/parse_date.c"
#line 9810 "ext/date/lib/parse_date.c"
yy492:
YYDEBUG(492, *YYCURSOR);
yyaccept = 11;
@@ -10115,7 +10116,7 @@ yy523:
YYDEBUG(523, *YYCURSOR);
++YYCURSOR;
YYDEBUG(524, *YYCURSOR);
#line 1127 "ext/date/lib/parse_date.re"
#line 1128 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("mssqltime");
TIMELIB_INIT;
@@ -10134,7 +10135,7 @@ yy523:
TIMELIB_DEINIT;
return TIMELIB_TIME24_WITH_ZONE;
}
#line 10138 "ext/date/lib/parse_date.c"
#line 10139 "ext/date/lib/parse_date.c"
yy525:
YYDEBUG(525, *YYCURSOR);
yyaccept = 11;
@@ -10240,7 +10241,7 @@ yy534:
if (yych <= '9') goto yy541;
yy535:
YYDEBUG(535, *YYCURSOR);
#line 1309 "ext/date/lib/parse_date.re"
#line 1310 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("datefull");
@@ -10254,7 +10255,7 @@ yy535:
TIMELIB_DEINIT;
return TIMELIB_DATE_FULL;
}
#line 10258 "ext/date/lib/parse_date.c"
#line 10259 "ext/date/lib/parse_date.c"
yy536:
YYDEBUG(536, *YYCURSOR);
yych = *++YYCURSOR;
@@ -10991,7 +10992,7 @@ yy605:
YYDEBUG(606, *YYCURSOR);
++YYCURSOR;
YYDEBUG(607, *YYCURSOR);
#line 1324 "ext/date/lib/parse_date.re"
#line 1325 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("pointed date YYYY");
TIMELIB_INIT;
@@ -11002,7 +11003,7 @@ yy605:
TIMELIB_DEINIT;
return TIMELIB_DATE_FULL_POINTED;
}
#line 11006 "ext/date/lib/parse_date.c"
#line 11007 "ext/date/lib/parse_date.c"
yy608:
YYDEBUG(608, *YYCURSOR);
yyaccept = 11;
@@ -11038,7 +11039,7 @@ yy611:
if (yych <= '9') goto yy605;
yy612:
YYDEBUG(612, *YYCURSOR);
#line 1336 "ext/date/lib/parse_date.re"
#line 1337 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("pointed date YY");
@@ -11051,7 +11052,7 @@ yy612:
TIMELIB_DEINIT;
return TIMELIB_DATE_FULL_POINTED;
}
#line 11055 "ext/date/lib/parse_date.c"
#line 11056 "ext/date/lib/parse_date.c"
yy613:
YYDEBUG(613, *YYCURSOR);
yyaccept = 11;
@@ -11692,7 +11693,7 @@ yy656:
}
yy657:
YYDEBUG(657, *YYCURSOR);
#line 1295 "ext/date/lib/parse_date.re"
#line 1296 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("gnudateshort");
@@ -11705,7 +11706,7 @@ yy657:
TIMELIB_DEINIT;
return TIMELIB_ISO_DATE;
}
#line 11709 "ext/date/lib/parse_date.c"
#line 11710 "ext/date/lib/parse_date.c"
yy658:
YYDEBUG(658, *YYCURSOR);
yyaccept = 13;
@@ -11811,7 +11812,7 @@ yy666:
}
yy667:
YYDEBUG(667, *YYCURSOR);
#line 1239 "ext/date/lib/parse_date.re"
#line 1240 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("americanshort | american");
@@ -11826,7 +11827,7 @@ yy667:
TIMELIB_DEINIT;
return TIMELIB_AMERICAN;
}
#line 11830 "ext/date/lib/parse_date.c"
#line 11831 "ext/date/lib/parse_date.c"
yy668:
YYDEBUG(668, *YYCURSOR);
yyaccept = 14;
@@ -12059,7 +12060,7 @@ yy700:
if (yych <= ':') goto yy704;
yy701:
YYDEBUG(701, *YYCURSOR);
#line 1522 "ext/date/lib/parse_date.re"
#line 1523 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("clf");
@@ -12079,7 +12080,7 @@ yy701:
TIMELIB_DEINIT;
return TIMELIB_CLF;
}
#line 12083 "ext/date/lib/parse_date.c"
#line 12084 "ext/date/lib/parse_date.c"
yy702:
YYDEBUG(702, *YYCURSOR);
yych = *++YYCURSOR;
@@ -12631,7 +12632,7 @@ yy763:
}
yy764:
YYDEBUG(764, *YYCURSOR);
#line 1267 "ext/date/lib/parse_date.re"
#line 1268 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("iso8601date2");
@@ -12644,7 +12645,7 @@ yy764:
TIMELIB_DEINIT;
return TIMELIB_ISO_DATE;
}
#line 12648 "ext/date/lib/parse_date.c"
#line 12649 "ext/date/lib/parse_date.c"
yy765:
YYDEBUG(765, *YYCURSOR);
yych = *++YYCURSOR;
@@ -12683,7 +12684,7 @@ yy771:
YYDEBUG(771, *YYCURSOR);
++YYCURSOR;
YYDEBUG(772, *YYCURSOR);
#line 1508 "ext/date/lib/parse_date.re"
#line 1509 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("pgtextreverse");
@@ -12696,7 +12697,7 @@ yy771:
TIMELIB_DEINIT;
return TIMELIB_PG_TEXT;
}
#line 12700 "ext/date/lib/parse_date.c"
#line 12701 "ext/date/lib/parse_date.c"
yy773:
YYDEBUG(773, *YYCURSOR);
yych = *++YYCURSOR;
@@ -12834,7 +12835,7 @@ yy783:
}
yy784:
YYDEBUG(784, *YYCURSOR);
#line 1543 "ext/date/lib/parse_date.re"
#line 1544 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("year4");
TIMELIB_INIT;
@@ -12842,7 +12843,7 @@ yy784:
TIMELIB_DEINIT;
return TIMELIB_CLF;
}
#line 12846 "ext/date/lib/parse_date.c"
#line 12847 "ext/date/lib/parse_date.c"
yy785:
YYDEBUG(785, *YYCURSOR);
yych = *++YYCURSOR;
@@ -12993,7 +12994,7 @@ yy793:
}
yy794:
YYDEBUG(794, *YYCURSOR);
#line 1364 "ext/date/lib/parse_date.re"
#line 1365 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("datenodayrev");
@@ -13006,7 +13007,7 @@ yy794:
TIMELIB_DEINIT;
return TIMELIB_DATE_NO_DAY;
}
#line 13010 "ext/date/lib/parse_date.c"
#line 13011 "ext/date/lib/parse_date.c"
yy795:
YYDEBUG(795, *YYCURSOR);
yych = *++YYCURSOR;
@@ -13221,7 +13222,7 @@ yy814:
if (yych <= '7') goto yy817;
yy815:
YYDEBUG(815, *YYCURSOR);
#line 1475 "ext/date/lib/parse_date.re"
#line 1476 "ext/date/lib/parse_date.re"
{
timelib_sll w, d;
DEBUG_OUTPUT("isoweek");
@@ -13239,7 +13240,7 @@ yy815:
TIMELIB_DEINIT;
return TIMELIB_ISO_WEEK;
}
#line 13243 "ext/date/lib/parse_date.c"
#line 13244 "ext/date/lib/parse_date.c"
yy816:
YYDEBUG(816, *YYCURSOR);
yych = *++YYCURSOR;
@@ -13249,7 +13250,7 @@ yy817:
YYDEBUG(817, *YYCURSOR);
++YYCURSOR;
YYDEBUG(818, *YYCURSOR);
#line 1456 "ext/date/lib/parse_date.re"
#line 1457 "ext/date/lib/parse_date.re"
{
timelib_sll w, d;
DEBUG_OUTPUT("isoweekday");
@@ -13267,7 +13268,7 @@ yy817:
TIMELIB_DEINIT;
return TIMELIB_ISO_WEEK;
}
#line 13271 "ext/date/lib/parse_date.c"
#line 13272 "ext/date/lib/parse_date.c"
yy819:
YYDEBUG(819, *YYCURSOR);
yych = *++YYCURSOR;
@@ -13331,7 +13332,7 @@ yy821:
}
yy822:
YYDEBUG(822, *YYCURSOR);
#line 1442 "ext/date/lib/parse_date.re"
#line 1443 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("pgydotd");
@@ -13344,7 +13345,7 @@ yy822:
TIMELIB_DEINIT;
return TIMELIB_PG_YEARDAY;
}
#line 13348 "ext/date/lib/parse_date.c"
#line 13349 "ext/date/lib/parse_date.c"
yy823:
YYDEBUG(823, *YYCURSOR);
yych = *++YYCURSOR;
@@ -13447,7 +13448,7 @@ yy842:
++YYCURSOR;
yy843:
YYDEBUG(843, *YYCURSOR);
#line 1416 "ext/date/lib/parse_date.re"
#line 1417 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("xmlrpc | xmlrpcnocolon | soap | wddx | exif");
@@ -13472,7 +13473,7 @@ yy843:
TIMELIB_DEINIT;
return TIMELIB_XMLRPC_SOAP;
}
#line 13476 "ext/date/lib/parse_date.c"
#line 13477 "ext/date/lib/parse_date.c"
yy844:
YYDEBUG(844, *YYCURSOR);
yych = *++YYCURSOR;
@@ -13734,7 +13735,7 @@ yy848:
}
yy849:
YYDEBUG(849, *YYCURSOR);
#line 1404 "ext/date/lib/parse_date.re"
#line 1405 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("datenocolon");
TIMELIB_INIT;
@@ -13745,7 +13746,7 @@ yy849:
TIMELIB_DEINIT;
return TIMELIB_DATE_NOCOLON;
}
#line 13749 "ext/date/lib/parse_date.c"
#line 13750 "ext/date/lib/parse_date.c"
yy850:
YYDEBUG(850, *YYCURSOR);
yych = *++YYCURSOR;
@@ -14665,7 +14666,7 @@ yy973:
if (yych <= '9') goto yy996;
yy974:
YYDEBUG(974, *YYCURSOR);
#line 1281 "ext/date/lib/parse_date.re"
#line 1282 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("gnudateshorter");
@@ -14678,7 +14679,7 @@ yy974:
TIMELIB_DEINIT;
return TIMELIB_ISO_DATE;
}
#line 14682 "ext/date/lib/parse_date.c"
#line 14683 "ext/date/lib/parse_date.c"
yy975:
YYDEBUG(975, *YYCURSOR);
yyaccept = 22;
@@ -15687,7 +15688,7 @@ yy1066:
}
yy1068:
YYDEBUG(1068, *YYCURSOR);
#line 1173 "ext/date/lib/parse_date.re"
#line 1174 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("gnunocolon");
TIMELIB_INIT;
@@ -15709,7 +15710,7 @@ yy1068:
TIMELIB_DEINIT;
return TIMELIB_GNU_NOCOLON;
}
#line 15713 "ext/date/lib/parse_date.c"
#line 15714 "ext/date/lib/parse_date.c"
yy1069:
YYDEBUG(1069, *YYCURSOR);
yych = *++YYCURSOR;
@@ -15801,7 +15802,7 @@ yy1075:
}
yy1076:
YYDEBUG(1076, *YYCURSOR);
#line 1219 "ext/date/lib/parse_date.re"
#line 1220 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("iso8601nocolon");
@@ -15820,7 +15821,7 @@ yy1076:
TIMELIB_DEINIT;
return TIMELIB_ISO_NOCOLON;
}
#line 15824 "ext/date/lib/parse_date.c"
#line 15825 "ext/date/lib/parse_date.c"
yy1077:
YYDEBUG(1077, *YYCURSOR);
yyaccept = 25;
@@ -16718,7 +16719,7 @@ yy1117:
}
yy1118:
YYDEBUG(1118, *YYCURSOR);
#line 1615 "ext/date/lib/parse_date.re"
#line 1616 "ext/date/lib/parse_date.re"
{
timelib_sll i;
int behavior = 0;
@@ -16734,7 +16735,7 @@ yy1118:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
#line 16738 "ext/date/lib/parse_date.c"
#line 16739 "ext/date/lib/parse_date.c"
yy1119:
YYDEBUG(1119, *YYCURSOR);
++YYCURSOR;
@@ -16785,7 +16786,7 @@ yy1126:
YYDEBUG(1126, *YYCURSOR);
++YYCURSOR;
YYDEBUG(1127, *YYCURSOR);
#line 1088 "ext/date/lib/parse_date.re"
#line 1089 "ext/date/lib/parse_date.re"
{
timelib_sll i;
int behavior = 0;
@@ -16806,7 +16807,7 @@ yy1126:
TIMELIB_DEINIT;
return TIMELIB_WEEK_DAY_OF_MONTH;
}
#line 16810 "ext/date/lib/parse_date.c"
#line 16811 "ext/date/lib/parse_date.c"
yy1128:
YYDEBUG(1128, *YYCURSOR);
yyaccept = 26;
@@ -16914,7 +16915,7 @@ yy1141:
}
yy1142:
YYDEBUG(1142, *YYCURSOR);
#line 1591 "ext/date/lib/parse_date.re"
#line 1592 "ext/date/lib/parse_date.re"
{
timelib_sll i;
int behavior = 0;
@@ -16937,7 +16938,7 @@ yy1142:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
#line 16941 "ext/date/lib/parse_date.c"
#line 16942 "ext/date/lib/parse_date.c"
yy1143:
YYDEBUG(1143, *YYCURSOR);
yych = *++YYCURSOR;
@@ -19614,7 +19615,7 @@ yy1294:
goto yy1298;
yy1295:
YYDEBUG(1295, *YYCURSOR);
#line 1065 "ext/date/lib/parse_date.re"
#line 1066 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("backof | frontof");
TIMELIB_INIT;
@@ -19636,7 +19637,7 @@ yy1295:
TIMELIB_DEINIT;
return TIMELIB_LF_DAY_OF_MONTH;
}
#line 19640 "ext/date/lib/parse_date.c"
#line 19641 "ext/date/lib/parse_date.c"
yy1296:
YYDEBUG(1296, *YYCURSOR);
yyaccept = 28;
@@ -21327,7 +21328,7 @@ yy1385:
if (yych <= '9') goto yy1385;
yy1387:
YYDEBUG(1387, *YYCURSOR);
#line 1022 "ext/date/lib/parse_date.re"
#line 1023 "ext/date/lib/parse_date.re"
{
timelib_ull i;
@@ -21352,7 +21353,7 @@ yy1387:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
#line 21356 "ext/date/lib/parse_date.c"
#line 21357 "ext/date/lib/parse_date.c"
yy1388:
YYDEBUG(1388, *YYCURSOR);
yych = *++YYCURSOR;
@@ -21788,7 +21789,7 @@ yy1416:
++YYCURSOR;
yy1417:
YYDEBUG(1417, *YYCURSOR);
#line 1010 "ext/date/lib/parse_date.re"
#line 1011 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("tomorrow");
TIMELIB_INIT;
@@ -21799,7 +21800,7 @@ yy1417:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
#line 21803 "ext/date/lib/parse_date.c"
#line 21804 "ext/date/lib/parse_date.c"
yy1418:
YYDEBUG(1418, *YYCURSOR);
yych = *++YYCURSOR;
@@ -21834,7 +21835,7 @@ yy1419:
}
yy1420:
YYDEBUG(1420, *YYCURSOR);
#line 1000 "ext/date/lib/parse_date.re"
#line 1001 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("midnight | today");
TIMELIB_INIT;
@@ -21843,7 +21844,7 @@ yy1420:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
#line 21847 "ext/date/lib/parse_date.c"
#line 21848 "ext/date/lib/parse_date.c"
yy1421:
YYDEBUG(1421, *YYCURSOR);
yych = *++YYCURSOR;
@@ -23855,7 +23856,7 @@ yy1499:
}
yy1500:
YYDEBUG(1500, *YYCURSOR);
#line 979 "ext/date/lib/parse_date.re"
#line 980 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("now");
TIMELIB_INIT;
@@ -23863,7 +23864,7 @@ yy1500:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
#line 23867 "ext/date/lib/parse_date.c"
#line 23868 "ext/date/lib/parse_date.c"
yy1501:
YYDEBUG(1501, *YYCURSOR);
yych = *++YYCURSOR;
@@ -24002,7 +24003,7 @@ yy1507:
}
yy1508:
YYDEBUG(1508, *YYCURSOR);
#line 988 "ext/date/lib/parse_date.re"
#line 989 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("noon");
TIMELIB_INIT;
@@ -24013,7 +24014,7 @@ yy1508:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
#line 24017 "ext/date/lib/parse_date.c"
#line 24018 "ext/date/lib/parse_date.c"
yy1509:
YYDEBUG(1509, *YYCURSOR);
yyaccept = 0;
@@ -24546,7 +24547,7 @@ yy1530:
++YYCURSOR;
yy1531:
YYDEBUG(1531, *YYCURSOR);
#line 967 "ext/date/lib/parse_date.re"
#line 968 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("yesterday");
TIMELIB_INIT;
@@ -24557,7 +24558,7 @@ yy1531:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
#line 24561 "ext/date/lib/parse_date.c"
#line 24562 "ext/date/lib/parse_date.c"
yy1532:
YYDEBUG(1532, *YYCURSOR);
yyaccept = 0;
@@ -24730,7 +24731,7 @@ yy1537:
goto yy1531;
}
}
#line 1741 "ext/date/lib/parse_date.re"
#line 1742 "ext/date/lib/parse_date.re"
}
@@ -25001,7 +25002,7 @@ timelib_time *timelib_parse_from_format(char *format, char *string, int len, tim
TIMELIB_CHECK_NUMBER;
sec = timelib_get_nr_ex((char **) &ptr, 2, &length);
if (sec == TIMELIB_UNSET || length != 2) {
add_pbf_error(s, "A two second minute could not be found", string, begin);
add_pbf_error(s, "A two digit second could not be found", string, begin);
} else {
s->time->s = sec;
}
+3 -2
View File
@@ -614,7 +614,8 @@ static const timelib_relunit* timelib_lookup_relunit(char **ptr)
char *begin = *ptr, *end;
const timelib_relunit *tp, *value = NULL;
while (**ptr != '\0' && **ptr != ' ' && **ptr != ',' && **ptr != '\t') {
while (**ptr != '\0' && **ptr != ' ' && **ptr != ',' && **ptr != '\t' && **ptr != ';' && **ptr != ':' &&
**ptr != '/' && **ptr != '.' && **ptr != '-' && **ptr != '(' && **ptr != ')' ) {
++*ptr;
}
end = *ptr;
@@ -2008,7 +2009,7 @@ timelib_time *timelib_parse_from_format(char *format, char *string, int len, tim
TIMELIB_CHECK_NUMBER;
sec = timelib_get_nr_ex((char **) &ptr, 2, &length);
if (sec == TIMELIB_UNSET || length != 2) {
add_pbf_error(s, "A two second minute could not be found", string, begin);
add_pbf_error(s, "A two digit second could not be found", string, begin);
} else {
s->time->s = sec;
}
+2 -2
View File
@@ -1,4 +1,4 @@
/* Generated by re2c 0.13.5 on Sun Mar 31 10:48:17 2013 */
/* Generated by re2c 0.13.5 on Wed Nov 27 11:14:23 2013 */
#line 1 "ext/date/lib/parse_iso_intervals.re"
/*
+----------------------------------------------------------------------+
@@ -380,7 +380,7 @@ yy6:
break;
}
ptr++;
} while (*ptr);
} while (!s->errors->error_count && *ptr);
s->have_period = 1;
TIMELIB_DEINIT;
return TIMELIB_PERIOD;
+1 -1
View File
@@ -348,7 +348,7 @@ isoweek = year4 "-"? "W" weekofyear;
break;
}
ptr++;
} while (*ptr);
} while (!s->errors->error_count && *ptr);
s->have_period = 1;
TIMELIB_DEINIT;
return TIMELIB_PERIOD;
+2
View File
@@ -138,5 +138,7 @@ int timelib_astro_rise_set_altitude(timelib_time *time, double lon, double lat,
/* from interval.c */
timelib_rel_time *timelib_diff(timelib_time *one, timelib_time *two);
timelib_time *timelib_add(timelib_time *t, timelib_rel_time *interval);
timelib_time *timelib_sub(timelib_time *t, timelib_rel_time *interval);
#endif
+918 -912
View File
File diff suppressed because it is too large. Load diff
+4 -5
View File
@@ -137,19 +137,16 @@ void timelib_unixtime2gmt(timelib_time* tm, timelib_sll ts)
void timelib_update_from_sse(timelib_time *tm)
{
timelib_sll sse;
int z = tm->z;
signed int dst = tm->dst;
sse = tm->sse;
switch (tm->zone_type) {
case TIMELIB_ZONETYPE_ABBR:
case TIMELIB_ZONETYPE_OFFSET: {
int z = tm->z;
signed int dst = tm->dst;
timelib_unixtime2gmt(tm, tm->sse - (tm->z * 60) + (tm->dst * 3600));
tm->z = z;
tm->dst = dst;
goto cleanup;
}
@@ -171,6 +168,8 @@ cleanup:
tm->sse = sse;
tm->is_localtime = 1;
tm->have_zone = 1;
tm->z = z;
tm->dst = dst;
}
void timelib_unixtime2local(timelib_time *tm, timelib_sll ts)
+62 -73
View File
@@ -480,7 +480,7 @@ const zend_function_entry date_funcs_immutable[] = {
PHP_ME(DateTimeImmutable, __construct, arginfo_date_create, ZEND_ACC_CTOR|ZEND_ACC_PUBLIC)
PHP_ME(DateTime, __wakeup, NULL, ZEND_ACC_PUBLIC)
PHP_ME(DateTimeImmutable, __set_state, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
PHP_ME_MAPPING(createFromFormat, date_create_from_format, arginfo_date_create_from_format, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
PHP_ME_MAPPING(createFromFormat, date_create_immutable_from_format, arginfo_date_create_from_format, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
PHP_ME_MAPPING(getLastErrors, date_get_last_errors, arginfo_date_get_last_errors, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
PHP_ME_MAPPING(format, date_format, arginfo_date_method_format, 0)
PHP_ME_MAPPING(getTimezone, date_timezone_get, arginfo_date_method_timezone_get, 0)
@@ -797,6 +797,14 @@ PHP_RSHUTDOWN_FUNCTION(date)
#define DATE_FORMAT_ISO8601 "Y-m-d\\TH:i:sO"
/*
* This comes from various sources that like to contradict. I'm going with the
* format here because of:
* http://msdn.microsoft.com/en-us/library/windows/desktop/aa384321%28v=vs.85%29.aspx
* and http://curl.haxx.se/rfc/cookie_spec.html
*/
#define DATE_FORMAT_COOKIE "l, d-M-Y H:i:s T"
#define DATE_TZ_ERRMSG \
"It is not safe to rely on the system's timezone settings. You are " \
"*required* to use the date.timezone setting or the " \
@@ -827,7 +835,7 @@ PHP_MINIT_FUNCTION(date)
* with the variations that the only legal time zone is GMT
* and the separators between the elements of the date must be dashes."
*/
REGISTER_STRING_CONSTANT("DATE_COOKIE", DATE_FORMAT_RFC850, CONST_CS | CONST_PERSISTENT);
REGISTER_STRING_CONSTANT("DATE_COOKIE", DATE_FORMAT_COOKIE, CONST_CS | CONST_PERSISTENT);
REGISTER_STRING_CONSTANT("DATE_ISO8601", DATE_FORMAT_ISO8601, CONST_CS | CONST_PERSISTENT);
REGISTER_STRING_CONSTANT("DATE_RFC822", DATE_FORMAT_RFC822, CONST_CS | CONST_PERSISTENT);
REGISTER_STRING_CONSTANT("DATE_RFC850", DATE_FORMAT_RFC850, CONST_CS | CONST_PERSISTENT);
@@ -1406,6 +1414,7 @@ PHPAPI signed long php_parse_date(char *string, signed long *now)
parsed_time = timelib_strtotime(string, strlen(string), &error, DATE_TIMEZONEDB, php_date_parse_tzfile_wrapper);
if (error->error_count) {
timelib_time_dtor(parsed_time);
timelib_error_container_dtor(error);
return -1;
}
@@ -1980,12 +1989,25 @@ zend_object_iterator *date_object_period_get_iterator(zend_class_entry *ce, zval
return (zend_object_iterator*)iterator;
}
static int implement_date_interface_handler(zend_class_entry *interface, zend_class_entry *implementor TSRMLS_DC)
{
if (implementor->type == ZEND_USER_CLASS &&
!instanceof_function(implementor, date_ce_date TSRMLS_CC) &&
!instanceof_function(implementor, date_ce_immutable TSRMLS_CC)
) {
zend_error(E_ERROR, "DateTimeInterface can't be implemented by user classes");
}
return SUCCESS;
}
static void date_register_classes(TSRMLS_D)
{
zend_class_entry ce_date, ce_immutable, ce_timezone, ce_interval, ce_period, ce_interface;
INIT_CLASS_ENTRY(ce_interface, "DateTimeInterface", date_funcs_interface);
date_ce_interface = zend_register_internal_interface(&ce_interface TSRMLS_CC);
date_ce_interface->interface_gets_implemented = implement_date_interface_handler;
INIT_CLASS_ENTRY(ce_date, "DateTime", date_funcs_date);
ce_date.create_object = date_object_new_date;
@@ -2001,7 +2023,7 @@ static void date_register_classes(TSRMLS_D)
zend_declare_class_constant_stringl(date_ce_date, const_name, sizeof(const_name)-1, value, sizeof(value)-1 TSRMLS_CC);
REGISTER_DATE_CLASS_CONST_STRING("ATOM", DATE_FORMAT_RFC3339);
REGISTER_DATE_CLASS_CONST_STRING("COOKIE", DATE_FORMAT_RFC850);
REGISTER_DATE_CLASS_CONST_STRING("COOKIE", DATE_FORMAT_COOKIE);
REGISTER_DATE_CLASS_CONST_STRING("ISO8601", DATE_FORMAT_ISO8601);
REGISTER_DATE_CLASS_CONST_STRING("RFC822", DATE_FORMAT_RFC822);
REGISTER_DATE_CLASS_CONST_STRING("RFC850", DATE_FORMAT_RFC850);
@@ -2142,27 +2164,21 @@ static zval* date_clone_immutable(zval *object TSRMLS_DC)
static int date_object_compare_date(zval *d1, zval *d2 TSRMLS_DC)
{
if (Z_TYPE_P(d1) == IS_OBJECT && Z_TYPE_P(d2) == IS_OBJECT &&
instanceof_function(Z_OBJCE_P(d1), date_ce_date TSRMLS_CC) &&
instanceof_function(Z_OBJCE_P(d2), date_ce_date TSRMLS_CC)) {
php_date_obj *o1 = zend_object_store_get_object(d1 TSRMLS_CC);
php_date_obj *o2 = zend_object_store_get_object(d2 TSRMLS_CC);
php_date_obj *o1 = zend_object_store_get_object(d1 TSRMLS_CC);
php_date_obj *o2 = zend_object_store_get_object(d2 TSRMLS_CC);
if (!o1->time || !o2->time) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Trying to compare an incomplete DateTime object");
return 1;
}
if (!o1->time->sse_uptodate) {
timelib_update_ts(o1->time, o1->time->tz_info);
}
if (!o2->time->sse_uptodate) {
timelib_update_ts(o2->time, o2->time->tz_info);
}
return (o1->time->sse == o2->time->sse) ? 0 : ((o1->time->sse < o2->time->sse) ? -1 : 1);
if (!o1->time || !o2->time) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Trying to compare an incomplete DateTime or DateTimeImmutable object");
return 1;
}
if (!o1->time->sse_uptodate) {
timelib_update_ts(o1->time, o1->time->tz_info);
}
if (!o2->time->sse_uptodate) {
timelib_update_ts(o2->time, o2->time->tz_info);
}
return 1;
return (o1->time->sse == o2->time->sse) ? 0 : ((o1->time->sse < o2->time->sse) ? -1 : 1);
}
static HashTable *date_object_get_gc(zval *object, zval ***table, int *n TSRMLS_DC)
@@ -2198,13 +2214,13 @@ static HashTable *date_object_get_properties(zval *object TSRMLS_DC)
/* first we add the date and time in ISO format */
MAKE_STD_ZVAL(zv);
ZVAL_STRING(zv, date_format("Y-m-d H:i:s", 12, dateobj->time, 1), 0);
zend_hash_update(props, "date", 5, &zv, sizeof(zval), NULL);
zend_hash_update(props, "date", 5, &zv, sizeof(zv), NULL);
/* then we add the timezone name (or similar) */
if (dateobj->time->is_localtime) {
MAKE_STD_ZVAL(zv);
ZVAL_LONG(zv, dateobj->time->zone_type);
zend_hash_update(props, "timezone_type", 14, &zv, sizeof(zval), NULL);
zend_hash_update(props, "timezone_type", 14, &zv, sizeof(zv), NULL);
MAKE_STD_ZVAL(zv);
switch (dateobj->time->zone_type) {
@@ -2227,7 +2243,7 @@ static HashTable *date_object_get_properties(zval *object TSRMLS_DC)
ZVAL_STRING(zv, dateobj->time->tz_abbr, 1);
break;
}
zend_hash_update(props, "timezone", 9, &zv, sizeof(zval), NULL);
zend_hash_update(props, "timezone", 9, &zv, sizeof(zv), NULL);
}
return props;
@@ -2305,7 +2321,7 @@ static HashTable *date_object_get_properties_timezone(zval *object TSRMLS_DC)
MAKE_STD_ZVAL(zv);
ZVAL_LONG(zv, tzobj->type);
zend_hash_update(props, "timezone_type", 14, &zv, sizeof(zval), NULL);
zend_hash_update(props, "timezone_type", 14, &zv, sizeof(zv), NULL);
MAKE_STD_ZVAL(zv);
switch (tzobj->type) {
@@ -2327,7 +2343,7 @@ static HashTable *date_object_get_properties_timezone(zval *object TSRMLS_DC)
ZVAL_STRING(zv, tzobj->tzi.z.abbr, 1);
break;
}
zend_hash_update(props, "timezone", 9, &zv, sizeof(zval), NULL);
zend_hash_update(props, "timezone", 9, &zv, sizeof(zv), NULL);
return props;
}
@@ -2394,7 +2410,7 @@ static HashTable *date_object_get_properties_interval(zval *object TSRMLS_DC)
#define PHP_DATE_INTERVAL_ADD_PROPERTY(n,f) \
MAKE_STD_ZVAL(zv); \
ZVAL_LONG(zv, (long)intervalobj->diff->f); \
zend_hash_update(props, n, strlen(n) + 1, &zv, sizeof(zval), NULL);
zend_hash_update(props, n, strlen(n) + 1, &zv, sizeof(zv), NULL);
PHP_DATE_INTERVAL_ADD_PROPERTY("y", y);
PHP_DATE_INTERVAL_ADD_PROPERTY("m", m);
@@ -2411,7 +2427,7 @@ static HashTable *date_object_get_properties_interval(zval *object TSRMLS_DC)
} else {
MAKE_STD_ZVAL(zv);
ZVAL_FALSE(zv);
zend_hash_update(props, "days", 5, &zv, sizeof(zval), NULL);
zend_hash_update(props, "days", 5, &zv, sizeof(zv), NULL);
}
PHP_DATE_INTERVAL_ADD_PROPERTY("special_type", special.type);
PHP_DATE_INTERVAL_ADD_PROPERTY("special_amount", special.amount);
@@ -2607,6 +2623,7 @@ PHPAPI int php_date_initialize(php_date_obj *dateobj, /*const*/ char *time_str,
timelib_fill_holes(dateobj->time, now, TIMELIB_NO_CLONE);
timelib_update_ts(dateobj->time, tzi);
timelib_update_from_sse(dateobj->time);
dateobj->time->have_relative = 0;
@@ -3120,33 +3137,16 @@ static void php_date_add(zval *object, zval *interval, zval *return_value TSRMLS
{
php_date_obj *dateobj;
php_interval_obj *intobj;
int bias = 1;
timelib_time *new_time;
dateobj = (php_date_obj *) zend_object_store_get_object(object TSRMLS_CC);
DATE_CHECK_INITIALIZED(dateobj->time, DateTime);
intobj = (php_interval_obj *) zend_object_store_get_object(interval TSRMLS_CC);
DATE_CHECK_INITIALIZED(intobj->initialized, DateInterval);
if (intobj->diff->have_weekday_relative || intobj->diff->have_special_relative) {
memcpy(&dateobj->time->relative, intobj->diff, sizeof(struct timelib_rel_time));
} else {
if (intobj->diff->invert) {
bias = -1;
}
memset(&dateobj->time->relative, 0, sizeof(struct timelib_rel_time));
dateobj->time->relative.y = intobj->diff->y * bias;
dateobj->time->relative.m = intobj->diff->m * bias;
dateobj->time->relative.d = intobj->diff->d * bias;
dateobj->time->relative.h = intobj->diff->h * bias;
dateobj->time->relative.i = intobj->diff->i * bias;
dateobj->time->relative.s = intobj->diff->s * bias;
}
dateobj->time->have_relative = 1;
dateobj->time->sse_uptodate = 0;
timelib_update_ts(dateobj->time, NULL);
timelib_update_from_sse(dateobj->time);
dateobj->time->have_relative = 0;
new_time = timelib_add(dateobj->time, intobj->diff);
timelib_time_dtor(dateobj->time);
dateobj->time = new_time;
}
/* {{{ proto DateTime date_add(DateTime object, DateInterval interval)
@@ -3187,7 +3187,7 @@ static void php_date_sub(zval *object, zval *interval, zval *return_value TSRMLS
{
php_date_obj *dateobj;
php_interval_obj *intobj;
int bias = 1;
timelib_time *new_time;
dateobj = (php_date_obj *) zend_object_store_get_object(object TSRMLS_CC);
DATE_CHECK_INITIALIZED(dateobj->time, DateTime);
@@ -3199,24 +3199,9 @@ static void php_date_sub(zval *object, zval *interval, zval *return_value TSRMLS
return;
}
if (intobj->diff->invert) {
bias = -1;
}
memset(&dateobj->time->relative, 0, sizeof(struct timelib_rel_time));
dateobj->time->relative.y = 0 - (intobj->diff->y * bias);
dateobj->time->relative.m = 0 - (intobj->diff->m * bias);
dateobj->time->relative.d = 0 - (intobj->diff->d * bias);
dateobj->time->relative.h = 0 - (intobj->diff->h * bias);
dateobj->time->relative.i = 0 - (intobj->diff->i * bias);
dateobj->time->relative.s = 0 - (intobj->diff->s * bias);
dateobj->time->have_relative = 1;
dateobj->time->sse_uptodate = 0;
timelib_update_ts(dateobj->time, NULL);
timelib_update_from_sse(dateobj->time);
dateobj->time->have_relative = 0;
new_time = timelib_sub(dateobj->time, intobj->diff);
timelib_time_dtor(dateobj->time);
dateobj->time = new_time;
}
/* {{{ proto DateTime date_sub(DateTime object, DateInterval interval)
@@ -3608,13 +3593,13 @@ PHP_FUNCTION(date_diff)
php_interval_obj *interval;
long absolute = 0;
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OO|l", &object1, date_ce_date, &object2, date_ce_date, &absolute) == FAILURE) {
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OO|l", &object1, date_ce_interface, &object2, date_ce_interface, &absolute) == FAILURE) {
RETURN_FALSE;
}
dateobj1 = (php_date_obj *) zend_object_store_get_object(object1 TSRMLS_CC);
dateobj2 = (php_date_obj *) zend_object_store_get_object(object2 TSRMLS_CC);
DATE_CHECK_INITIALIZED(dateobj1->time, DateTime);
DATE_CHECK_INITIALIZED(dateobj2->time, DateTime);
DATE_CHECK_INITIALIZED(dateobj1->time, DateTimeInterface);
DATE_CHECK_INITIALIZED(dateobj2->time, DateTimeInterface);
timelib_update_ts(dateobj1->time, NULL);
timelib_update_ts(dateobj2->time, NULL);
@@ -4064,7 +4049,11 @@ zval *date_interval_read_property(zval *object, zval *member, int type, const ze
ALLOC_INIT_ZVAL(retval);
Z_SET_REFCOUNT_P(retval, 0);
ZVAL_LONG(retval, value);
if (value != -99999) {
ZVAL_LONG(retval, value);
} else {
ZVAL_FALSE(retval);
}
if (member == &tmp_member) {
zval_dtor(member);
@@ -4388,7 +4377,7 @@ PHP_METHOD(DatePeriod, __construct)
zend_replace_error_handling(EH_THROW, NULL, &error_handling TSRMLS_CC);
if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "OOl|l", &start, date_ce_interface, &interval, date_ce_interval, &recurrences, &options) == FAILURE) {
if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "OOO|l", &start, date_ce_interface, &interval, date_ce_interval, &end, date_ce_date, &options) == FAILURE) {
if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "OOO|l", &start, date_ce_interface, &interval, date_ce_interval, &end, date_ce_interface, &options) == FAILURE) {
if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "s|l", &isostr, &isostr_len, &options) == FAILURE) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "This constructor accepts either (DateTimeInterface, DateInterval, int) OR (DateTimeInterface, DateInterval, DateTime) OR (string) as arguments.");
zend_restore_error_handling(&error_handling TSRMLS_CC);
@@ -0,0 +1,10 @@
--TEST--
Wrong var_dump(DateInterval->days) value
--FILE--
<?php
$interval = new DateInterval('P2Y4DT6H8M');
var_dump($interval->days);
--EXPECT--
bool(false)
@@ -0,0 +1,29 @@
--TEST--
Test fix for DateTime when date have textual day with dot or other special char at end
--FILE--
<?php
//Set the default time zone
date_default_timezone_set('Europe/London');
echo "*** Testing clone on DateTime objects ***\n";
// Create a DateTime object..
$orig = new DateTime('2012-11-29 17:00:00');
// String to parse
$string = "Thu., Nov. 29, 2012 5:00PM";
// Create a DateTime object from format
$fromFormat = DateTime::createFromFormat( "D., M# j, Y g:iA", $string );
echo "Format method: " . $orig->format("D., M. j, Y g:iA") . "\n";
echo "createFromFormat method: " . $fromFormat->format("D., M. j, Y g:iA") . "\n";
?>
===DONE===
--EXPECTF--
*** Testing clone on DateTime objects ***
Format method: Thu., Nov. 29, 2012 5:00PM
createFromFormat method: Thu., Nov. 29, 2012 5:00PM
===DONE===
+1 -1
View File
@@ -31,7 +31,7 @@ var_dump( $date->format( DateTime::W3C) ) ;
--EXPECT--
*** Testing date_format() : basic functionality - formatting coinstants ***
string(25) "2005-07-14T22:30:41+01:00"
string(32) "Thursday, 14-Jul-05 22:30:41 BST"
string(34) "Thursday, 14-Jul-2005 22:30:41 BST"
string(24) "2005-07-14T22:30:41+0100"
string(29) "Thu, 14 Jul 05 22:30:41 +0100"
string(32) "Thursday, 14-Jul-05 22:30:41 BST"
+2 -2
View File
@@ -160,7 +160,7 @@ array(11) {
["ATOM"]=>
string(13) "Y-m-d\TH:i:sP"
["COOKIE"]=>
string(16) "l, d-M-y H:i:s T"
string(16) "l, d-M-Y H:i:s T"
["ISO8601"]=>
string(13) "Y-m-d\TH:i:sO"
["RFC822"]=>
@@ -180,4 +180,4 @@ array(11) {
["W3C"]=>
string(13) "Y-m-d\TH:i:sP"
}
===DONE===
===DONE===
+2 -2
View File
@@ -11,5 +11,5 @@ echo $a->format(DateTime::COOKIE);
echo "\n";
?>
--EXPECTF--
Thursday, 01-Jan-09 00:00:00 WET
Thursday, 01-Jan-09 00:00:00 WET
Thursday, 01-Jan-2009 00:00:00 WET
Thursday, 01-Jan-2009 00:00:00 WET
+16
View File
@@ -0,0 +1,16 @@
--TEST--
Bug #53879 (DateTime::createFromFormat() fails to parse cookie expiration date)
--INI--
date.timezone=UTC
--FILE--
<?php
$date = DateTime::createFromFormat(DateTime::COOKIE, "Mon, 21-Jan-2041 15:24:52 GMT");
print_r($date);
?>
--EXPECTF--
DateTime Object
(
[date] => 2041-01-21 15:24:52
[timezone_type] => 2
[timezone] => GMT
)
+20
View File
@@ -0,0 +1,20 @@
--TEST--
Test for #63391 (Incorrect/inconsistent day of week prior to the year 1600)
--FILE--
<?php
ini_set('date.timezone', 'UTC');
print "Date PHP\n";
print "---------- ---\n";
$dates = array('1599-12-30', '1599-12-31', '1600-01-01', '1600-01-02');
foreach ($dates as $date) {
echo date_create($date)->format('Y-m-d D'), "\n";
}
?>
--EXPECT--
Date PHP
---------- ---
1599-12-30 Thu
1599-12-31 Fri
1600-01-01 Sat
1600-01-02 Sun
+14
View File
@@ -0,0 +1,14 @@
--TEST--
Test for bug #64157: DateTime::createFromFormat() reports confusing error message
--CREDITS--
Boro Sitnikovski <buritomath@yahoo.com>
--INI--
date.timezone = UTC
--FILE--
<?php
DateTime::createFromFormat('s', '0');
$lastErrors = DateTime::getLastErrors();
print_r($lastErrors['errors'][0]);
?>
--EXPECT--
A two digit second could not be found
+2
View File
@@ -6,6 +6,8 @@ if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') {
die("skip Test is valid for Windows");
}
?>
--INI--
date.timezone = UTC
--FILE--
<?php
setlocale(LC_ALL, 'Japanese_Japan.932');
+12
View File
@@ -0,0 +1,12 @@
--TEST--
Test for bug #65502: DateTimeImmutable::createFromFormat returns DateTime
--CREDITS--
Boro Sitnikovski <buritomath@yahoo.com>
--INI--
date.timezone = UTC
--FILE--
<?php
echo get_class(DateTimeImmutable::createFromFormat('j-M-Y', '12-Sep-2013'));
?>
--EXPECT--
DateTimeImmutable
+34
View File
@@ -0,0 +1,34 @@
--TEST--
Test for bug #65548: Comparison for DateTimeImmutable doesn't work
--CREDITS--
Boro Sitnikovski <buritomath@yahoo.com>
--INI--
date.timezone = UTC
--FILE--
<?php
$iToday = new DateTimeImmutable('today');
$iTomorrow = new DateTimeImmutable('tomorrow');
$mToday = new DateTime('today');
$mTomorrow = new DateTime('tomorrow');
var_dump($iToday < $iTomorrow);
var_dump($iToday == $iTomorrow);
var_dump($iToday > $iTomorrow);
var_dump($iToday == $mToday);
var_dump($iToday === $mToday);
var_dump($iToday < $mTomorrow);
var_dump($iToday == $mTomorrow);
var_dump($iToday > $mTomorrow);
?>
--EXPECT--
bool(true)
bool(false)
bool(false)
bool(true)
bool(false)
bool(true)
bool(false)
bool(false)
+2 -2
View File
@@ -41,8 +41,8 @@ Date constants
--EXPECT--
string(25) "2006-07-01T14:27:30+02:00"
string(25) "2006-05-30T14:32:13+02:00"
string(33) "Saturday, 01-Jul-06 14:27:30 CEST"
string(32) "Tuesday, 30-May-06 14:32:13 CEST"
string(35) "Saturday, 01-Jul-2006 14:27:30 CEST"
string(34) "Tuesday, 30-May-2006 14:32:13 CEST"
string(24) "2006-07-01T14:27:30+0200"
string(24) "2006-05-30T14:32:13+0200"
string(29) "Sat, 01 Jul 06 14:27:30 +0200"
@@ -0,0 +1,27 @@
--TEST--
Test for Date/Time construction during a forward DST transition
--FILE--
<?php
date_default_timezone_set('America/New_York');
$date = new DateTime('2010-03-14 01:30:00');
echo $date->format('Y-m-d H:i:s T/e - U') . "\n";
$date = new DateTime('2010-03-14 02:00:00');
echo $date->format('Y-m-d H:i:s T/e - U') . "\n";
$date = new DateTime('2010-03-14 02:30:00');
echo $date->format('Y-m-d H:i:s T/e - U') . "\n";
$date = new DateTime('2010-03-14 03:00:00');
echo $date->format('Y-m-d H:i:s T/e - U') . "\n";
$date = new DateTime('2010-03-14 03:30:00');
echo $date->format('Y-m-d H:i:s T/e - U') . "\n";
?>
--EXPECT--
2010-03-14 01:30:00 EST/America/New_York - 1268548200
2010-03-14 03:00:00 EDT/America/New_York - 1268550000
2010-03-14 03:30:00 EDT/America/New_York - 1268551800
2010-03-14 03:00:00 EDT/America/New_York - 1268550000
2010-03-14 03:30:00 EDT/America/New_York - 1268551800
+2 -2
View File
@@ -45,7 +45,7 @@ string(25) "2008-08-08T08:08:08+00:00"
string(%d) "%s"
--DATE_COOKIE Constant--
string(30) "Friday, 08-Aug-08 08:08:08 GMT"
string(32) "Friday, 08-Aug-2008 08:08:08 GMT"
string(%d) "%s"
--DATE_RFC822 Constant--
@@ -79,4 +79,4 @@ string(%d) "%s"
--DATE_W3C Constant--
string(25) "2008-08-08T08:08:08+00:00"
string(%d) "%s"
===DONE===
===DONE===
@@ -0,0 +1,96 @@
--TEST--
RFC: DateTime and Daylight Saving Time Transitions (zone type 3, ba)
--CREDITS--
Daniel Convissor <danielc@php.net>
--FILE--
<?php
date_default_timezone_set('America/New_York');
$date_format = 'Y-m-d H:i:s T e';
$interval_format = 'P%dDT%hH';
/*
* Backward Transitions, add().
*/
$start = new DateTime('2010-11-07 01:59:59');
$interval_spec = 'PT1S';
$interval = new DateInterval($interval_spec);
echo 'ba1 ' . $start->format($date_format) . " + $interval_spec = "
. $start->add($interval)->format($date_format) . "\n";
$start = new DateTime('2010-11-06 04:30:00');
$interval_spec = 'P1D';
$interval = new DateInterval($interval_spec);
echo 'ba2 ' . $start->format($date_format) . " + $interval_spec = "
. $start->add($interval)->format($date_format) . "\n";
$start = new DateTime('2010-11-06 04:30:00');
$interval_spec = 'PT24H';
$interval = new DateInterval($interval_spec);
echo 'ba3 ' . $start->format($date_format) . " + $interval_spec = "
. $start->add($interval)->format($date_format) . "\n";
$start = new DateTime('2010-11-06 04:30:00');
$interval_spec = 'PT23H';
$interval = new DateInterval($interval_spec);
echo 'ba4 ' . $start->format($date_format) . " + $interval_spec = "
. $start->add($interval)->format($date_format) . "\n";
$start = new DateTime('2010-11-06 04:30:00');
$interval_spec = 'PT22H';
$interval = new DateInterval($interval_spec);
echo 'ba5 ' . $start->format($date_format) . " + $interval_spec = "
. $start->add($interval)->format($date_format) . "\n";
$start = new DateTime('2010-11-06 04:30:00');
$interval_spec = 'PT21H';
$interval = new DateInterval($interval_spec);
echo 'ba6 ' . $start->format($date_format) . " + $interval_spec = "
. $start->add($interval)->format($date_format) . "\n";
$start = new DateTime('2010-11-06 01:30:00');
$interval_spec = 'P1D';
$interval = new DateInterval($interval_spec);
echo 'ba7 ' . $start->format($date_format) . " + $interval_spec = "
. $start->add($interval)->format($date_format) . "\n";
$start = new DateTime('2010-11-06 01:30:00');
$interval_spec = 'P1DT1H';
$interval = new DateInterval($interval_spec);
echo 'ba8 ' . $start->format($date_format) . " + $interval_spec = "
. $start->add($interval)->format($date_format) . "\n";
$start = new DateTime('2010-11-06 04:30:00');
$interval_spec = 'PT25H';
$interval = new DateInterval($interval_spec);
echo 'ba9 ' . $start->format($date_format) . " + $interval_spec = "
. $start->add($interval)->format($date_format) . "\n";
$start = new DateTime('2010-11-06 03:30:00');
$interval_spec = 'P1D';
$interval = new DateInterval($interval_spec);
echo 'ba10 ' . $start->format($date_format) . " + $interval_spec = "
. $start->add($interval)->format($date_format) . "\n";
$start = new DateTime('2010-11-06 02:30:00');
$interval_spec = 'P1D';
$interval = new DateInterval($interval_spec);
echo 'ba11 ' . $start->format($date_format) . " + $interval_spec = "
. $start->add($interval)->format($date_format) . "\n";
echo "\n";
?>
--EXPECT--
ba1 2010-11-07 01:59:59 EDT America/New_York + PT1S = 2010-11-07 01:00:00 EST America/New_York
ba2 2010-11-06 04:30:00 EDT America/New_York + P1D = 2010-11-07 04:30:00 EST America/New_York
ba3 2010-11-06 04:30:00 EDT America/New_York + PT24H = 2010-11-07 03:30:00 EST America/New_York
ba4 2010-11-06 04:30:00 EDT America/New_York + PT23H = 2010-11-07 02:30:00 EST America/New_York
ba5 2010-11-06 04:30:00 EDT America/New_York + PT22H = 2010-11-07 01:30:00 EST America/New_York
ba6 2010-11-06 04:30:00 EDT America/New_York + PT21H = 2010-11-07 01:30:00 EDT America/New_York
ba7 2010-11-06 01:30:00 EDT America/New_York + P1D = 2010-11-07 01:30:00 EDT America/New_York
ba8 2010-11-06 01:30:00 EDT America/New_York + P1DT1H = 2010-11-07 02:30:00 EST America/New_York
ba9 2010-11-06 04:30:00 EDT America/New_York + PT25H = 2010-11-07 04:30:00 EST America/New_York
ba10 2010-11-06 03:30:00 EDT America/New_York + P1D = 2010-11-07 03:30:00 EST America/New_York
ba11 2010-11-06 02:30:00 EDT America/New_York + P1D = 2010-11-07 02:30:00 EST America/New_York
@@ -0,0 +1,48 @@
--TEST--
RFC: DateTime and Daylight Saving Time Transitions (zone type 3, bd1)
--CREDITS--
Daniel Convissor <danielc@php.net>
--FILE--
<?php
date_default_timezone_set('America/New_York');
$date_format = 'Y-m-d H:i:s T e';
$interval_format = 'P%dDT%hH';
/*
* Backward Transitions, diff().
*/
$end = new DateTime('2010-11-07 05:30:00');
$start = new DateTime('2010-11-06 04:30:00');
echo 'bd1 ' . $end->format($date_format) . ' - ' . $start->format($date_format)
. ' = ' . $start->diff($end)->format($interval_format) . "\n";
$end = new DateTime('2010-11-07 04:30:00');
$start = new DateTime('2010-11-06 04:30:00');
echo 'bd2 ' . $end->format($date_format) . ' - ' . $start->format($date_format)
. ' = ' . $start->diff($end)->format($interval_format) . "\n";
$end = new DateTime('2010-11-07 03:30:00');
$start = new DateTime('2010-11-06 04:30:00');
echo 'bd3 ' . $end->format($date_format) . ' - ' . $start->format($date_format)
. ' = ' . $start->diff($end)->format($interval_format) . "\n";
$end = new DateTime('2010-11-07 02:30:00');
$start = new DateTime('2010-11-06 04:30:00');
echo 'bd4 ' . $end->format($date_format) . ' - ' . $start->format($date_format)
. ' = ' . $start->diff($end)->format($interval_format) . "\n";
$end = new DateTime('2010-11-07 01:30:00');
$start = new DateTime('2010-11-06 01:30:00');
echo 'bd7 ' . $end->format($date_format) . ' - ' . $start->format($date_format)
. ' = ' . $start->diff($end)->format($interval_format) . "\n";
echo "\n";
?>
--EXPECT--
bd1 2010-11-07 05:30:00 EST America/New_York - 2010-11-06 04:30:00 EDT America/New_York = P1DT1H
bd2 2010-11-07 04:30:00 EST America/New_York - 2010-11-06 04:30:00 EDT America/New_York = P1DT0H
bd3 2010-11-07 03:30:00 EST America/New_York - 2010-11-06 04:30:00 EDT America/New_York = P0DT24H
bd4 2010-11-07 02:30:00 EST America/New_York - 2010-11-06 04:30:00 EDT America/New_York = P0DT23H
bd7 2010-11-07 01:30:00 EDT America/New_York - 2010-11-06 01:30:00 EDT America/New_York = P1DT0H
@@ -0,0 +1,56 @@
--TEST--
RFC: DateTime and Daylight Saving Time Transitions (zone type 3, bd2)
--CREDITS--
Daniel Convissor <danielc@php.net>
--XFAIL--
Still not quite right
--FILE--
<?php
date_default_timezone_set('America/New_York');
$date_format = 'Y-m-d H:i:s T e';
$interval_format = 'P%dDT%hH';
/*
* For backward transitions, must create objects with zone type 2
* where specifying Daylight or Standard time is required
* then converting them to zone type 3.
*/
$tz = new DateTimeZone('America/New_York');
/*
* Backward Transitions, diff().
*/
$end = new DateTime('2010-11-07 05:30:00');
$end->setTimeZone($tz);
$start = new DateTime('2010-11-06 04:30:59');
echo 'bd0 ' . $end->format($date_format) . ' - ' . $start->format($date_format)
. ' = ' . $start->diff($end)->format('P%dDT%hH%iM%sS') . "\n";
$end = new DateTime('2010-11-07 01:30:00 EST');
$end->setTimeZone($tz);
$start = new DateTime('2010-11-06 04:30:00');
echo 'bd5 ' . $end->format($date_format) . ' - ' . $start->format($date_format)
. ' = ' . $start->diff($end)->format($interval_format) . "\n";
$end = new DateTime('2010-11-07 01:30:00 EDT');
$end->setTimeZone($tz);
$start = new DateTime('2010-11-06 04:30:00');
echo 'bd6 ' . $end->format($date_format) . ' - ' . $start->format($date_format)
. ' = ' . $start->diff($end)->format($interval_format) . "\n";
$end = new DateTime('2010-11-07 01:30:00 EST');
$end->setTimeZone($tz);
$start = new DateTime('2010-11-06 01:30:00');
echo 'bd8 ' . $end->format($date_format) . ' - ' . $start->format($date_format)
. ' = ' . $start->diff($end)->format($interval_format) . "\n";
echo "\n";
?>
--EXPECT--
bd0 2010-11-07 01:00:00 EST America/New_York - 2010-11-07 01:59:59 EDT America/New_York = PT0H0M1S
bd5 2010-11-07 01:30:00 EST America/New_York - 2010-11-06 04:30:00 EDT America/New_York = P0DT22H
bd6 2010-11-07 01:30:00 EDT America/New_York - 2010-11-06 04:30:00 EDT America/New_York = P0DT21H
bd8 2010-11-07 01:30:00 EST America/New_York - 2010-11-06 01:30:00 EDT America/New_York = P1DT1H
@@ -0,0 +1,92 @@
--TEST--
RFC: DateTime and Daylight Saving Time Transitions (zone type 3, bs)
--CREDITS--
Daniel Convissor <danielc@php.net>
--FILE--
<?php
date_default_timezone_set('America/New_York');
$tz = new DateTimeZone('America/New_York');
$date_format = 'Y-m-d H:i:s T e';
$interval_format = 'P%dDT%hH';
/*
* Backward Transitions, sub().
*/
$end = new DateTime('2010-11-07 01:00:00 EST');
$end->setTimeZone($tz);
$interval_spec = 'PT1S';
$interval = new DateInterval($interval_spec);
echo 'bs1 ' . $end->format($date_format) . " - $interval_spec = "
. $end->sub($interval)->format($date_format) . "\n";
$end = new DateTime('2010-11-07 04:30:00');
$interval_spec = 'P1D';
$interval = new DateInterval($interval_spec);
echo 'bs2 ' . $end->format($date_format) . " - $interval_spec = "
. $end->sub($interval)->format($date_format) . "\n";
$end = new DateTime('2010-11-07 03:30:00');
$interval_spec = 'PT24H';
$interval = new DateInterval($interval_spec);
echo 'bs3 ' . $end->format($date_format) . " - $interval_spec = "
. $end->sub($interval)->format($date_format) . "\n";
$end = new DateTime('2010-11-07 02:30:00');
$interval_spec = 'PT23H';
$interval = new DateInterval($interval_spec);
echo 'bs4 ' . $end->format($date_format) . " - $interval_spec = "
. $end->sub($interval)->format($date_format) . "\n";
$end = new DateTime('2010-11-07 01:30:00 EST');
$end->setTimeZone($tz);
$interval_spec = 'PT22H';
$interval = new DateInterval($interval_spec);
echo 'bs5 ' . $end->format($date_format) . " - $interval_spec = "
. $end->sub($interval)->format($date_format) . "\n";
$end = new DateTime('2010-11-07 01:30:00 EDT');
$end->setTimeZone($tz);
$interval_spec = 'PT21H';
$interval = new DateInterval($interval_spec);
echo 'bs6 ' . $end->format($date_format) . " - $interval_spec = "
. $end->sub($interval)->format($date_format) . "\n";
$end = new DateTime('2010-11-07 01:30:00');
$interval_spec = 'P1D';
$interval = new DateInterval($interval_spec);
echo 'bs7 ' . $end->format($date_format) . " - $interval_spec = "
. $end->sub($interval)->format($date_format) . "\n";
$end = new DateTime('2010-11-07 01:30:00 EST');
$end->setTimeZone($tz);
$interval_spec = 'P1DT1H';
$interval = new DateInterval($interval_spec);
echo 'bs8 ' . $end->format($date_format) . " - $interval_spec = "
. $end->sub($interval)->format($date_format) . "\n";
$end = new DateTime('2010-11-07 03:30:00');
$interval_spec = 'P1D';
$interval = new DateInterval($interval_spec);
echo 'bs9 ' . $end->format($date_format) . " - $interval_spec = "
. $end->sub($interval)->format($date_format) . "\n";
$end = new DateTime('2010-11-07 02:30:00');
$interval_spec = 'P1D';
$interval = new DateInterval($interval_spec);
echo 'bs10 ' . $end->format($date_format) . " - $interval_spec = "
. $end->sub($interval)->format($date_format) . "\n";
?>
--EXPECT--
bs1 2010-11-07 01:00:00 EST America/New_York - PT1S = 2010-11-07 01:59:59 EDT America/New_York
bs2 2010-11-07 04:30:00 EST America/New_York - P1D = 2010-11-06 04:30:00 EDT America/New_York
bs3 2010-11-07 03:30:00 EST America/New_York - PT24H = 2010-11-06 04:30:00 EDT America/New_York
bs4 2010-11-07 02:30:00 EST America/New_York - PT23H = 2010-11-06 04:30:00 EDT America/New_York
bs5 2010-11-07 01:30:00 EST America/New_York - PT22H = 2010-11-06 04:30:00 EDT America/New_York
bs6 2010-11-07 01:30:00 EDT America/New_York - PT21H = 2010-11-06 04:30:00 EDT America/New_York
bs7 2010-11-07 01:30:00 EDT America/New_York - P1D = 2010-11-06 01:30:00 EDT America/New_York
bs8 2010-11-07 01:30:00 EST America/New_York - P1DT1H = 2010-11-06 00:30:00 EDT America/New_York
bs9 2010-11-07 03:30:00 EST America/New_York - P1D = 2010-11-06 03:30:00 EDT America/New_York
bs10 2010-11-07 02:30:00 EST America/New_York - P1D = 2010-11-06 02:30:00 EDT America/New_York
@@ -0,0 +1,58 @@
--TEST--
RFC: DateTime and Daylight Saving Time Transitions (zone type 3, fa)
--CREDITS--
Daniel Convissor <danielc@php.net>
--FILE--
<?php
date_default_timezone_set('America/New_York');
$date_format = 'Y-m-d H:i:s T e';
$interval_format = 'P%dDT%hH';
/*
* Forward Transitions, add().
*/
$start = new DateTime('2010-03-14 01:59:59');
$interval_spec = 'PT1S';
$interval = new DateInterval($interval_spec);
echo 'fa1 ' . $start->format($date_format) . " + $interval_spec = "
. $start->add($interval)->format($date_format) . "\n";
$start = new DateTime('2010-03-13 04:30:00');
$interval_spec = 'P1D';
$interval = new DateInterval($interval_spec);
echo 'fa2 ' . $start->format($date_format) . " + $interval_spec = "
. $start->add($interval)->format($date_format) . "\n";
$start = new DateTime('2010-03-13 04:30:00');
$interval_spec = 'PT22H';
$interval = new DateInterval($interval_spec);
echo 'fa3 ' . $start->format($date_format) . " + $interval_spec = "
. $start->add($interval)->format($date_format) . "\n";
$start = new DateTime('2010-03-13 04:30:00');
$interval_spec = 'PT21H';
$interval = new DateInterval($interval_spec);
echo 'fa4 ' . $start->format($date_format) . " + $interval_spec = "
. $start->add($interval)->format($date_format) . "\n";
$start = new DateTime('2010-03-13 01:30:00');
$interval_spec = 'P1D';
$interval = new DateInterval($interval_spec);
echo 'fa5 ' . $start->format($date_format) . " + $interval_spec = "
. $start->add($interval)->format($date_format) . "\n";
$start = new DateTime('2010-03-13 02:30:00');
$interval_spec = 'P1D';
$interval = new DateInterval($interval_spec);
echo 'fa6 ' . $start->format($date_format) . " + $interval_spec = "
. $start->add($interval)->format($date_format) . "\n";
?>
--EXPECT--
fa1 2010-03-14 01:59:59 EST America/New_York + PT1S = 2010-03-14 03:00:00 EDT America/New_York
fa2 2010-03-13 04:30:00 EST America/New_York + P1D = 2010-03-14 04:30:00 EDT America/New_York
fa3 2010-03-13 04:30:00 EST America/New_York + PT22H = 2010-03-14 03:30:00 EDT America/New_York
fa4 2010-03-13 04:30:00 EST America/New_York + PT21H = 2010-03-14 01:30:00 EST America/New_York
fa5 2010-03-13 01:30:00 EST America/New_York + P1D = 2010-03-14 01:30:00 EST America/New_York
fa6 2010-03-13 02:30:00 EST America/New_York + P1D = 2010-03-14 03:30:00 EDT America/New_York
@@ -0,0 +1,58 @@
--TEST--
RFC: DateTime and Daylight Saving Time Transitions (zone type 3, fd)
--CREDITS--
Daniel Convissor <danielc@php.net>
--FILE--
<?php
date_default_timezone_set('America/New_York');
$date_format = 'Y-m-d H:i:s T e';
$interval_format = 'P%dDT%hH';
/*
* Forward Transitions, diff().
*/
$end = new DateTime('2010-03-14 03:00:00');
$start = new DateTime('2010-03-14 01:59:59');
echo 'fd1 ' . $end->format($date_format) . ' - ' . $start->format($date_format)
. ' = ' . $start->diff($end)->format('PT%hH%iM%sS') . "\n";
$end = new DateTime('2010-03-14 04:30:00');
$start = new DateTime('2010-03-13 04:30:00');
echo 'fd2 ' . $end->format($date_format) . ' - ' . $start->format($date_format)
. ' = ' . $start->diff($end)->format($interval_format) . "\n";
$end = new DateTime('2010-03-14 03:30:00');
$start = new DateTime('2010-03-13 04:30:00');
echo 'fd3 ' . $end->format($date_format) . ' - ' . $start->format($date_format)
. ' = ' . $start->diff($end)->format($interval_format) . "\n";
$end = new DateTime('2010-03-14 01:30:00');
$start = new DateTime('2010-03-13 04:30:00');
echo 'fd4 ' . $end->format($date_format) . ' - ' . $start->format($date_format)
. ' = ' . $start->diff($end)->format($interval_format) . "\n";
$end = new DateTime('2010-03-14 01:30:00');
$start = new DateTime('2010-03-13 01:30:00');
echo 'fd5 ' . $end->format($date_format) . ' - ' . $start->format($date_format)
. ' = ' . $start->diff($end)->format($interval_format) . "\n";
$end = new DateTime('2010-03-14 03:30:00');
$start = new DateTime('2010-03-13 03:30:00');
echo 'fd6 ' . $end->format($date_format) . ' - ' . $start->format($date_format)
. ' = ' . $start->diff($end)->format($interval_format) . "\n";
$end = new DateTime('2010-03-14 03:30:00');
$start = new DateTime('2010-03-13 02:30:00');
echo 'fd7 ' . $end->format($date_format) . ' - ' . $start->format($date_format)
. ' = ' . $start->diff($end)->format($interval_format) . "\n";
?>
--EXPECT--
fd1 2010-03-14 03:00:00 EDT America/New_York - 2010-03-14 01:59:59 EST America/New_York = PT0H0M1S
fd2 2010-03-14 04:30:00 EDT America/New_York - 2010-03-13 04:30:00 EST America/New_York = P1DT0H
fd3 2010-03-14 03:30:00 EDT America/New_York - 2010-03-13 04:30:00 EST America/New_York = P0DT22H
fd4 2010-03-14 01:30:00 EST America/New_York - 2010-03-13 04:30:00 EST America/New_York = P0DT21H
fd5 2010-03-14 01:30:00 EST America/New_York - 2010-03-13 01:30:00 EST America/New_York = P1DT0H
fd6 2010-03-14 03:30:00 EDT America/New_York - 2010-03-13 03:30:00 EST America/New_York = P1DT0H
fd7 2010-03-14 03:30:00 EDT America/New_York - 2010-03-13 02:30:00 EST America/New_York = P1DT1H
@@ -0,0 +1,67 @@
--TEST--
RFC: DateTime and Daylight Saving Time Transitions (zone type 3, fs)
--CREDITS--
Daniel Convissor <danielc@php.net>
--XFAIL--
Still not quite right
--FILE--
<?php
date_default_timezone_set('America/New_York');
$date_format = 'Y-m-d H:i:s T e';
$interval_format = 'P%dDT%hH';
/*
* Forward Transitions, sub().
*/
$end = new DateTime('2010-03-14 03:00:00');
$interval_spec = 'PT1S';
$interval = new DateInterval($interval_spec);
echo 'fs1 ' . $end->format($date_format) . " - $interval_spec = "
. $end->sub($interval)->format($date_format) . "\n";
$end = new DateTime('2010-03-14 04:30:00');
$interval_spec = 'P1D';
$interval = new DateInterval($interval_spec);
echo 'fs2 ' . $end->format($date_format) . " - $interval_spec = "
. $end->sub($interval)->format($date_format) . "\n";
$end = new DateTime('2010-03-14 03:30:00');
$interval_spec = 'PT22H';
$interval = new DateInterval($interval_spec);
echo 'fs3 ' . $end->format($date_format) . " - $interval_spec = "
. $end->sub($interval)->format($date_format) . "\n";
$end = new DateTime('2010-03-14 01:30:00');
$interval_spec = 'PT21H';
$interval = new DateInterval($interval_spec);
echo 'fs4 ' . $end->format($date_format) . " - $interval_spec = "
. $end->sub($interval)->format($date_format) . "\n";
$end = new DateTime('2010-03-14 01:30:00');
$interval_spec = 'P1D';
$interval = new DateInterval($interval_spec);
echo 'fs5 ' . $end->format($date_format) . " - $interval_spec = "
. $end->sub($interval)->format($date_format) . "\n";
$end = new DateTime('2010-03-15 03:30:00');
$interval_spec = 'P1D';
$interval = new DateInterval($interval_spec);
echo 'fs6 ' . $end->format($date_format) . " - $interval_spec = "
. $end->sub($interval)->format($date_format) . "\n";
$end = new DateTime('2010-03-15 02:30:00');
$interval_spec = 'P1D';
$interval = new DateInterval($interval_spec);
echo 'fs7 ' . $end->format($date_format) . " - $interval_spec = "
. $end->sub($interval)->format($date_format) . "\n";
?>
--EXPECT--
fs1 2010-03-14 03:00:00 EDT America/New_York - PT1S = 2010-03-14 01:59:59 EST America/New_York
fs2 2010-03-14 04:30:00 EDT America/New_York - P1D = 2010-03-13 04:30:00 EST America/New_York
fs3 2010-03-14 03:30:00 EDT America/New_York - PT22H = 2010-03-13 04:30:00 EST America/New_York
fs4 2010-03-14 01:30:00 EST America/New_York - PT21H = 2010-03-13 04:30:00 EST America/New_York
fs5 2010-03-14 01:30:00 EST America/New_York - P1D = 2010-03-13 01:30:00 EST America/New_York
fs6 2010-03-15 03:30:00 EDT America/New_York - P1D = 2010-03-14 03:30:00 EDT America/New_York
fs7 2010-03-15 02:30:00 EDT America/New_York - P1D = 2010-03-14 03:30:00 EDT America/New_York
@@ -1,399 +0,0 @@
--TEST--
RFC: DateTime and Daylight Saving Time Transitions (zone type 3)
--CREDITS--
Daniel Convissor <danielc@php.net>
--XFAIL--
RFC not implemented yet
--FILE--
<?php
date_default_timezone_set('America/New_York');
$date_format = 'Y-m-d H:i:s T e';
$interval_format = 'P%dDT%hH';
/*
* Forward Transitions, diff().
*/
$end = new DateTime('2010-03-14 03:00:00');
$start = new DateTime('2010-03-14 01:59:59');
echo 'fd1 ' . $end->format($date_format) . ' - ' . $start->format($date_format)
. ' = ' . $start->diff($end)->format('PT%hH%iM%sS') . "\n";
$end = new DateTime('2010-03-14 04:30:00');
$start = new DateTime('2010-03-13 04:30:00');
echo 'fd2 ' . $end->format($date_format) . ' - ' . $start->format($date_format)
. ' = ' . $start->diff($end)->format($interval_format) . "\n";
$end = new DateTime('2010-03-14 03:30:00');
$start = new DateTime('2010-03-13 04:30:00');
echo 'fd3 ' . $end->format($date_format) . ' - ' . $start->format($date_format)
. ' = ' . $start->diff($end)->format($interval_format) . "\n";
$end = new DateTime('2010-03-14 01:30:00');
$start = new DateTime('2010-03-13 04:30:00');
echo 'fd4 ' . $end->format($date_format) . ' - ' . $start->format($date_format)
. ' = ' . $start->diff($end)->format($interval_format) . "\n";
$end = new DateTime('2010-03-14 01:30:00');
$start = new DateTime('2010-03-13 01:30:00');
echo 'fd5 ' . $end->format($date_format) . ' - ' . $start->format($date_format)
. ' = ' . $start->diff($end)->format($interval_format) . "\n";
$end = new DateTime('2010-03-14 03:30:00');
$start = new DateTime('2010-03-13 03:30:00');
echo 'fd6 ' . $end->format($date_format) . ' - ' . $start->format($date_format)
. ' = ' . $start->diff($end)->format($interval_format) . "\n";
$end = new DateTime('2010-03-14 03:30:00');
$start = new DateTime('2010-03-13 02:30:00');
echo 'fd7 ' . $end->format($date_format) . ' - ' . $start->format($date_format)
. ' = ' . $start->diff($end)->format($interval_format) . "\n";
echo "\n";
/*
* Forward Transitions, add().
*/
$start = new DateTime('2010-03-14 01:59:59');
$interval_spec = 'PT1S';
$interval = new DateInterval($interval_spec);
echo 'fa1 ' . $start->format($date_format) . " + $interval_spec = "
. $start->add($interval)->format($date_format) . "\n";
$start = new DateTime('2010-03-13 04:30:00');
$interval_spec = 'P1D';
$interval = new DateInterval($interval_spec);
echo 'fa2 ' . $start->format($date_format) . " + $interval_spec = "
. $start->add($interval)->format($date_format) . "\n";
$start = new DateTime('2010-03-13 04:30:00');
$interval_spec = 'PT22H';
$interval = new DateInterval($interval_spec);
echo 'fa3 ' . $start->format($date_format) . " + $interval_spec = "
. $start->add($interval)->format($date_format) . "\n";
$start = new DateTime('2010-03-13 04:30:00');
$interval_spec = 'PT21H';
$interval = new DateInterval($interval_spec);
echo 'fa4 ' . $start->format($date_format) . " + $interval_spec = "
. $start->add($interval)->format($date_format) . "\n";
$start = new DateTime('2010-03-13 01:30:00');
$interval_spec = 'P1D';
$interval = new DateInterval($interval_spec);
echo 'fa5 ' . $start->format($date_format) . " + $interval_spec = "
. $start->add($interval)->format($date_format) . "\n";
$start = new DateTime('2010-03-13 02:30:00');
$interval_spec = 'P1D';
$interval = new DateInterval($interval_spec);
echo 'fa6 ' . $start->format($date_format) . " + $interval_spec = "
. $start->add($interval)->format($date_format) . "\n";
echo "\n";
/*
* Forward Transitions, sub().
*/
$end = new DateTime('2010-03-14 03:00:00');
$interval_spec = 'PT1S';
$interval = new DateInterval($interval_spec);
echo 'fs1 ' . $end->format($date_format) . " - $interval_spec = "
. $end->sub($interval)->format($date_format) . "\n";
$end = new DateTime('2010-03-14 04:30:00');
$interval_spec = 'P1D';
$interval = new DateInterval($interval_spec);
echo 'fs2 ' . $end->format($date_format) . " - $interval_spec = "
. $end->sub($interval)->format($date_format) . "\n";
$end = new DateTime('2010-03-14 03:30:00');
$interval_spec = 'PT22H';
$interval = new DateInterval($interval_spec);
echo 'fs3 ' . $end->format($date_format) . " - $interval_spec = "
. $end->sub($interval)->format($date_format) . "\n";
$end = new DateTime('2010-03-14 01:30:00');
$interval_spec = 'PT21H';
$interval = new DateInterval($interval_spec);
echo 'fs4 ' . $end->format($date_format) . " - $interval_spec = "
. $end->sub($interval)->format($date_format) . "\n";
$end = new DateTime('2010-03-14 01:30:00');
$interval_spec = 'P1D';
$interval = new DateInterval($interval_spec);
echo 'fs5 ' . $end->format($date_format) . " - $interval_spec = "
. $end->sub($interval)->format($date_format) . "\n";
$end = new DateTime('2010-03-15 03:30:00');
$interval_spec = 'P1D';
$interval = new DateInterval($interval_spec);
echo 'fs6 ' . $end->format($date_format) . " - $interval_spec = "
. $end->sub($interval)->format($date_format) . "\n";
$end = new DateTime('2010-03-15 02:30:00');
$interval_spec = 'P1D';
$interval = new DateInterval($interval_spec);
echo 'fs7 ' . $end->format($date_format) . " - $interval_spec = "
. $end->sub($interval)->format($date_format) . "\n";
echo "\n";
/*
* For backward transitions, must create objects with zone type 2
* where specifying Daylight or Standard time is required
* then converting them to zone type 3.
*/
$tz = new DateTimeZone('America/New_York');
/*
* Backward Transitions, diff().
*/
$end = new DateTime('2010-11-07 01:00:00 EST');
$end->setTimeZone($tz);
$start = new DateTime('2010-11-07 01:59:59');
echo 'bd1 ' . $end->format($date_format) . ' - ' . $start->format($date_format)
. ' = ' . $start->diff($end)->format('PT%hH%iM%sS') . "\n";
$end = new DateTime('2010-11-07 04:30:00');
$start = new DateTime('2010-11-06 04:30:00');
echo 'bd2 ' . $end->format($date_format) . ' - ' . $start->format($date_format)
. ' = ' . $start->diff($end)->format($interval_format) . "\n";
$end = new DateTime('2010-11-07 03:30:00');
$start = new DateTime('2010-11-06 04:30:00');
echo 'bd3 ' . $end->format($date_format) . ' - ' . $start->format($date_format)
. ' = ' . $start->diff($end)->format($interval_format) . "\n";
$end = new DateTime('2010-11-07 02:30:00');
$start = new DateTime('2010-11-06 04:30:00');
echo 'bd4 ' . $end->format($date_format) . ' - ' . $start->format($date_format)
. ' = ' . $start->diff($end)->format($interval_format) . "\n";
$end = new DateTime('2010-11-07 01:30:00 EST');
$end->setTimeZone($tz);
$start = new DateTime('2010-11-06 04:30:00');
echo 'bd5 ' . $end->format($date_format) . ' - ' . $start->format($date_format)
. ' = ' . $start->diff($end)->format($interval_format) . "\n";
$end = new DateTime('2010-11-07 01:30:00 EDT');
$end->setTimeZone($tz);
$start = new DateTime('2010-11-06 04:30:00');
echo 'bd6 ' . $end->format($date_format) . ' - ' . $start->format($date_format)
. ' = ' . $start->diff($end)->format($interval_format) . "\n";
$end = new DateTime('2010-11-07 01:30:00');
$start = new DateTime('2010-11-06 01:30:00');
echo 'bd7 ' . $end->format($date_format) . ' - ' . $start->format($date_format)
. ' = ' . $start->diff($end)->format($interval_format) . "\n";
$end = new DateTime('2010-11-07 01:30:00 EST');
$end->setTimeZone($tz);
$start = new DateTime('2010-11-06 01:30:00');
echo 'bd8 ' . $end->format($date_format) . ' - ' . $start->format($date_format)
. ' = ' . $start->diff($end)->format($interval_format) . "\n";
echo "\n";
/*
* Backward Transitions, add().
*/
$start = new DateTime('2010-11-07 01:59:59');
$interval_spec = 'PT1S';
$interval = new DateInterval($interval_spec);
echo 'ba1 ' . $start->format($date_format) . " + $interval_spec = "
. $start->add($interval)->format($date_format) . "\n";
$start = new DateTime('2010-11-06 04:30:00');
$interval_spec = 'P1D';
$interval = new DateInterval($interval_spec);
echo 'ba2 ' . $start->format($date_format) . " + $interval_spec = "
. $start->add($interval)->format($date_format) . "\n";
$start = new DateTime('2010-11-06 04:30:00');
$interval_spec = 'PT24H';
$interval = new DateInterval($interval_spec);
echo 'ba3 ' . $start->format($date_format) . " + $interval_spec = "
. $start->add($interval)->format($date_format) . "\n";
$start = new DateTime('2010-11-06 04:30:00');
$interval_spec = 'PT23H';
$interval = new DateInterval($interval_spec);
echo 'ba4 ' . $start->format($date_format) . " + $interval_spec = "
. $start->add($interval)->format($date_format) . "\n";
$start = new DateTime('2010-11-06 04:30:00');
$interval_spec = 'PT22H';
$interval = new DateInterval($interval_spec);
echo 'ba5 ' . $start->format($date_format) . " + $interval_spec = "
. $start->add($interval)->format($date_format) . "\n";
$start = new DateTime('2010-11-06 04:30:00');
$interval_spec = 'PT21H';
$interval = new DateInterval($interval_spec);
echo 'ba6 ' . $start->format($date_format) . " + $interval_spec = "
. $start->add($interval)->format($date_format) . "\n";
$start = new DateTime('2010-11-06 01:30:00');
$interval_spec = 'P1D';
$interval = new DateInterval($interval_spec);
echo 'ba7 ' . $start->format($date_format) . " + $interval_spec = "
. $start->add($interval)->format($date_format) . "\n";
$start = new DateTime('2010-11-06 01:30:00');
$interval_spec = 'P1DT1H';
$interval = new DateInterval($interval_spec);
echo 'ba8 ' . $start->format($date_format) . " + $interval_spec = "
. $start->add($interval)->format($date_format) . "\n";
$start = new DateTime('2010-11-06 04:30:00');
$interval_spec = 'PT25H';
$interval = new DateInterval($interval_spec);
echo 'ba9 ' . $start->format($date_format) . " + $interval_spec = "
. $start->add($interval)->format($date_format) . "\n";
$start = new DateTime('2010-11-06 03:30:00');
$interval_spec = 'P1D';
$interval = new DateInterval($interval_spec);
echo 'ba10 ' . $start->format($date_format) . " + $interval_spec = "
. $start->add($interval)->format($date_format) . "\n";
$start = new DateTime('2010-11-06 02:30:00');
$interval_spec = 'P1D';
$interval = new DateInterval($interval_spec);
echo 'ba11 ' . $start->format($date_format) . " + $interval_spec = "
. $start->add($interval)->format($date_format) . "\n";
echo "\n";
/*
* Backward Transitions, sub().
*/
$end = new DateTime('2010-11-07 01:00:00 EST');
$end->setTimeZone($tz);
$interval_spec = 'PT1S';
$interval = new DateInterval($interval_spec);
echo 'bs1 ' . $end->format($date_format) . " - $interval_spec = "
. $end->sub($interval)->format($date_format) . "\n";
$end = new DateTime('2010-11-07 04:30:00');
$interval_spec = 'P1D';
$interval = new DateInterval($interval_spec);
echo 'bs2 ' . $end->format($date_format) . " - $interval_spec = "
. $end->sub($interval)->format($date_format) . "\n";
$end = new DateTime('2010-11-07 03:30:00');
$interval_spec = 'PT24H';
$interval = new DateInterval($interval_spec);
echo 'bs3 ' . $end->format($date_format) . " - $interval_spec = "
. $end->sub($interval)->format($date_format) . "\n";
$end = new DateTime('2010-11-07 02:30:00');
$interval_spec = 'PT23H';
$interval = new DateInterval($interval_spec);
echo 'bs4 ' . $end->format($date_format) . " - $interval_spec = "
. $end->sub($interval)->format($date_format) . "\n";
$end = new DateTime('2010-11-07 01:30:00 EST');
$end->setTimeZone($tz);
$interval_spec = 'PT22H';
$interval = new DateInterval($interval_spec);
echo 'bs5 ' . $end->format($date_format) . " - $interval_spec = "
. $end->sub($interval)->format($date_format) . "\n";
$end = new DateTime('2010-11-07 01:30:00 EDT');
$end->setTimeZone($tz);
$interval_spec = 'PT21H';
$interval = new DateInterval($interval_spec);
echo 'bs6 ' . $end->format($date_format) . " - $interval_spec = "
. $end->sub($interval)->format($date_format) . "\n";
$end = new DateTime('2010-11-07 01:30:00');
$interval_spec = 'P1D';
$interval = new DateInterval($interval_spec);
echo 'bs7 ' . $end->format($date_format) . " - $interval_spec = "
. $end->sub($interval)->format($date_format) . "\n";
$end = new DateTime('2010-11-07 01:30:00 EST');
$end->setTimeZone($tz);
$interval_spec = 'P1DT1H';
$interval = new DateInterval($interval_spec);
echo 'bs8 ' . $end->format($date_format) . " - $interval_spec = "
. $end->sub($interval)->format($date_format) . "\n";
$end = new DateTime('2010-11-07 03:30:00');
$interval_spec = 'P1D';
$interval = new DateInterval($interval_spec);
echo 'bs9 ' . $end->format($date_format) . " - $interval_spec = "
. $end->sub($interval)->format($date_format) . "\n";
$end = new DateTime('2010-11-07 02:30:00');
$interval_spec = 'P1D';
$interval = new DateInterval($interval_spec);
echo 'bs10 ' . $end->format($date_format) . " - $interval_spec = "
. $end->sub($interval)->format($date_format) . "\n";
?>
--EXPECT--
fd1 2010-03-14 03:00:00 EDT America/New_York - 2010-03-14 01:59:59 EST America/New_York = PT0H0M1S
fd2 2010-03-14 04:30:00 EDT America/New_York - 2010-03-13 04:30:00 EST America/New_York = P1DT0H
fd3 2010-03-14 03:30:00 EDT America/New_York - 2010-03-13 04:30:00 EST America/New_York = P0DT22H
fd4 2010-03-14 01:30:00 EST America/New_York - 2010-03-13 04:30:00 EST America/New_York = P0DT21H
fd5 2010-03-14 01:30:00 EST America/New_York - 2010-03-13 01:30:00 EST America/New_York = P1DT0H
fd6 2010-03-14 03:30:00 EDT America/New_York - 2010-03-13 03:30:00 EST America/New_York = P1DT0H
fd7 2010-03-14 03:30:00 EDT America/New_York - 2010-03-13 02:30:00 EST America/New_York = P1DT1H
fa1 2010-03-14 01:59:59 EST America/New_York + PT1S = 2010-03-14 03:00:00 EDT America/New_York
fa2 2010-03-13 04:30:00 EST America/New_York + P1D = 2010-03-14 04:30:00 EDT America/New_York
fa3 2010-03-13 04:30:00 EST America/New_York + PT22H = 2010-03-14 03:30:00 EDT America/New_York
fa4 2010-03-13 04:30:00 EST America/New_York + PT21H = 2010-03-14 01:30:00 EST America/New_York
fa5 2010-03-13 01:30:00 EST America/New_York + P1D = 2010-03-14 01:30:00 EST America/New_York
fa6 2010-03-13 02:30:00 EST America/New_York + P1D = 2010-03-14 03:30:00 EDT America/New_York
fs1 2010-03-14 03:00:00 EDT America/New_York - PT1S = 2010-03-14 01:59:59 EST America/New_York
fs2 2010-03-14 04:30:00 EDT America/New_York - P1D = 2010-03-13 04:30:00 EST America/New_York
fs3 2010-03-14 03:30:00 EDT America/New_York - PT22H = 2010-03-13 04:30:00 EST America/New_York
fs4 2010-03-14 01:30:00 EST America/New_York - PT21H = 2010-03-13 04:30:00 EST America/New_York
fs5 2010-03-14 01:30:00 EST America/New_York - P1D = 2010-03-13 01:30:00 EST America/New_York
fs6 2010-03-15 03:30:00 EDT America/New_York - P1D = 2010-03-14 03:30:00 EDT America/New_York
fs7 2010-03-15 03:30:00 EDT America/New_York - P1D = 2010-03-14 03:30:00 EDT America/New_York
bd1 2010-11-07 01:00:00 EST America/New_York - 2010-11-07 01:59:59 EDT America/New_York = PT0H0M1S
bd2 2010-11-07 04:30:00 EST America/New_York - 2010-11-06 04:30:00 EDT America/New_York = P1DT0H
bd3 2010-11-07 03:30:00 EST America/New_York - 2010-11-06 04:30:00 EDT America/New_York = P0DT24H
bd4 2010-11-07 02:30:00 EST America/New_York - 2010-11-06 04:30:00 EDT America/New_York = P0DT23H
bd5 2010-11-07 01:30:00 EST America/New_York - 2010-11-06 04:30:00 EDT America/New_York = P0DT22H
bd6 2010-11-07 01:30:00 EDT America/New_York - 2010-11-06 04:30:00 EDT America/New_York = P0DT21H
bd7 2010-11-07 01:30:00 EDT America/New_York - 2010-11-06 01:30:00 EDT America/New_York = P1DT0H
bd8 2010-11-07 01:30:00 EST America/New_York - 2010-11-06 01:30:00 EDT America/New_York = P1DT1H
ba1 2010-11-07 01:59:59 EDT America/New_York + PT1S = 2010-11-07 01:00:00 EST America/New_York
ba2 2010-11-06 04:30:00 EDT America/New_York + P1D = 2010-11-07 04:30:00 EST America/New_York
ba3 2010-11-06 04:30:00 EDT America/New_York + PT24H = 2010-11-07 03:30:00 EST America/New_York
ba4 2010-11-06 04:30:00 EDT America/New_York + PT23H = 2010-11-07 02:30:00 EST America/New_York
ba5 2010-11-06 04:30:00 EDT America/New_York + PT22H = 2010-11-07 01:30:00 EST America/New_York
ba6 2010-11-06 04:30:00 EDT America/New_York + PT21H = 2010-11-07 01:30:00 EDT America/New_York
ba7 2010-11-06 01:30:00 EDT America/New_York + P1D = 2010-11-07 01:30:00 EDT America/New_York
ba8 2010-11-06 01:30:00 EDT America/New_York + P1DT1H = 2010-11-07 01:30:00 EST America/New_York
ba9 2010-11-06 04:30:00 EDT America/New_York + PT25H = 2010-11-07 04:30:00 EST America/New_York
ba10 2010-11-06 03:30:00 EDT America/New_York + P1D = 2010-11-07 03:30:00 EST America/New_York
ba11 2010-11-06 02:30:00 EDT America/New_York + P1D = 2010-11-07 02:30:00 EST America/New_York
bs1 2010-11-07 01:00:00 EST America/New_York - PT1S = 2010-11-07 01:59:59 EDT America/New_York
bs2 2010-11-07 04:30:00 EST America/New_York - P1D = 2010-11-06 04:30:00 EDT America/New_York
bs3 2010-11-07 03:30:00 EST America/New_York - PT24H = 2010-11-06 04:30:00 EDT America/New_York
bs4 2010-11-07 02:30:00 EST America/New_York - PT23H = 2010-11-06 04:30:00 EDT America/New_York
bs5 2010-11-07 01:30:00 EST America/New_York - PT22H = 2010-11-06 04:30:00 EDT America/New_York
bs6 2010-11-07 01:30:00 EDT America/New_York - PT21H = 2010-11-06 04:30:00 EDT America/New_York
bs7 2010-11-07 01:30:00 EDT America/New_York - P1D = 2010-11-06 01:30:00 EDT America/New_York
bs8 2010-11-07 01:30:00 EST America/New_York - P1DT1H = 2010-11-06 00:30:00 EDT America/New_York
bs9 2010-11-07 03:30:00 EST America/New_York - P1D = 2010-11-06 03:30:00 EDT America/New_York
bs10 2010-11-07 02:30:00 EST America/New_York - P1D = 2010-11-06 02:30:00 EDT America/New_York
+1 -1
View File
@@ -53,7 +53,7 @@ bool(false)
string(31) "Fri, 16 Jun 2006 23:49:12 +0100"
bool(false)
string(31) "Fri, 16 Jun 2006 02:22:00 +0100"
string(31) "Mon, 16 Jun 0222 02:22:00 -0036"
string(31) "Sun, 16 Jun 0222 02:22:00 -0036"
string(31) "Fri, 16 Jun 2006 02:22:33 +0100"
bool(false)
string(31) "Tue, 02 Mar 2004 00:00:00 +0000"
+2 -2
View File
@@ -32,8 +32,8 @@ object(DateTime)#2 (3) {
string(6) "+02:00"
}
string(16) "l, d-M-y H:i:s T"
string(36) "Tuesday, 08-Jul-08 22:14:12 GMT+0200"
string(16) "l, d-M-Y H:i:s T"
string(38) "Tuesday, 08-Jul-2008 22:14:12 GMT+0200"
object(DateTime)#1 (3) {
["date"]=>
string(19) "2008-07-08 22:14:12"
+25 -9
View File
@@ -226,12 +226,17 @@ static size_t php_dba_make_key(zval *key, char **key_str, char **key_free TSRMLS
*key_free = *key_str;
return len;
} else {
*key_free = NULL;
zval tmp = *key;
int len;
convert_to_string(key);
*key_str = Z_STRVAL_P(key);
zval_copy_ctor(&tmp);
convert_to_string(&tmp);
return Z_STRLEN_P(key);
*key_free = *key_str = estrndup(Z_STRVAL(tmp), Z_STRLEN(tmp));
len = Z_STRLEN(tmp);
zval_dtor(&tmp);
return len;
}
}
/* }}} */
@@ -297,6 +302,14 @@ static size_t php_dba_make_key(zval *key, char **key_str, char **key_free TSRMLS
RETURN_FALSE; \
}
/* the same check, but with a call to DBA_ID_DONE before returning */
#define DBA_WRITE_CHECK_WITH_ID \
if(info->mode != DBA_WRITER && info->mode != DBA_TRUNC && info->mode != DBA_CREAT) { \
php_error_docref(NULL TSRMLS_CC, E_WARNING, "You cannot perform a modification to a database without proper access"); \
DBA_ID_DONE; \
RETURN_FALSE; \
}
/* }}} */
/* {{{ globals */
@@ -557,7 +570,7 @@ static void php_dba_update(INTERNAL_FUNCTION_PARAMETERS, int mode)
DBA_FETCH_RESOURCE(info, &id);
DBA_WRITE_CHECK;
DBA_WRITE_CHECK_WITH_ID;
if (info->hnd->update(info, key_str, key_len, val, val_len, mode TSRMLS_CC) == SUCCESS) {
DBA_ID_DONE;
@@ -612,7 +625,8 @@ static void php_dba_open(INTERNAL_FUNCTION_PARAMETERS, int persistent)
char *file_mode;
char mode[4], *pmode, *lock_file_mode = NULL;
int persistent_flag = persistent ? STREAM_OPEN_PERSISTENT : 0;
char *opened_path, *lock_name;
char *opened_path = NULL;
char *lock_name;
if(ac < 2) {
WRONG_PARAM_COUNT;
@@ -835,8 +849,10 @@ static void php_dba_open(INTERNAL_FUNCTION_PARAMETERS, int persistent)
if (!persistent) {
info->lock.name = opened_path;
} else {
info->lock.name = pestrdup(opened_path, persistent);
efree(opened_path);
if (opened_path) {
info->lock.name = pestrdup(opened_path, persistent);
efree(opened_path);
}
}
}
}
@@ -1110,7 +1126,7 @@ PHP_FUNCTION(dba_delete)
{
DBA_ID_GET2;
DBA_WRITE_CHECK;
DBA_WRITE_CHECK_WITH_ID;
if(info->hnd->delete(info, key_str, key_len TSRMLS_CC) == SUCCESS)
{
+38
View File
@@ -0,0 +1,38 @@
--TEST--
Bug #65708 (dba functions cast $key param to string in-place, bypassing copy on write)
--SKIPIF--
<?php
require_once(dirname(__FILE__) .'/skipif.inc');
?>
--FILE--
<?php
error_reporting(E_ALL);
require_once(dirname(__FILE__) .'/test.inc');
$db = dba_popen($db_filename, 'c');
$key = 1;
$copy = $key;
echo gettype($key)."\n";
echo gettype($copy)."\n";
dba_exists($key, $db);
echo gettype($key)."\n";
echo gettype($copy)."\n";
dba_close($db);
?>
--CLEAN--
<?php
require(dirname(__FILE__) .'/clean.inc');
?>
--EXPECT--
integer
integer
integer
integer
+17 -2
View File
@@ -2304,7 +2304,7 @@ PHP_FUNCTION(dom_document_save_html)
xmlBufferPtr buf;
dom_object *intern, *nodeobj;
xmlChar *mem = NULL;
int size, format;
int size = 0, format;
dom_doc_propsptr doc_props;
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
@@ -2332,7 +2332,22 @@ PHP_FUNCTION(dom_document_save_html)
RETURN_FALSE;
}
size = htmlNodeDump(buf, docp, node);
if (node->type == XML_DOCUMENT_FRAG_NODE) {
int one_size;
for (node = node->children; node; node = node->next) {
one_size = htmlNodeDump(buf, docp, node);
if (one_size >= 0) {
size += one_size;
} else {
size = -1;
break;
}
}
} else {
size = htmlNodeDump(buf, docp, node);
}
if (size >= 0) {
mem = (xmlChar*) xmlBufferContent(buf);
if (!mem) {
+4
View File
@@ -1089,7 +1089,11 @@ void dom_xpath_objects_free_storage(void *object TSRMLS_DC)
void dom_objects_free_storage(void *object TSRMLS_DC)
{
dom_object *intern = (dom_object *)object;
#if defined(__GNUC__) && __GNUC__ >= 3
int retcount __attribute__((unused)); /* keep compiler quiet */
#else
int retcount;
#endif
zend_object_std_dtor(&intern->std TSRMLS_CC);
Loaded 100 of 508 files, more files were not shown because too many files have changed in this diff. Show more