Compare commits

...
510 Commits
Author SHA1 Message Date
Johannes Schlüter 7d14f70776 PHP 5.3.4 2010-12-08 21:41:22 +00:00
Johannes Schlüter 3d76289c59 PHP 5.3.4 2010-12-08 21:38:51 +00:00
Eyal Teutsch eabb9be2ac curl_setopt() arg: using DIRECTORY_SEPARATOR rather then "/" to make windows tests pass too 2010-12-08 14:16:17 +00:00
Pierre Joye f9207e3187 - new warning in imagepstext 2010-12-08 09:38:47 +00:00
Pierre Joye a0eb5848b5 - Fix #53492, fix crash if aa steps are invalid 2010-12-08 08:45:56 +00:00
Pierre Joye cba0322c81 - not anymore in core or builtin 2010-12-07 23:53:51 +00:00
Andrey Hristov fc6e70d8e4 switch this off for the release 2010-12-07 11:13:55 +00:00
Pierre Joye 1504071cb1 - add CVE 2010-12-07 01:22:23 +00:00
Andrey Hristov 5efdfee8c6 Skip additional result sets sent by MySQL 5.5 servers
which break the Protocol API 
(see http://bugs.mysql.com/bug.php?id=58700)
2010-12-06 13:59:14 +00:00
Andrey Hristov 03fd10c479 don't crash if the API is used incorrectly 2010-12-06 13:50:51 +00:00
Felipe Pena 75eeee8f24 - Fixed test (Eyal Teutsch) 2010-12-04 15:57:08 +00:00
Felipe Pena 0aa36e2d97 - Fixed test 2010-12-04 15:48:45 +00:00
Felipe Pena 0f53b4e515 - Fixed tests 2010-12-04 12:28:23 +00:00
Felipe Pena 76ba9b44b4 - Fixed test 2010-12-03 23:25:27 +00:00
Felipe Pena 3dc4f14c6b - Fixed test 2010-12-03 22:58:21 +00:00
Felipe Pena 3e0b63312e - Order 2010-12-03 21:09:47 +00:00
Felipe Pena 689d1d9e4b - Fixed bug #53463 (sqlite3 columnName() segfaults on bad column_number) 2010-12-03 21:05:44 +00:00
Jani Taskinen 686c7fec26 - CS + reorder to match trunk better, removed trailing dots from error messages 2010-12-03 16:04:24 +00:00
Jani Taskinen 85ef85a0b4 - Fix test 2010-12-03 16:02:47 +00:00
Jani Taskinen f561727ee0 - Add test for the ob_start($foo); leak/crash bug 2010-12-03 15:30:21 +00:00
Jani Taskinen c8e40e49d7 - Fix leaks and crash bug when passing the callback as variable 2010-12-03 13:20:13 +00:00
Pierre Joye 63d87a0adb - Fix #29085, bad default include_path on Windows 2010-12-02 23:23:14 +00:00
Felipe Pena 06c183b761 - Cosmetics 2010-12-02 23:01:04 +00:00
Pierre Joye aef55bc5f3 - some missing entries 2010-12-02 22:56:57 +00:00
Andrey Hristov 9f045cd40e fix test after newly introduced constant 2010-12-02 19:11:41 +00:00
Johannes Schlüter 094bcdff8b - Back to -dev 2010-12-02 14:34:32 +00:00
Andrey Hristov 334e62a77d and export the new constant 2010-12-02 14:21:23 +00:00
Andrey Hristov 3da811a124 new server constant as of 5.5 2010-12-02 13:59:56 +00:00
Johannes Schlüter f915973c1e - PHP 5.3.4RC2 2010-12-02 13:59:38 +00:00
Pierre Joye cd62a70863 - not TS and useless on server, also not required anymore with the supported windows versions 2010-12-02 11:37:43 +00:00
Adam Harvey 92fa280b96 Minimal fix for bug #53440 (INSTALL file refers to php.ini-dist, should refer
to php.ini-production). There are a lot more issues with the INSTALL file,
though, which I'll file another bug for.
2010-12-02 03:26:37 +00:00
Christopher Jones 24c87d760d Remove OCI8 devel status in preparation for PHP 5.3.4 release 2010-12-01 23:30:28 +00:00
Christopher Jones 2024790fd2 Add Berkeley DB 5.1 support to the DBA extension 2010-12-01 19:20:16 +00:00
Ilia Alshanetsky d506ce8d94 Fixed bug #51250 (iconv_mime_decode() does not ignore malformed Q-encoded words) 2010-12-01 14:03:36 +00:00
Andrey Hristov 4adcc3c7bc add a comment 2010-12-01 10:16:51 +00:00
Jérôme Loyet 4c76006fe3 - Fixed bug #53412 (segfault when using -y) 2010-11-30 19:37:10 +00:00
Ilia Alshanetsky 964eff5276 Missing bits from last commit 2010-11-30 16:11:27 +00:00
Ilia Alshanetsky 085e8b781c Fixed bug #52202 (CURLOPT_PRIVATE gets corrupted). 2010-11-30 13:40:02 +00:00
Pierre Joye 761c62267f Fixed crash in zip extract method (possible CWE-170) 2010-11-30 11:04:06 +00:00
Ilia Alshanetsky f719d3707d Fixed bug #52656 (DOMCdataSection does not work with splitText). 2010-11-29 14:48:53 +00:00
Ilia Alshanetsky dd92188d76 Fixed bug #52828 (curl_setopt does not accept persistent streams). 2010-11-29 14:40:59 +00:00
Adam Harvey 7111501381 Update INI files per doc bug #53420 (mail.log is poorly documented). 2010-11-29 03:44:56 +00:00
Derick Rethans e16265aa0e - Reorganize slightly as there was already a date and an intl extension
header/section.
2010-11-28 16:33:07 +00:00
Derick Rethans 688b347d84 - Fixed two more test cases. 2010-11-28 16:27:49 +00:00
Derick Rethans 8cf9513bb9 - Fixed a few test cases. 2010-11-28 13:41:06 +00:00
Ilia Alshanetsky 3239a25e53 Missing bit from previous commit 2010-11-26 21:00:03 +00:00
Ilia Alshanetsky f28cff1925 Fixed bug #52327 (base64_decode() improper handling of leading padding in strict mode) 2010-11-26 20:59:13 +00:00
Pierre Joye c70397b3a9 - Fixed #53409, sleep() return NULL on Windows 2010-11-26 18:25:13 +00:00
Jérôme Loyet f13f4bc872 - Fixed bug #52501 (libevent made FPM crashed when forking -- libevent has been removed) 2010-11-26 13:46:15 +00:00
Johannes Schlüter 222e0bc0f6 - Remove outdated, unmaintained, misleading ChangeLog files 2010-11-26 13:21:25 +00:00
Ilia Alshanetsky 523da85c11 Fixed bug #53304 (quot_print_decode does not handle lower-case hex digits) 2010-11-25 21:38:06 +00:00
Gustavo André dos Santos Lopes 05abc63d14 - Fixed bug #53403 (use of unitialized values). Fixes the fix for bug #46587.
- Added test for bug #46587.
2010-11-25 16:44:20 +00:00
Felipe Pena dbeef88661 - Ordering 2010-11-25 00:05:03 +00:00
Pierre Joye 2ba369cdfa - fixed #53352 2010-11-23 22:14:54 +00:00
Felipe Pena a9a2eb4a14 - Fixed compile warnings 2010-11-23 21:49:18 +00:00
Felipe Pena ac15afe9c1 - Fixed test 2010-11-23 21:45:22 +00:00
Ilia Alshanetsky 4f3ab10786 Fixed bug #46587 (mt_rand() does not check that max is greater than min). 2010-11-23 13:09:15 +00:00
Christopher Jones 8ed386997f Explicitly name the added constant 2010-11-22 22:18:30 +00:00
Ilia Alshanetsky a40667d756 Fixed bug #51003 (unaligned memory access in ext/hash/hash_tiger.c). 2010-11-22 13:12:28 +00:00
Ilia Alshanetsky 534395e4ae Fixed bug #51003 (unaligned memory access in ext/hash/hash_tiger.c) 2010-11-22 13:10:13 +00:00
Gustavo André dos Santos Lopes 2a545be57f - Fix tests for \0 patch in PHP 5.3.
- Fix constants_error_004.phpt (closes bug #51901)
2010-11-22 05:10:14 +00:00
Felipe Pena 167e51f36c - Fixed ZTS build 2010-11-21 17:41:33 +00:00
Felipe Pena abb7038cbf - New NEWS structure (to be improved) 2010-11-21 14:07:22 +00:00
Johannes Schlüter ac4f3422bc - Improve test 2010-11-21 12:28:10 +00:00
Johannes Schlüter 9ea04e1e46 - Fix #52854 (ReflectionClass::newInstanceArgs does not work for classes without constructors 2010-11-21 12:24:09 +00:00
Felipe Pena 1ac484d1a1 - Fixed bug #53366 (Reflection doesnt get dynamic property value from getProperty()) 2010-11-20 22:53:55 +00:00
Kalle Sommer Nielsen 78f10489ca Added second fix from #50987 that wasn't apart of Ilia's commit 2010-11-20 20:59:28 +00:00
Ilia Alshanetsky 5f1b91a6bf Fixed bug #50987 (unaligned memory access in phar.c) 2010-11-20 19:27:31 +00:00
Stanislav Malyshev 4415b3af51 Add support for DateTime in datefmt_format 2010-11-20 02:09:04 +00:00
Christopher Jones c8462df127 Remove unreverted duplicate fix for nulls 2010-11-20 01:29:03 +00:00
Stanislav Malyshev f061627899 report intl fix 2010-11-19 23:27:52 +00:00
Stanislav Malyshev e6c213b8ea Fix invalid args bugs by Maksymilian Arciemowicz 2010-11-19 23:22:55 +00:00
Felipe Pena 93a4e0d1fa - Fixed extract() to do not overwrite $GLOBALS and $this when using EXTR_OVERWRITE.
patch by: jorto at redhat dot com
2010-11-19 22:06:44 +00:00
Felipe Pena f16059d697 - Fixed bug #53362 (Segmentation fault when extending SplFixedArray) 2010-11-19 20:07:32 +00:00
Martin Jansen 61d97af18b Fixed two typos in NEWS. 2010-11-19 18:38:23 +00:00
Ilia Alshanetsky a8b4724747 Fixed bug #47168 (printf of floating point variable prints maximum of 40 decimal places). 2010-11-19 16:36:10 +00:00
Jani Taskinen caf792940f - Merged check from trunk to prevent building multiple SAPIs (bug #52419) 2010-11-19 08:26:47 +00:00
Christopher Jones 64f21f63ad Update fix proviso now the mentioned Oracle bugfix is available in an Oracle patchset 2010-11-19 00:14:58 +00:00
Gustavo André dos Santos Lopes cdab5577c0 - Fixed borked test bug52820.phpt.
- Synced htmlentities17.phpt with trunk; there's no ≀ entity
  in HTML 4.01.
2010-11-18 21:44:42 +00:00
Johannes Schlüter 63f65b6e8f Back to -dev 2010-11-18 19:03:59 +00:00
Johannes Schlüter 7a8d9ad16a - 5.3.4RC1 2010-11-18 17:57:54 +00:00
Pierre Joye f5570be3a9 - path with null entries 2010-11-18 17:09:27 +00:00
Pierre Joye ff26185322 - revert part of the null fix, was already applied by Chris 2010-11-18 16:16:26 +00:00
Pierre Joye ce96fd6b07 - fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus 2010-11-18 15:22:22 +00:00
Gustavo André dos Santos Lopes 75631ab8ac - Implemented alternative strategy for change in rev #304985 so as to
not to break binary compatibility in the 5.3 branch.
2010-11-18 12:10:17 +00:00
Felipe Pena 60ad3e54af - Fix build 2010-11-18 11:33:42 +00:00
Derick Rethans 95a88f04a9 - Fixed the call as well. 2010-11-18 11:28:07 +00:00
Derick Rethans a2434bb66c - Revert the ABI changing commit. 2010-11-18 11:24:59 +00:00
Gustavo André dos Santos Lopes 267634b766 - Fixed NULL dereference in lex_scan on zend multibyte builds where the script
had a flex incompatible encoding and there was no converter.
#see rev #305464 and rev #305466.
2010-11-18 04:14:49 +00:00
Gustavo André dos Santos Lopes a31f379367 - Reversed implementation of FR #44164, pending further consideration.
See rev #304903.
2010-11-18 04:09:02 +00:00
Felipe Pena e516b7a964 - Fixed bug #53335 (pdo_firebird did not implement rowCount())
patch by: preeves at ibphoenix dot com
2010-11-18 01:24:00 +00:00
Pierrick Charron 6f7821a82d Remove unused variables 2010-11-17 17:55:18 +00:00
Pierre Joye 4ced44323d - test for NULL deref fix 2010-11-17 17:26:33 +00:00
Pierre Joye 7b27de9f0b - NULL deref fix, patch by Gustavo 2010-11-17 16:46:19 +00:00
Jani Taskinen d225fe4e58 - Fix test 2010-11-17 14:54:37 +00:00
Felipe Pena 5d2e201c3d - Fixed typo (reported by eyal.t at zend dot com) 2010-11-17 14:49:26 +00:00
Felipe Pena 7716873a5b - Updated QA and User note maintainers credits 2010-11-16 23:02:00 +00:00
Jérôme Loyet 404580d95c - fix (log with level < WARNING before daemonizing were not written to /dev/stderr) 2010-11-16 22:53:47 +00:00
Felipe Pena bbf58f9234 - Fixed bug #53319 (strip_tags() may strip '<br />' incorrectly) 2010-11-16 22:16:44 +00:00
Jérôme Loyet 5ddbeffc6f - Fixed #53310 (sparc < v9 won't is not supported) 2010-11-16 22:02:36 +00:00
Felipe Pena 49493e226d - Fixed bug #53323 (pdo_firebird getAttribute() crash)
patch by: preeves at ibphoenix dot com
2010-11-16 21:02:14 +00:00
Christopher Jones 2bc233e856 Improve test cross- DB version portability 2010-11-16 20:50:29 +00:00
Christopher Jones f819965513 Added missing news 2010-11-16 19:38:31 +00:00
Christopher Jones 2ea52b1fb4 Protect against null bytes in LOB filenames (rasmus) 2010-11-16 19:33:31 +00:00
Pierre Joye 4af7de49aa - fix build 2010-11-15 23:46:21 +00:00
Felipe Pena e6de920a27 - Fix wrong argument to read_property call 2010-11-15 18:48:48 +00:00
Gustavo André dos Santos Lopes 1045aa2a7c - Fixed bug #52820 (writes to fopencookie FILE* not commited when seeking the
stream).
2010-11-15 18:22:52 +00:00
Rasmus Lerdorf d91c4be0d6 ws fix 2010-11-15 09:04:27 +00:00
Pierre Joye f6b3d22218 - allow firebird header to be in the normal deps directory and restore firebird support on win (5.3.4+) 2010-11-14 22:40:30 +00:00
Jérôme Loyet 5ef0100b4d - extend the 'i-t' fpm argument to dump configuration file when called twice (-tt) 2010-11-14 22:22:07 +00:00
Jérôme Loyet c95477e729 - Fixed #52691 (allow multiple instance of FPM using a custom prefix) 2010-11-14 22:01:34 +00:00
Felipe Pena 6958cb4a14 - Added missing void arg checks 2010-11-14 18:40:08 +00:00
Felipe Pena 46983d532e - Add missing check 2010-11-14 01:38:52 +00:00
Jani Taskinen e0858b424a - Using ifelse() here is safer, also eases debugging generated configure. 2010-11-13 22:51:11 +00:00
Felipe Pena a0ccf0f14a - Fix the constant detection 2010-11-13 19:50:55 +00:00
Felipe Pena 8901635d73 - Fixed bug #53305 (E_NOTICE when defining a constant starts with __COMPILER_HALT_OFFSET__)
- Fixed a part of bug #53260 (the __COMPILER_HALT_OFFSET__ name is not shown in the E_NOTICE)
2010-11-13 18:46:11 +00:00
Derick Rethans bb1dbdf62c - Sync from HEAD. 2010-11-13 16:31:01 +00:00
Derick Rethans 28b41c811d - MFH: Added support for the ( and ) delimiters/separators to
DateTime::createFromFormat().
- Regenerated the parsers for HEAD and PHP_5_3.
2010-11-13 15:01:48 +00:00
Derick Rethans 9b4999881f - Don't show timezone if it wasn't found while parsing. 2010-11-13 14:57:47 +00:00
Jani Taskinen 47713462ce - WS 2010-11-13 11:07:38 +00:00
Jani Taskinen 0e72e5897e - Sync with trunk 2010-11-13 10:18:35 +00:00
Felipe Pena c095bec250 - Fixed bug #53136 (Invalid read on openssl_csr_new()) 2010-11-12 23:34:03 +00:00
Gustavo André dos Santos Lopes 3332c5be08 - Fixed bug #53297 (gettimeofday implementation in php/win32/time.c can return
1 million microsecs). (ped at 7gods dot org)
- Moved line out of order in NEWS.
2010-11-12 18:37:02 +00:00
Ulf Wendel b343748d56 Testing for the two new statistics 'bytes_received_real_data_normal' and 'bytes_received_real_data_ps' 2010-11-12 12:21:35 +00:00
Jérôme Loyet c28f44e409 - Fixed #52660 (custom process title for FPM) 2010-11-12 00:30:35 +00:00
Jérôme Loyet 5a416465a0 - Fixed #52692 (Added '-t/--test' to php-fpm to check and validate FPM conf file) 2010-11-11 23:27:15 +00:00
Jérôme Loyet da29092159 - Fixed bug #52693 (configuration file errors are not logged to stderr) 2010-11-11 22:48:46 +00:00
Jérôme Loyet 7bc07ff884 - get rid of ZLOG_STUFF code redundancy 2010-11-11 21:38:18 +00:00
Jérôme Loyet 8dd82c5fde - comment out fpm_php_set_fcgi_mgmt_vars to remove compilation warning 2010-11-11 21:30:55 +00:00
Jérôme Loyet 71a8b75c51 - remove useless check 2010-11-11 12:56:44 +00:00
Jérôme Loyet 8977fc8ace - add missing timer* macros (for solaris)
- ws
2010-11-11 12:49:11 +00:00
Jérôme Loyet d7e8aaea46 here come the new 2010-11-11 02:43:51 +00:00
Jérôme Loyet 0a1e29d74b - add "listen queue len" stat (thx to Andrei Nigmatulin) 2010-11-11 02:34:47 +00:00
Kalle Sommer Nielsen 4cc8073839 Added new constant; ZEND_MULTIBYTE to check whether PHP was compiled using --enable-zend-multibyte or not instead of sniffing phpinfo() (FR #52348) 2010-11-11 01:43:53 +00:00
Jérôme Loyet 7e56681670 - syntax and minor optimizations 2010-11-11 01:01:56 +00:00
Jérôme Loyet 07abcdc031 - don't call shutdown functions after child ends softly, let the master process call them 2010-11-10 23:54:14 +00:00
Christopher Jones f4b2664e2c Prepare for PECL OCI8 1.4.4 2010-11-10 19:08:13 +00:00
Christopher Jones 29bdf30880 Improve startup failure error messages 2010-11-10 18:59:56 +00:00
Christopher Jones 7a42845d80 Fixed bug #53284 (Valgrind warnings in oci_set_* functions) 2010-11-10 18:49:55 +00:00
Christopher Jones 2bf58d8c70 Improve test portability 2010-11-10 18:46:05 +00:00
Andrey Hristov 77d160772f Fix bad types, because zend_parse_xxx expect signed integers
for lengths, no matter how stupid this is :)
2010-11-10 13:57:09 +00:00
Adam Harvey 4df2980242 Fix line wrapping. 2010-11-09 14:54:10 +00:00
Adam Harvey 84dc845ff8 Fix bug #53279 (SplFileObject doesn't initialise default CSV escape character). 2010-11-09 14:53:23 +00:00
Moriyoshi Koizumi 89d372ba27 - Fix bug #53273 (mb_strcut() returns garbage with the excessive length parameter). 2010-11-09 03:23:04 +00:00
Felipe Pena 22f7998a0d - Fix the fix (wrong behavior) 2010-11-08 20:26:14 +00:00
Dmitry Stogov b01b2e6d0b Fixed WSDL loading using https through proxy 2010-11-08 11:34:32 +00:00
Patrick Allaert 817776d1b9 - Fixed tests not passing under windows because of the directory separator
difference (thanks Eyal Teutsch for reporting)
2010-11-08 09:29:15 +00:00
Adam Harvey 53544e36f2 Update the tests committed in r305098 (as part of the fix for bug #53226) to
use the PHP_MAXPATHLEN constant, as recommended by Pierre.
2010-11-08 09:14:48 +00:00
Gustavo André dos Santos Lopes c3557ba32e - Fixed the filter extension accepting IPv4 octets with a leading 0 as that
belongs to the unsupported "dotted octal" representation.
- Fixed bug #53236 (problems in the validation of IPv6 addresses with leading
  and trailing :: in the filter extension).
- Fixed bug #50117 (problems in the validation of IPv6 addresses with IPv4
  addresses and ::).
2010-11-08 04:36:15 +00:00
Jérôme Loyet f407fc4e01 - correct time comparison for determining the last idle child 2010-11-07 21:47:14 +00:00
Jérôme Loyet 0399b83ccb - change signal from SIGTERM to SIGQUIT for killing a child process by the dynamic process manager 2010-11-07 19:41:28 +00:00
Felipe Pena e6bef6735f - Fixed bug #52512 (Broken error handling in odbc_execute)
patch by: mkoegler at auto dot tuwien dot ac dot at
2010-11-07 18:13:53 +00:00
Felipe Pena 50863932a6 - Fixed bug #53248 (rawurlencode RFC 3986 EBCDIC support misses tilde char).
patch by: Justin Martin (frozenfire@php)
2010-11-07 12:59:22 +00:00
Felipe Pena 1db7472a73 - Coding standards 2010-11-06 18:35:38 +00:00
Felipe Pena f4927c28bc - Fixed bug #52732 (Docs say preg_match() returns FALSE on error, but it returns int(0))
patch by: slugonamission at gmail dot com
2010-11-06 18:32:10 +00:00
Felipe Pena 996f45b688 - Fixed bug #47199 (pg_delete() fails on NULL)
patch by: ewgraf at gmail dot com
2010-11-06 17:43:25 +00:00
Felipe Pena 7636635ec5 - Fixed bug #50579 (RegexIterator::REPLACE doesn't work) 2010-11-06 00:09:50 +00:00
Andrey Hristov 837391a9a7 two new stats 2010-11-05 20:07:34 +00:00
Gustavo André dos Santos Lopes 8342c36f09 - Renamed php_stream_rep_nonstand_mode to
php_stream_mode_sanitize_fdopen_fopencookie, made it not
  exported and movied it from php_streams.h to
  php_streams_int.h.
2010-11-05 18:53:48 +00:00
Adam Harvey b84e262f63 Fix bug #53226 (file_exists fails on big filenames). 2010-11-05 05:28:07 +00:00
Gustavo André dos Santos Lopes dd038a9c89 - Added CLEAN section to recently committed test. 2010-11-05 01:56:28 +00:00
Gustavo André dos Santos Lopes 68107ae1c3 - Fixed bug #53241 (stream casting that relies on fdopen/fopencookie fails
with streams opened with, inter alia, the 'xb' mode).
2010-11-05 01:29:08 +00:00
Pierre Joye 8efec79ffe - expose php_sys_(l)stat, doing will prevent me to have to provide pecl's builds for <5.3.3 and another set for 5.3.4+. Trunk remains the same, A(B/P)I can be broken there 2010-11-04 01:16:20 +00:00
Pierre Joye e61005f712 - fix type and silent warning 2010-11-03 21:50:03 +00:00
Pierre Joye 6c3ddc70ed - add stat support for zip:// 2010-11-03 21:48:08 +00:00
Pierre Joye 535033074a - add CVE 2010-11-03 20:22:08 +00:00
Etienne Kneuss 9d25e7ee7b Fixed covariance of return-by-ref constraints 2010-11-03 15:40:24 +00:00
Felipe Pena 21638aed88 - BFN 2010-11-03 01:46:52 +00:00
Felipe Pena 815d0e549b - Reverted fix for bug #51176 2010-11-03 01:35:26 +00:00
Felipe Pena 7b4cbadfce - Fixed config.m4 to complete the fix for bug #53141 (thanks Johannes) 2010-11-02 20:51:02 +00:00
Felipe Pena 7ded7577b2 - Fixed bug #53141 (autoload misbehaves if called from closing session)
patch by: ladislav at marek dot su
2010-11-02 18:34:56 +00:00
Ilia Alshanetsky a1632696a8 Fixed a possible double free in imap extension (Identified by Mateusz Kocielski). 2010-11-02 17:50:39 +00:00
Pierre Joye e547a0dfec - add CVE id 2010-11-02 15:33:49 +00:00
Jani Taskinen 309aefc7e7 - Fixed -g adding for gcc and g++ (former got it twice, latter not at all) 2010-11-02 09:58:08 +00:00
Arnaud Le Blanc 3ac257f344 MFH fixed bug #52784 (Race condition when handling many
concurrent signals)
2010-11-01 22:43:59 +00:00
Arnaud Le Blanc cd63986283 MFH Fix bug #52173 (ext/pcntl doesn't store/report errors)
(patch by nick dot telford at gmail dot com)
2010-11-01 20:22:23 +00:00
Derick Rethans 6e0f2daf65 - Updated to version 2010.15 (2010o) 2010-11-01 17:55:42 +00:00
Felipe Pena f4d15d8226 - Fixed bug #47643 (array_diff() takes over 3000 times longer than php 5.2.4) 2010-11-01 17:16:47 +00:00
Gustavo André dos Santos Lopes 231da1a5cb - Fixed bug #53198 (changing INI setting "from" with ini_set did not have any
effect)
#Made "from" a proper INI setting and bound it to a global variable.
#Previously, it was simply read from the hash table with the parsed ini file
#by using cfg_get_string (I wonder why this mechanism still exists...)
2010-10-29 15:29:15 +00:00
Andrey Hristov c10af225c4 - More features for the profiling, create aggregates and dump them
on file close.
- Also add a trace modifier to switch on and off the profiling.
- With additional compiler switch the profiling can be completely omitted,
of course it makes sense only when --enable-debug. Because otherwise
there is no tracing, thus no profiling.
- Added a fix for Windows for handling trace files on different devices
 (special handing of ':' )
2010-10-29 15:02:39 +00:00
Andrey Hristov cd6ea54deb gettimeofday for windows 2010-10-28 14:14:06 +00:00
Andrey Hristov 443bedf204 show tracing 2010-10-28 14:07:36 +00:00
Andrey Hristov 4c34cd9f38 fix windows debug build
better zlib detection
2010-10-28 13:46:54 +00:00
Gustavo André dos Santos Lopes db75ce41a3 - Fixed bug #49687 (utf8_decode vulnerabilities and deficiencies in the number
of reported malformed sequences). (Gustavo)
#Made a public interface for get_next_char/utf-8 in trunk to use in utf8_decode.
#In PHP 5.3, trunk's get_next_char was copied to xml.c because 5.3's
#get_next_char is different and is not prepared to recover appropriately from
#errors.
2010-10-27 18:13:25 +00:00
Gustavo André dos Santos Lopes ee80871a15 - Fixed bug #53180 (post_max_size=0 not disabling the limit when the content
type is application/x-www-form-urlencoded or is not registered with PHP).
2010-10-27 14:56:51 +00:00
Gustavo André dos Santos Lopes b5b4f94a4c - Fixed ReflectionProperty::isDefault() giving a wrong result for properties
obtained with ReflectionClass::getProperties().
2010-10-26 18:47:10 +00:00
Gustavo André dos Santos Lopes 0086bc8a96 - Implemented request #44164, zlib.output_compression is now implicitly
disabled when the header "Content-length" is set.
#One could argue that any output handler could change the size of the
#response, so this exception for zlib.output_compression is an
#inconsistency. However, zlib.output_compression is presented as a
#performance setting, whose value should have no effect on the
#correctness of the scripts. This was not the case. Setting the
#header "content-length" and enabling zlib.output_compression was
#a recipe for infringing section 4.4 of RFC 2616.
2010-10-26 02:16:21 +00:00
Andrey Hristov 762a1b2d26 rename and remove usage of inttypes.h, not needed 2010-10-25 13:44:11 +00:00
Gustavo André dos Santos Lopes 384cd8cda5 - Small optimization of the fix of bug #53071. It's not necessary to destroy
the debug info as it's not holding references anymore (the fix removed
  the refcount increments).
2010-10-25 02:03:20 +00:00
Gustavo André dos Santos Lopes 5721132c29 - Fixed bug #53071 (SPLObjectStorage defeats gc_collect_cycles). 2010-10-25 01:41:54 +00:00
Pierre Joye 3cb6a460a6 - fix Isotopp 2010-10-24 21:51:54 +00:00
Felipe Pena eabf03f436 - BFN 2010-10-24 14:05:10 +00:00
Felipe Pena 6887b97a8d - Fixed bug #53144 (SplObjectStorage::removeAll()) 2010-10-24 14:03:07 +00:00
Andrey Hristov 924bb78167 profiling in trace mode 2010-10-22 15:46:26 +00:00
Andrey Hristov 4cedb6d08a last piece to enable trace logging on windows 2010-10-22 14:34:33 +00:00
Andrey Hristov f7c44c8c4d enable debug logging on windows, in debug builds, of course 2010-10-22 14:12:45 +00:00
Ilia Alshanetsky 8a2a6dbe21 Upgraded bundled sqlite to version 3.7.3 2010-10-20 19:27:34 +00:00
Pierre Joye 8c5921bfb8 - update #52929 and zip NULL deref 2010-10-19 09:56:59 +00:00
Pierre Joye 6ab767262c - fix Fixed NULL pointer dereference in ZipArchive::getArchiveComment, (CVE-2010-3709), report&patch from Maksymilian Arciemowicz 2010-10-19 09:55:36 +00:00
Adam Harvey 6a289f4d10 Fix bug #53089 (php.ini should use portable example of find) by using POSIX
compliant syntax in the suggested find command for cleaning up session files in
the shipped php.ini files.
2010-10-18 02:10:29 +00:00
Felipe Pena 946f95c0fc - Fixed bug #53070 (Calling enchant_broker_get_dict_path before set_path crashes php) 2010-10-16 17:52:01 +00:00
Gustavo André dos Santos Lopes 3ab0b74de9 - Updated NEWS to note fix of bug #53006 now that it's confirmed it's fixed. 2010-10-15 23:54:24 +00:00
Gustavo André dos Santos Lopes a3cef7b435 - Three tests were "broken" by rev #304404, not two. Commit the change
to remaining one.
2010-10-14 19:33:12 +00:00
Gustavo André dos Santos Lopes 30d6cc8919 - Fixed get_next_char(), used by htmlentities/htmlspecialchars, accepting
certain ill-formed UTF-8 sequences.
2010-10-14 19:14:06 +00:00
Gustavo André dos Santos Lopes c99251f87e - [DOC] Reverted rev #304382 and rev #304380, as I figured out a way to
fix the erratic behavior without breaking backwards compatibility. Namely,
  $offset retains SEEK_SET behavior but actually SEEK_CUR is passed to
  _php_stream_seek, if possible, by moving the offset stream->position bytes.
- Addresses bug #53006.
2010-10-14 03:15:15 +00:00
Adam Harvey db633fb71d Fix vim marker folds. 2010-10-13 09:23:39 +00:00
Dmitry Stogov b88f7753a1 Fixed bug #52939 (zend_call_function does not respect ZEND_SEND_PREFER_REF) 2010-10-13 08:51:39 +00:00
Gustavo André dos Santos Lopes 14a54b903e - Fixed forward stream seeking emulation in streams that don't support seeking
in situations where the read operation gives back less data than requested
  and when there was data in the buffer before the emulation started. Also made
  more consistent its behavior -- should return failure every time less data
  than was requested was skipped.
- Small performance improvement by correcting off-by-one error that generate an
  invalid call to the seek handler or read handler. in _php_stream_seek.
2010-10-13 03:13:29 +00:00
Dmitry Stogov d46dcd301e Added test 2010-10-12 07:38:36 +00:00
Gustavo André dos Santos Lopes 99b613cbc8 - Added a 3rd parameter to get_html_translation_table. It now takes a charset
hint, like htmlentities et al.
- Fixed bug #49407 (get_html_translation_table doesn't handle UTF-8).
- Fixed bug #25927 (get_html_translation_table calls the ' &#39; instead of
  &#039;).
- Fixed tests for get_html_translation_table and unified the Windows and
  non-Windows versions of the tests.
2010-10-12 02:51:11 +00:00
Gustavo André dos Santos Lopes 40c3aefafb - Removed redundant local variable in dns_get_record.
- (5.3) Fixed bug in the Windows implementation of
  dns_get_record, where the two last parameters wouldn't be
  filled unless the type were DNS_ANY (Gustavo).
2010-10-11 03:07:03 +00:00
Gustavo André dos Santos Lopes 4e2fd7eeba - Fixed a typo in rev #304208 (24 instead of 34/'"').
- Improved the test bug53021.phpt to reflect other fixes in rev #304208.
- Updated NEWS to reflect other fixes in rev #304208.
2010-10-08 17:27:19 +00:00
Gustavo André dos Santos Lopes 485a094334 - Fixed bug #53021 (In html_entity_decode, failure to convert numeric entities with ENT_NOQUOTES and ISO-8859-1). 2010-10-08 16:19:58 +00:00
Andrey Hristov 93d7715e7b new collations 2010-10-08 09:15:31 +00:00
Felipe Pena f7582fc43b - Added bison 2.4.3 version to the bison version list 2010-10-07 21:44:41 +00:00
Andrey Hristov 2d2d6f84ba fix some uninitialized variables. also fix shadowing of global symbols 2010-10-07 13:49:00 +00:00
Ilia Alshanetsky a4252ab2be Fixed extrenous warning inside openssl_encrypt() for cases where iv not provided, but algo does not require an iv 2010-10-07 12:32:00 +00:00
Gustavo André dos Santos Lopes 8d34fe0d22 - Fixed test for bug #50590 on systems with 64-bit longs. 2010-10-06 17:05:05 +00:00
Andrey Hristov 1f86f6be31 here comes the news 2010-10-06 11:12:53 +00:00
Andrey Hristov 4f62c099cd Fix for Bug #52686 mysql_stmt_attr_[gs]et arg. points to incorrect type 2010-10-06 11:11:02 +00:00
Andrey Hristov 1cca9d4bf1 more variable hiding fixes 2010-10-06 07:09:37 +00:00
Andrey Hristov 062ddaa700 fix shadowing of parameters 2010-10-06 06:08:55 +00:00
Kalle Sommer Nielsen 58a15c2cf5 Update copyright year for the license 2010-10-05 22:58:19 +00:00
Andrey Hristov 82de444f9a rename parameter name - should not shadow the global symbol alloca 2010-10-05 17:20:00 +00:00
Andrey Hristov eb2908c3f7 two more compiler warnings fixed - size does matter 2010-10-05 17:10:47 +00:00
Andrey Hristov 25e84b6a23 Rename a method so it doesn't clash with a global symbol - a function
Fix compiler waring by extening the type of a variable
2010-10-05 17:03:50 +00:00
Andrey Hristov 3daf54ffa0 Fix compiler warnings - on 32bit size_t is smaller than uint64_t, although
we will never hit this the compiler should be happy.
2010-10-05 16:54:14 +00:00
Andrey Hristov 548661d96d rename parameter, should not conflict with global symbol -
the socket function
2010-10-05 16:27:49 +00:00
Andrey Hristov e97a07ae9e remove trailing commas in enums 2010-10-05 14:56:49 +00:00
Ulf Wendel bd73903efb Fix test: third parameter can be false. 2010-10-05 14:41:08 +00:00
Antony Dovgal 421b86ed5e fix bug #50345 (nanosleep not detected properly on some solaris versions) 2010-10-05 13:43:35 +00:00
Ulf Wendel ccaff0e994 Greetings from SunCC.
ext/mysqli/mysqli_driver.c", line 127|128|129: warning: syntax error:  empty declaration
2010-10-05 12:42:53 +00:00
Dmitry Stogov 1b60eb8813 Fixed bug #44248 (RFC2616 transgression while HTTPS request through proxy with SoapClient object). 2010-10-05 11:43:59 +00:00
Dmitry Stogov 455db21e06 Fixed bug #51008 (Zend/tests/bug45877.phpt fails) 2010-10-05 11:28:56 +00:00
Andrey Hristov bf7e6f930c add some safe casts 2010-10-05 11:08:21 +00:00
Patrick Allaert bf6440d00a Fixed typo in tests (thx Eyal) 2010-10-05 10:42:13 +00:00
Andrey Hristov c4e145b0bc fixing more types 2010-10-05 10:30:00 +00:00
Kalle Sommer Nielsen 33c99f9a44 Fixed constness compiler warning in pdo_mysql 2010-10-05 09:58:15 +00:00
Kalle Sommer Nielsen efe22e3bfa Fix constness warnings 2010-10-05 09:48:07 +00:00
Kalle Sommer Nielsen 87edd143ed Fixed compiler warnings in mysqli
- mysqli.c: Fix unused variables, they are only used in non-mysqlnd mode
 - mysqli_api.c (PHP_5_3 only): Fix constness, add_property_string expects a char *, not a const char *
 - mysqli_prop.c: Cast to long, as its below the LONG_MAX and therefore safe
 - mysqli_result_iterator.c: Cast to ulong as the iterator member expects that rather than a my_longlong

# In trunk only warnings regarding the zend_property_info 
# structure is present and PHP_5_3 is warning free now
2010-10-05 09:40:36 +00:00
Andrey Hristov df2261df2a fix types 2010-10-05 08:56:21 +00:00
Ulf Wendel 234181f690 Fix warnings
ext\mysqlnd\mysqlnd_result_meta.c(57) : warning C4090: 'initializing' : different 'const' qualifiers
ext\mysqlnd\mysqlnd_result_meta.c(64) : warning C4090: 'initializing' : different 'const' qualifiers
ext\mysqli\mysqli_report.c(50) : warning C4013: 'php_mysqli_throw_sql_exception' undefined; assuming extern returning int
2010-10-05 08:29:54 +00:00
Andrey Hristov 4c88033aa2 fix recent TSRM build break, with --enable-debug 2010-10-05 08:17:33 +00:00
Gustavo André dos Santos Lopes b3a3c8f7a6 - Moved ucgendat.c to a separate directory and included the
OpenLDAP license there, as required by the license itself.
2010-10-05 02:34:35 +00:00
Gustavo André dos Santos Lopes 7e61cffb0d - Fixed bug #52981 (Unicode casing table was out-of-date).
Updated with UnicodeData-6.0.0d7.txt and included the
  source of the generator program with the distribution.
#The replaced tables, generated circa 2002, seem to reflect
#Unicode 3.2. I was unable to generate the same property
#offsets with Unicode 3.2 data, but all the tests I made
#indicate php_unicode_is_prop() is returning the correct
#values. The replaced file merely says it used a "modified
#version" of ucgendat, which is not very helpful. The results
#I got were not significantly different, only slightly higher
#offsets at two properties, which were carried over to the
#subsequent properties.
#I was, however, able to replicate precisely the casing table.
#The extent of the "modifications" besides omitting most of
#the tables, a slightly different layout and the casing table
#offsets having been multiplied by 3 is unclear.
#The test suite showed no regressions; however, it's very poor
#in testing the modified portion of the extension.
2010-10-05 01:54:17 +00:00
Kalle Sommer Nielsen 54624f9902 We do not need this TSRMLS_FETCH() call as we do not use any TSRM stuff in here, so we can get
a minor boost here in ZTS mode.
2010-10-04 21:04:25 +00:00
Andrey Hristov a4ad111454 fix two more warnings 2010-10-04 14:52:14 +00:00
Andrey Hristov 9f73a4e045 add some safe casts - lower the number of warnings by 2 2010-10-04 14:12:31 +00:00
Andrey Hristov 4c63a2232d Fix const-ness 2010-10-04 13:54:30 +00:00
Ulf Wendel 5aca10ee13 Trying to fix compiler warnings (on Windows). 2010-10-04 13:36:23 +00:00
Andrey Hristov 159ed311cc Even better patch 2010-10-04 12:59:29 +00:00
Andrey Hristov cacd5ad924 don't define twice the macro on some platforms 2010-10-04 12:41:12 +00:00
Ulf Wendel 1f9a7fd758 Fixing compiler warning. 2010-10-04 10:58:05 +00:00
Ulf Wendel ee2a82e327 Fixing "ext/mysqlnd/mysqlnd.h", line 287: warning: syntax error: empty declaration" 2010-10-04 10:51:44 +00:00
Ulf Wendel 122179478a Next one... ext/mysqli/mysqli_fe.c", line [many]: warning: syntax error: empty declaration 2010-10-04 10:43:21 +00:00
Ulf Wendel 4113fad4ec Fixing compiler warning "ext/mysqli/mysqli_prop.c", line [...]: warning: syntax error: empty declaration" 2010-10-04 10:40:16 +00:00
Ulf Wendel 71bbb24ff0 Sorry again, nothing but removal of white space from the end of the lines.
- fix compile warning "ext/mysql/php_mysql.c:640:11: warning: extra tokens at end of #ifdef directive"
2010-10-04 10:08:10 +00:00
Ulf Wendel 2d925fb216 Sorry for the commit but compiler warnings are annoying and so are white spaces at the end of a line, if one uses an editor which removes them on save and diff's get blown
up by white space changes...

Changes: 
- remove end of line white space
- fix compiler warning "ext/mysqli/mysqli_priv.h:156:27: warning: no newline at end of file"
- fix compiler warning "ext/mysqli/mysqli_fe.h:135:25: warning: no newline at end of file"
- fix compiler warning "ext/mysqli/mysqli.c:896:11: warning: extra tokens at end of #ifdef directive"
2010-10-04 10:02:58 +00:00
Gustavo André dos Santos Lopes 817c28c867 - Implemented FR #50692, not uploaded files don't count towards
max_file_uploads limit.
- As a side improvement, temporary files are not opened for
  empty uploads and, in debug mode, 0-length uploads.
2010-10-04 01:27:33 +00:00
Felipe Pena 090a9b3331 - Fixed bug #52971 (PCRE-Meta-Characters not working with utf-8)
#   In  PCRE,  by  default, \d, \D, \s, \S, \w, and \W recognize only ASCII
#       characters, even in UTF-8 mode. However, this can be changed by setting
#       the PCRE_UCP option.
2010-10-03 16:01:38 +00:00
Gustavo André dos Santos Lopes 4b0927b042 - Fixed a small mistake in the fix for bug #50953 that made connection timeouts not be detected as such. 2010-10-02 18:32:20 +00:00
Dmitry Stogov 4d8503a212 Fixed bug #52879 (Objects unreferenced in __get, __set, __isset or __unset can be freed too early). (mail_ben_schmidt at yahoo dot com dot au, Dmitry) 2010-10-01 09:49:20 +00:00
Ulf Wendel bc6e920ebc Fix leak with persistent connections when using mysqli.default_host is used 2010-10-01 08:54:16 +00:00
Stanislav Malyshev b55d4ecb41 Fix bug #52906 gmp_mod returns negative result when non-negative is expected 2010-10-01 00:12:23 +00:00
Andrey Hristov 60327d87a7 Plug a leak in mysqli when in the same script
a pconn is reused.
Call end_psession earlier - so will mysqlnd and
the plugins free data earlier.
2010-09-30 18:10:03 +00:00
Dmitry Stogov 5c6f0ebeab Prevented crash in GC because of incorrect reference counting 2010-09-30 14:11:51 +00:00
Adam Harvey 104bf57ae7 Loosen the valgrind version check slightly in run-tests.php so that it works
with the packaged valgrind in Ubuntu 10.04.
2010-09-30 11:16:45 +00:00
Adam Harvey 5f9956397f Fixed bug #52941 (The 'iconv_mime_decode_headers' function is skipping
headers).
2010-09-30 11:04:21 +00:00
Gustavo André dos Santos Lopes 0db999a94f - Fixed bug #52944 (Invalid write on second and subsequent reads with an inflate filter fed invalid data). 2010-09-29 18:58:58 +00:00
Andrey Hristov 3113744c57 Fix a problem that leads to leaks in plugins that
use stmt local data - no free is called for statements
that are over-prepared
2010-09-29 13:18:07 +00:00
Andrey Hristov 517fd63c32 fix the test 2010-09-29 11:40:57 +00:00
Felipe Pena a5459c09c9 - Fixed bug #52947 (segfault when ssl stream option capture_peer_cert_chain used) 2010-09-29 01:25:35 +00:00
Andrey Hristov 22d73027d0 add another hook, maybe the last one, for MYSQLND_STMT, which
was missed before
2010-09-28 14:36:18 +00:00
Pierre Joye 6bae8fbd9c - Fixed possible flaw in open_basedir (CVE-2010-3436) 2010-09-28 13:30:30 +00:00
Pierre Joye edb4351004 - Fixed possible flaw in open_basedir (CVE-2010-3436) 2010-09-28 13:29:33 +00:00
Felipe Pena 2cd1661e2d - Fixed bug #52931 (strripos not overloaded with function overloading enabled) 2010-09-27 23:09:00 +00:00
Derick Rethans 761cc30055 - Updated to version 2010.13 (2010m) 2010-09-27 13:57:42 +00:00
Andrey Hristov 42a80fac8c Fixed bug #45921 (Can't initialize character set hebrew) 2010-09-27 12:35:59 +00:00
Andrey Hristov b080cfcc71 Fix the value, it was bumped 2010-09-27 11:23:01 +00:00
Adam Harvey 2d4c7b4033 Fix bug #52929 (Segfault in filter_var with FILTER_VALIDATE_EMAIL with large
amount of data).
2010-09-27 07:08:04 +00:00
Pierre Joye 4839387edd - fix bug #52926, zlib fopen wrapper does not use the context 2010-09-26 20:46:54 +00:00
Adam Harvey fc2ed1b5d0 MFH: fix phar phpinfo() tests. 2010-09-24 12:13:33 +00:00
Andrey Hristov 216effe4f5 WS fixes 2010-09-23 16:03:22 +00:00
Ulf Wendel 8bb124394b Let's try not to have 'uft8'-only tests and avoid setting the charset upon connect. I've changed the tests to make no assumptions on the server charset setting. var_dump()/EXPECTF tests got replaced with dynamic tests which try to take the current charset into account. 2010-09-23 15:08:43 +00:00
Ulf Wendel 389965f1de Merge from head: do not use deprecated function aliases. The test logic is unchanged. 2010-09-23 14:59:13 +00:00
Adam Harvey 107f916322 Fix up the vim folds in phar_object.c and add a note that the two prototypes
before Phar::__construct() are actually valid and not a mistake, per bug
#52909.
2010-09-23 04:41:14 +00:00
Pierre Joye f1d2e1453c - Fix #52908, fix declaration 2010-09-22 21:28:37 +00:00
Andrey Hristov bdaec773b5 Unify, force one charset at connect, thus fixing
test failures because different servers have different
system charsets.
2010-09-22 18:25:33 +00:00
Ulf Wendel 7f0ec2a127 Test update for sql_mode = ansi 2010-09-22 15:22:22 +00:00
Ulf Wendel 841c151b64 Test update for sql_mode = ANSI 2010-09-22 15:16:07 +00:00
Andrey Hristov ff27146950 small macro fix 2010-09-22 14:54:43 +00:00
Andrey Hristov 86c1364695 fix for bug 52891 - optimize a bit 2010-09-22 14:26:43 +00:00
Andrey Hristov b962a566af hier comes the news 2010-09-22 11:40:20 +00:00
Andrey Hristov 1de4cfb791 Fix for
Bug #52891 Wrong data inserted with mysqli/mysqlnd when using bind_param,value>LONG_MAX
2010-09-22 11:38:49 +00:00
Andrey Hristov 047f0e4d88 update tests 2010-09-22 11:09:29 +00:00
Ulf Wendel 2ff0c392e7 Trying to pimp gcov.php.net code coverage tests.. trying to cover mysqlnd compress code with a standard test run 2010-09-20 19:01:13 +00:00
Ulf Wendel 7f6d8e53fd Align test to the style used in the other tests 2010-09-20 18:26:11 +00:00
Ulf Wendel 1a40f20729 No reason not to run the tests with libmysql. Its long, long ago that pconnect has been a mysqlnd only feature 2010-09-20 17:26:39 +00:00
Ilia Alshanetsky 9aafc5d1c6 Fixed a compiler warning 2010-09-20 12:48:27 +00:00
Ulf Wendel c30edd027f Dont be strict on error messages, they can vary by server version 2010-09-20 09:04:48 +00:00
Andrey Hristov 531085785b add test case for 52891 2010-09-20 09:02:31 +00:00
Pierre Joye 63883d4970 - not needed here anymore 2010-09-18 14:54:40 +00:00
Ulf Wendel 2d656381f8 Skip if PDO_SQLITE is not available 2010-09-17 17:11:21 +00:00
Ulf Wendel fe726b1beb Remove OS dependent directory separator from EXPECT 2010-09-17 16:40:02 +00:00
Pierre Joye 88117e6128 - restore VOLUME_NAME_NT and VOLUME_NAME_DOS definition, thx Andrey for the headup 2010-09-17 11:34:49 +00:00
Pierre Joye 064578114f - WS 2010-09-16 19:15:26 +00:00
Pierre Joye 664f06616a - fix news 2010-09-15 16:59:57 +00:00
Andrey Hristov 17ae7c1659 remove unneeded proxy function _mysqlnd_restart_psessoin 2010-09-15 12:23:45 +00:00
Andrey Hristov d99ee78503 Remove unneeded proxy function _mysqlnd_end_psession 2010-09-15 12:11:33 +00:00
Adam Harvey 416240947b Fix bug #52849 (GNU MP invalid version match). 2010-09-15 10:51:55 +00:00
Ulf Wendel 0dc0d76854 Fix test 2010-09-15 08:20:15 +00:00
Felipe Pena 09ca429157 - Fixed bug #52843 (Segfault when optional parameters are not passed in to mssql_connect) 2010-09-15 02:12:46 +00:00
Andrey Hristov fc2143b993 unify magic quotes handling. Also fix a problem which
resulted in a longjmp in debug PHP,because of usage of
zval that is NULL in a hash context.
2010-09-14 16:09:42 +00:00
Jérôme Loyet 8c1582c9ad - remove a memory leak (missing efree()) 2010-09-14 15:33:43 +00:00
Johannes Schlüter 0631d2c59d - Don't be silent on bailout 2010-09-14 14:26:37 +00:00
Adam Harvey 877a6f92f0 Fix bug #52827 (cURL leaks handle and causes assertion error (CURLOPT_STDERR)).
Patch by Gustavo.
2010-09-14 10:58:59 +00:00
Pierre Joye 992991fe1b - fix #48831 php -i has different output to php --ini 2010-09-14 10:36:21 +00:00
Adam Harvey 1f06a6a4e8 Fix English in the error message emitted when json_decode() is called with
depth <= 0.
2010-09-14 03:46:28 +00:00
Kalle Sommer Nielsen 4119b09a1a Fixed bug #52772 (var_dump() doesn't check for the existence of get_class_name before calling it) 2010-09-13 20:14:18 +00:00
Pierre Joye f4da90705b - use php_sys_sat 2010-09-13 11:17:40 +00:00
Pierre Joye 25ac985422 - ws 2010-09-13 11:06:18 +00:00
Pierre Joye 65942d343f - sanity check for the path length and don't treat UNC as local path (no functional change, only less ops) 2010-09-13 10:58:18 +00:00
Pierre Joye 013727e1c7 - MFH 2010-09-13 10:30:21 +00:00
Pierre Joye e5323bde9a - silent warning 2010-09-13 10:28:45 +00:00
Pierre Joye ffd60af473 - use php_sys_lstat 2010-09-13 10:27:55 +00:00
Pierre Joye eafd04d172 - use php_sys_readlink 2010-09-13 09:30:07 +00:00
Pierre Joye 3a2f5c2219 - WS 2010-09-13 09:08:42 +00:00
Adam Harvey a7da07a15f Fix bug #52826 (phpinfo is incorrect for bzip2 stream wrapper). 2010-09-13 07:41:39 +00:00
Pierre Joye d97c07c265 - remove dummy wrapper for readfile 2010-09-11 19:07:43 +00:00
Felipe Pena 6ca2ea7109 - Fixed bug #49215 (make fails on glob_wrapper) 2010-09-10 21:33:50 +00:00
Pierre Joye 20944e2516 - use php_sys_readlink 2010-09-10 19:25:56 +00:00
Pierre Joye cd727b4e9a - remove 'UNC' from the target 2010-09-10 19:21:02 +00:00
Pierre Joye 77d307ccbf - open_basedir symlink support for Windows 2010-09-10 17:45:13 +00:00
Pierre Joye 2b04364852 - Implement bug #51804, splFileInfo::getLinkTarget() on Windows 2010-09-10 14:17:40 +00:00
Pierre Joye 391ff7682c - add php_sys_readlink 2010-09-10 14:01:44 +00:00
Adam Harvey 6e06a45f24 Fix bug #52802 (Out-of-date comment for
file_get_contents/php_stream_copy_to_mem) by updating the relevant comments.
2010-09-10 03:08:05 +00:00
Felipe Pena 03df7fce82 - Fixed test 2010-09-09 21:46:29 +00:00
Adam Harvey 97f6da74a1 Fixed bug #52744 (cal_days_in_month incorrect for December 1 BCE). Original
patch by gpap at internet dot gr.
2010-09-09 06:41:23 +00:00
Adam Harvey bcea4e69bb Fix bug #52786 (PHP should reset section to [PHP] after ini sections). Patch by
Fedora at famillecollet dot com.
2010-09-09 05:11:05 +00:00
Adam Harvey 7a2c4afa91 Fix bug ordering in NEWS. 2010-09-09 05:08:58 +00:00
Pierre Joye abd1af951c - fix the fix for bug #52323 2010-09-08 11:51:11 +00:00
Pierre Joye b310ce9ccc - WS 2010-09-08 10:26:59 +00:00
Pierre Joye ce82e028b2 - Fix bug #52323, return value of php_network_connect_socket should be set even if the caller does not care about the error_string 2010-09-08 10:25:40 +00:00
Pierre Joye 266ff49a9a - Fix #50524, proc_open should respect cwd as it does on other platforms 2010-09-08 08:34:57 +00:00
Jérôme Loyet 9a1623dc5f - remove FPM specific version which is irrelevant since FPM integration into core. 2010-09-07 22:03:43 +00:00
Jérôme Loyet c725c054d6 - Fixed bug #52498 (libevent was not only linked to php-fpm) 2010-09-07 21:12:28 +00:00
Pierre Joye f696aece3f - fix bug #50953, socket will not connect to IPv4 address when the host has both ipv4 and ipv6 addresses 2010-09-07 09:47:36 +00:00
Pierre Joye c286d482aa - links related fixes 2010-09-06 14:54:43 +00:00
Pierre Joye 80ddb8d95c - fix bug #52260, catch all DNS not found error 2010-09-06 10:57:42 +00:00
Pierre Joye 4275e7428b - timeval element are always 32bit long on Windows 2010-09-06 10:39:26 +00:00
Pierre Joye 6c08709bd6 - kill warning 2010-09-06 10:28:04 +00:00
Pierre Joye 329cab2942 - restore credits, fix 5.3 as well, aka do it right /cc Deric 2010-09-05 14:38:35 +00:00
Derick Rethans d30323b867 - Clean up the generated tmp-php.ini after make test has run. 2010-09-05 12:29:47 +00:00
Rasmus Lerdorf 8022e383ff This incorrect contraction started to get on my eyes after I saw it for the
87th time while struggling with an annoying SOAP service.
2010-09-03 22:24:08 +00:00
Ulf Wendel 4789901728 Test for http://bugs.php.net/52221. Test will fail with mysqlnd but should pass with libmysql. 2010-09-03 14:20:32 +00:00
Dmitry Stogov c7b95db5ab Fixed GC bug 2010-09-03 09:27:47 +00:00
Ulf Wendel 48814f96ef Fix test failure. Add new test for MYSQLI_OPT_INT_AND_FLOAT_NATIVE mysqlnd feature. 2010-09-02 14:57:38 +00:00
Pierre Joye edfe2e11db - add it for 5.3 as well 2010-09-02 10:32:32 +00:00
Stanislav Malyshev a54ac71371 Fix bug #50590 - IntlDateFormatter::parse result is limited to the integer range 2010-09-01 20:34:59 +00:00
Andrey Hristov 292785ed61 fix build on windows, seems this macro is not defined 2010-09-01 16:54:20 +00:00
Andrey Hristov 8220c2e4ce OPT_COMPRESS support for mysqlnd_conn::set_client_option
To be used by mysqli_options
2010-09-01 14:47:36 +00:00
Pierre Joye 13fd8fcded - WS 2010-09-01 10:16:48 +00:00
Pierre Joye 87bf415853 - sb needed only in safemode 2010-09-01 10:13:46 +00:00
Pierre Joye 6396a3272c - add lstat support for Windows 2010-09-01 09:49:53 +00:00
Jérôme Loyet 6b2b7046ed - Fixed bug #52725 (gcc builtin atomic functions were sometimes used when they were not available). 2010-09-01 08:17:18 +00:00
Jérôme Loyet 5fd50c99cb - add 'max children reached' to the FPM status page. It shows how many times
a pool has reached the max_children parameter.
2010-08-31 14:49:16 +00:00
Ulf Wendel d27642fece PHP has changed (undefined) behaviour from 5.3.2 to 5.3.3: ->{} = , which seems to have been never an officially supported syntax and have never been a valid property name, is no longer allowed and PHP bails. 2010-08-31 14:43:02 +00:00
Timm Friebe c37b0c690a - MFT: Add ".so" suffix to checks on libsybct[64] bundles
# See patch by royanee at yahoo dot com @ bug #45357
2010-08-31 12:28:30 +00:00
Jérôme Loyet cbd21afae9 - Add libevent version to the startup debug log in FPM. 2010-08-31 09:41:04 +00:00
Jérôme Loyet 0605d5f309 - Changed listen.backlog in the FPM configuration file to default to 128
instead of -1 (except on FreeBSD and OpenBSD). This is the same value 
  as the one used in the cgi sapi. This patch completes revision 302725.
2010-08-31 09:33:53 +00:00
Felipe Pena c0840f18f3 - Fixed crash on non-Windows build 2010-08-30 21:34:54 +00:00
Andrey Hristov 77d650908d here comes the news 2010-08-30 18:13:28 +00:00
Andrey Hristov 72bef34918 Fix for MySQL Bug #49406
Binding params doesn't work when selecting a date inside a CASE-WHEN
(http://bugs.mysql.com/bug.php?id=49406)
The MySQL server sends MYSQL_TYPE_NEWDATE values as clear text, even
when PS are used and thus the binary protocol are used. Changing the
handler for the type.
2010-08-30 18:10:23 +00:00
Pierre Joye c55632007e - fix possible leak and error while fetching PHPRC 2010-08-30 17:05:56 +00:00
Ulf Wendel f671ad6275 Adding MYSQLI_OPT_SSL_VERIFY_SERVER_CERT for use with mysqli_options(). 2010-08-30 16:59:10 +00:00
Pierre Joye 71966d1e5a - WS 2010-08-30 16:52:48 +00:00
Derick Rethans b8837a79b2 - Tests for bug #52342 (DateTime setIsoDate results in wrong timestamp). 2010-08-30 16:48:21 +00:00
Derick Rethans adbf9e766e - Added test file that I forgot to commit. 2010-08-30 16:47:46 +00:00
Derick Rethans bb8ec8d629 - Fixed bug #52430 (date_parse parse 24:xx:xx as valid time). (Derick) 2010-08-30 16:40:29 +00:00
Derick Rethans aa82af78e4 - Fixed bug #52454 (Relative dates and getTimestamp increments by one day) 2010-08-30 16:25:52 +00:00
Derick Rethans 83a2d6e96e - Test for (non-)bug #52577. 2010-08-30 15:40:36 +00:00
Derick Rethans 550e18eaed - Added test for bug #46874 (same as #52668). 2010-08-30 15:35:41 +00:00
Derick Rethans bd184cc572 - Fixed bug #52668 (Iterating over a dateperiod twice is broken). 2010-08-30 15:32:09 +00:00
Jérôme Loyet a7057e4e49 - only one process (for all pools) could be killed by the 'dynamic' process manager. Now it's one process per pool which can be killed by the 'dynamic' process manager.
- rename nonsense variable (i)
2010-08-30 15:21:31 +00:00
Ulf Wendel d0e7e5aa2a If you add functions to the PDO core, take care not to break other PDO drivers tests, document the function and provide a function test for the PDO core to check your default/fallback implementation. 2010-08-30 09:20:48 +00:00
Ilia Alshanetsky a12d2bf747 Fixed a compiler warning 2010-08-27 19:43:08 +00:00
Pierre Joye 3c3ddb39b4 - WS 2010-08-27 10:09:52 +00:00
Andrey Hristov d9f50d95e3 Add proper magic_quotes_runtime support for mysqlnd, but
in mysqli, so we don't need to tamper myslqnd.
magic_quotes_runtime are deprecated and not existant in 5.4, thus
only fixing in the branch.
2010-08-26 14:51:58 +00:00
Pierre Joye a5e51efff8 - Symlink resolution fails when target is a DFS path 2010-08-26 14:23:17 +00:00
Ulf Wendel 6338f99d52 Test for http://bugs.mysql.com/bug.php?id=49406, Binding params doesn't work when selecting a date inside a CASE-WHEN 2010-08-26 13:35:20 +00:00
Felipe Pena 8fba11c57b - Fixed bug #52699 (PDO bindValue writes long int 32bit enum) 2010-08-25 22:03:03 +00:00
Andrey Hristov 07986a53e3 here comes the news 2010-08-25 15:07:34 +00:00
Andrey Hristov ab778e7414 Fix for bug #52221 Misbehaviour of magic_quotes_runtime (get/set)) 2010-08-25 15:06:47 +00:00
Andrey Hristov 7a83093a3b fix the build. two mysqli functions were missing after
recent commit - set_charset and get_charset
2010-08-25 15:02:02 +00:00
Pierre Joye adcf926b80 - CVE # for mops 2010-24 2010-08-25 14:27:39 +00:00
Adam Harvey c783495edf Fixed bug #52681 (mb_send_mail() appends an extra MIME-Version header). 2010-08-25 06:07:22 +00:00
Jérôme Loyet f9c6bb1ad8 - Fixed bug #52674 (FPM Status page returns inconsistent Content-Type headers). 2010-08-23 20:40:44 +00:00
Pierre Joye 411d090895 -fix logic (and BC break) 2010-08-23 18:05:05 +00:00
Pierre Joye b9d73bb910 - WS 2010-08-23 17:16:17 +00:00
Pierre Joye a6c5363f05 - revert fix for #52655, rev. 302614 2010-08-23 17:01:44 +00:00
Pierre Joye 6326528127 - add follow_location support for http stream, enabled by default to keep BC. Allows one to ignore the location header, w/o having to ignore errors or other tricks, the location data is however still available (meta) 2010-08-23 16:54:57 +00:00
Pierre Joye 1d7ce1aae0 - fix string validation entry, mops-2010-24 2010-08-23 14:25:48 +00:00
Kalle Sommer Nielsen 3947bfeadf Fixed bug #52655 (SimpleXMLIterator supports ArrayAccess without implementing the interface) 2010-08-21 16:22:46 +00:00
Felipe Pena da3743b7b9 - Added missing void parameter checks 2010-08-21 16:09:18 +00:00
Jérôme Loyet 6db49b7864 - Fix #52407 (use __sync_bool_compare_and_swap in fpm_atomic.h if gcc >= 4.1 is used - credit to geissert) 2010-08-21 06:46:18 +00:00
Jérôme Loyet 1f3aaf508c - typo (thx to sixd) 2010-08-20 17:00:57 +00:00
Pierre Joye 0f58370215 - fix string validation, MOPS-2010-24 2010-08-20 16:37:33 +00:00
Andrey Hristov 4348f9e163 svn up messed this 2010-08-20 15:39:03 +00:00
Andrey Hristov bb89f5c275 here comes the news 2010-08-20 12:29:59 +00:00
Andrey Hristov 27567040d2 Fix for bug #52654 mysqli doesn't install headers with structures it uses 2010-08-20 12:25:17 +00:00
Jérôme Loyet 72064e1a28 Fix #52609 (INI scanner did not use ZEND_INI_SCANNER_NORMAL) 2010-08-20 08:33:57 +00:00
Ilia Alshanetsky 06c460c995 Fixed bug #52599 (iconv output handler outputs incorrect content type when flags are used). 2010-08-19 12:27:13 +00:00
Kalle Sommer Nielsen 0b1477a716 Use userland function name, not internal name for NEWS 2010-08-18 20:26:42 +00:00
Kalle Sommer Nielsen e92ebce7f8 Fixed possible crash in php_mssql_get_column_content_without_type()
# Also fix NEWS entry in PHP_5_2 for previous commit
2010-08-18 20:16:05 +00:00
Kalle Sommer Nielsen c2c3467ab4 Fixed bug #52636 (php_mysql_fetch_hash writes long value into int)
# Tested by rein at basefarm dot no
2010-08-18 20:00:18 +00:00
Felipe Pena 2fb2f81538 - Improved fix for bug #52573 2010-08-18 01:59:37 +00:00
Andrey Hristov ed806c4461 here comes the news 2010-08-17 18:10:08 +00:00
Andrey Hristov 2a926ec6ec Fix for Bug #52613 crash in mysqlnd 2010-08-17 18:08:25 +00:00
Andrey Hristov 33c7b63c6c Update with PHP_DEF_FE, also update the test 2010-08-17 18:07:11 +00:00
Kalle Sommer Nielsen a109c3538f Fix my fix for arginfo, trunk patch will follow shortly 2010-08-17 13:34:11 +00:00
Kalle Sommer Nielsen 5a3624221b Fixed the $context parameter on copy() to have an effect (approved for 5.3 by Johannes)
# To not change a PHPAPI in a point release, a new function have been added to support contexts:
# php_copy_file_ctx(), php_copy_file_ex() now simply wraps to that
2010-08-17 12:17:28 +00:00
Kalle Sommer Nielsen a780e73f62 Fix arginfo for copy(), see r302376 for more info 2010-08-16 21:59:42 +00:00
Kalle Sommer Nielsen cee97080d1 Fixed bug #50836 (run_tests.php alerts syntax errors while testing session) 2010-08-16 20:56:00 +00:00
Andrey Hristov c204922c7f Added utf16 and utf32 support, as in MySQL 5.5, in mysqlnd.
Fixed tests, so they don't try to use SET NAMES utf16|utf32,
as character_set_client can't be set to those (the lexer can't
read ucs2, utf16 and utf32).
Added support for 4-byte utf8, as found in MySQL 5.5
2010-08-16 17:44:50 +00:00
Andrey Hristov 0a9ca62a77 Fix test, so it doesn't fail with MySQL 5.5, where InnoDB
is the default engine
2010-08-16 16:15:15 +00:00
Andrey Hristov 4d72dba301 detect easily which charset doesn't work 2010-08-16 16:13:55 +00:00
Derick Rethans e577899507 - Updated to version 2010.12 (2010l) 2010-08-16 12:48:53 +00:00
Pierre Joye 894dc2480c - WS 2010-08-16 10:29:01 +00:00
Andrey Hristov f8e312ea27 Here comes the news 2010-08-16 09:45:26 +00:00
Andrey Hristov 2f2cdc6a51 Sync with trunk, fixes build failure on MacOSX.
Fix for Bug #52417 MySQLi build failure with mysqlnd
2010-08-16 09:44:13 +00:00
Derick Rethans 6c579efc43 - Updated to version 2010.11 (2010k) 2010-08-16 09:32:51 +00:00
Dmitry Stogov 7ca414f5e7 Bug #52361 (Throwing an exception in a destructor causes invalid catching) 2010-08-16 09:20:46 +00:00
Dmitry Stogov 890c709036 Fixed memory leaks (related to bug #52361) 2010-08-16 08:11:08 +00:00
Kalle Sommer Nielsen 61a1bad720 Fixed bug #52593 (exif is placed before mbstring in php.ini) 2010-08-16 00:26:39 +00:00
Pierre Joye 4588d5d79f - #52607, fix ENV conflit with win SDK 7.1 2010-08-15 13:54:03 +00:00
Pierre Joye bb669f2c1b - year++ 2010-08-15 13:40:29 +00:00
Pierre Joye 1bd381890d - #52607, fix ENV conflit with win SDK 7.1 2010-08-15 03:38:08 +00:00
Ilia Alshanetsky bbeafa1dcf Win32 build fixes 2010-08-14 14:47:49 +00:00
Ilia Alshanetsky 842bc947e2 Upgraded bundled Sqlite3 to version 3.7.0.1 2010-08-14 14:44:39 +00:00
Ilia Alshanetsky c5602787fc MFH: Upgraded bundled PCRE to version 8.10. 2010-08-14 14:37:13 +00:00
Felipe Pena c101964325 - Fixed the fix for bug #52546 2010-08-13 22:12:37 +00:00
Kalle Sommer Nielsen e72a69aae6 Changed mysqli_report() to be per-request specific rather than per-process specific (Fixes #52390) 2010-08-13 10:43:15 +00:00
Andrey Hristov a6100682d0 Fix for bug #52413 MySQLi build failure on OS X 2010-08-13 09:57:04 +00:00
Andrey Hristov 973e134d2d Fix for bug #52433 Call to undefined method mysqli::poll() 2010-08-13 09:18:06 +00:00
Sascha Schumann 14edb68858 - fix cast 2010-08-12 17:28:08 +00:00
Andrey Hristov 8409cb44b2 Make this function static, as it is used only in this file.
Add additional comment about how it works.
2010-08-12 14:17:31 +00:00
Andrey Hristov 6fc06f265e Allocate memory in a burst mode, and later use it. Increases
locality of the data.
Also use MYSQLND_INC_CONN_STATISTIC in one place, instead of
two, thus removing code duplication from macro expansion - less
code to fit in the instruction cache.
2010-08-12 13:23:16 +00:00
Andrey Hristov 92ef63a07b Switch from using PHP_MAJOR_VERSION to separate define for
unicode. Unicode is no more, but these are "bookmarks" where
to change mysqlnd, if Unicode becomes trendy again.
2010-08-12 12:02:02 +00:00
Andrey Hristov 8bf7114691 ws + cs 2010-08-12 11:38:08 +00:00
Sascha Schumann 50a0ea7b8c separate properties of internal classes in ZTS mode fully,
otherwise multiple threads will modify the zvals' contents
without any synchronisation.
2010-08-12 07:58:14 +00:00
Kalle Sommer Nielsen 49f22527cc Fixed bug #50804 (Document configure.js --enable-crt-debug) 2010-08-11 22:38:15 +00:00
Kalle Sommer Nielsen 1e4d963734 Ignore the x64 directory for Windows x64 builds 2010-08-11 21:26:09 +00:00
Kalle Sommer Nielsen 1178d719ea Seems like this one skipped the commit (E_ERROR -> E_CORE_ERROR) for zend.ze1_compatibility_mode (re #52570) 2010-08-11 21:18:45 +00:00
Kalle Sommer Nielsen 8deefa8780 Changed deprecated ini options on startup from E_WARNING to E_DEPRECATED (Fixes #52570)
# Trunk patch will follow shortly
2010-08-11 21:12:18 +00:00
Dmitry Stogov 7d55780ca0 In ZTS mode default properties and constants of internal classes can't be modified in place and have to be separated 2010-08-11 09:38:41 +00:00
Felipe Pena 658272c9ee - Fixed bug #52573 (SplFileObject::fscanf Segmentation fault) 2010-08-10 22:37:24 +00:00
Andrey Hristov 0d3d292633 Fix Request #52302 mysqli_fetch_all does not work with MYSQLI_USE_RESULT 2010-08-09 17:29:30 +00:00
Andrey Hristov f8c2680509 Lay foundations for named pipe support in mysqlnd 2010-08-09 17:01:57 +00:00
Pierre Joye cf7d0fb4e7 - #52523, fix logic (0 is perfectly valid as part of the data, bin data) 2010-08-09 08:14:14 +00:00
Pierre Joye 1e26362d4b - WS 2010-08-09 07:32:21 +00:00
Felipe Pena 904b9282fe - Fixed bug #50481 (Storing many SPLFixedArray in an array crashes) 2010-08-08 23:56:29 +00:00
Ilia Alshanetsky 7ab1a74f49 Additional fix for bug #52550 & fix test & warning from previous fixes 2010-08-08 15:45:02 +00:00
Christopher Jones d0dc4810eb Fixed bug #51610 (Using oci_connect causes PHP to take a long time to exit). Do PECL OCI8 1.4.3 release 2010-08-07 00:24:26 +00:00
Felipe Pena afed1468e4 - Added missing SKIPIF 2010-08-06 23:05:39 +00:00
Felipe Pena f4644c8c85 - Fix test 2010-08-06 23:01:32 +00:00
Felipe Pena 07c1929a7a - Fixed bug #52533 (ext/curl/tests/curl_multi_getcontent_basic3.phpt broken due php.net/robots.txt)
patch by: glen at delfi dot ee
2010-08-06 22:57:41 +00:00
Felipe Pena 8be696d143 - Updated generated file 2010-08-06 22:23:10 +00:00
Felipe Pena 7e8ec822a5 - Fix build 2010-08-06 22:21:13 +00:00
Johannes Schlüter 97317c7b1e - ext_skelshould create a .svnignore not .cvsignore these days 2010-08-06 22:19:47 +00:00
Christopher Jones a59ffde6bc Release PECL OCI8 1.4.2 2010-08-06 22:12:48 +00:00
Ilia Alshanetsky fbe6499d46 WS 2010-08-06 20:16:11 +00:00
Ilia Alshanetsky 231d8dd526 Another fix for issue indentified in bug #52550 2010-08-06 20:04:29 +00:00
Ilia Alshanetsky c0edb4afce Fixed issues inside str_pad() identified by bug #52550 2010-08-06 19:55:10 +00:00
David Soria Parra 9d02d50df2 make ssl_set return value in mysqlnd compatible with libmysqli return value 2010-08-06 19:47:03 +00:00
Ilia Alshanetsky 64ceec13f2 Use correct order of operations. Second of many fixes for bug #52550 2010-08-06 19:11:34 +00:00
Rasmus Lerdorf 0d1ab2f6ac Fix 5.3 as well 2010-08-06 18:20:41 +00:00
Felipe Pena f171aefb31 - Fixed bug #52546 (pdo_dblib segmentation fault when iterating MONEY values) 2010-08-05 23:32:18 +00:00
Felipe Pena 1e17bb2aab - Fixed bug #52534 (var_export array with negative key) 2010-08-04 23:11:44 +00:00
Jérôme Loyet 5fe988518a BUG: all value comparaisons were not case insensitive in the conf file parser 2010-08-02 21:46:52 +00:00
Jérôme Loyet c80e055c9c typo 2010-08-02 09:28:54 +00:00
Jérôme Loyet 1c50d5385d correct php-fpm.conf: slowlog has no default value 2010-08-02 09:02:48 +00:00
Felipe Pena 6150174941 - Fixed bug #52468 (wddx_deserialize corrupts integer field value when left empty) 2010-08-01 17:34:09 +00:00
Felipe Pena 3ef14fc609 - Fixed bug #52508 (newline problem with parse_ini_file+INI_SCANNER_RAW) 2010-08-01 15:26:54 +00:00
Felipe Pena c0e6f37cb9 - Fixed bug #52484 (__set() ignores setting properties with empty names) 2010-08-01 13:27:02 +00:00
Felipe Pena cb1d315b7d - Fix tests 2010-07-31 22:10:43 +00:00
Felipe Pena 30a8dcff1b - New test 2010-07-29 23:46:49 +00:00
Felipe Pena e3ddef53b4 - Fixed bug #52487 (PDO::FETCH_INTO leaks memory) 2010-07-29 23:38:55 +00:00
Jérôme Loyet 4445c85d4f - Fixed bug #52476 (move php-fpm man page from section 1 to section 8) 2010-07-29 22:07:00 +00:00
Raphael Geissert 444bba79ba Fix required facilities for php-fpm's init script
$all should only be used in rare, and very specific, cases.
2010-07-29 19:13:42 +00:00
Pierre Joye 110fab9803 - fix build 2010-07-29 11:58:41 +00:00
Sriram Natarajan a0bf0739a9 - Fixed bug #52436 (Compile error in pcre if systems do not have stdint.h)
# PCRE's config.h can very well reuse the definitions made available from
# PHP's configure script output available within php_config.h
2010-07-27 21:42:22 +00:00
Pierre Joye ed4f6dbd36 - make libsasl optional (as vc6 bins do not have it) 2010-07-26 22:28:38 +00:00
Rasmus Lerdorf 94286b35e3 Let's keep NEWS entries to things that might affect users.
A typo in a comment isn't very news-worthy.
2010-07-23 15:52:34 +00:00
Adam Harvey 3aceb07efd MFH: fix bug #52380 (Typo in lcfirst comment docs). 2010-07-23 09:02:14 +00:00
Adam Harvey ebc6982eb8 Correct bug ID in the NEWS file for posterity. 2010-07-23 08:58:03 +00:00
Johannes Schlüter 200b139c69 - Back to -dev 2010-07-22 11:08:31 +00:00
Johannes Schlüter 6212b88ef3 - PHP 5.3.3 2010-07-21 10:50:07 +00:00
Johannes Schlüter 72ff4aac7e - merge NEWS for 5.2.14 and 5.3.3 2010-07-21 09:02:45 +00:00
Pierre Joye 426e14a6ed - add CVE # 2010-07-20 09:26:29 +00:00
Adam Harvey 5ce0bb46f6 MFH: fix for bug #52317 (Segmentation fault when using mail() on a rhel 4.x
(only 64 bit)).
2010-07-19 13:38:53 +00:00
Adam Harvey 2e1cd1e133 Revert r301354, since we don't need a test for a bogus bug. 2010-07-19 09:58:19 +00:00
Kai Schroeder 5126ac9ab0 Test for #50475 2010-07-17 23:29:52 +00:00
Kai Schroeder c11850b406 Test for #51819 2010-07-17 23:20:24 +00:00
Kai Schroeder b1fb44660d Test for #48187 2010-07-17 22:47:13 +00:00
Kai Schroeder 221c71032f Test for #51994 2010-07-17 22:17:48 +00:00
Kai Schroeder d53e8cfb83 Test for #52290 2010-07-17 21:57:16 +00:00
Kai Schroeder ede218d54c Test for #52359 2010-07-17 21:26:01 +00:00
Andrey Hristov a30113b617 Fix for Bug #51583 Bus error due to wrong alignment in mysqlnd 2010-07-15 16:57:14 +00:00
Pierre Joye 1dc9e43cd0 - fix vc6 build 2010-07-15 00:13:20 +00:00
Johannes Schlüter 50554563af Back to -dev 2010-07-14 23:40:42 +00:00
653 changed files with 41345 additions and 35489 deletions

No files matched your search

-14191
View File
File diff suppressed because it is too large. Load diff
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
+24 -12
View File
@@ -279,7 +279,15 @@ ir if
it is your first install then you need to "make install" as well)
13. cd ../php-5.x.y
14. cp php.ini-dist /usr/local/lib/php.ini
14. The PHP distribution provides two sample php.ini files, you can use them
by
cp php.ini-development /usr/local/lib/php.ini
or
cp php.ini-production /usr/local/lib/php.ini
If you choose one of these php.ini files be certain to read the list
of changes within, as they affect how PHP behaves.
15. You can edit /usr/local/lib/php.ini file to set PHP options.
Edit your httpd.conf or srm.conf file and add:
@@ -451,15 +459,19 @@ Apache 2.0 on Unix systems
13. Setup your php.ini
cp php.ini-dist /usr/local/lib/php.ini
The PHP distribution provides two sample php.ini files, you can use them
by
cp php.ini-development /usr/local/lib/php.ini
or
cp php.ini-production /usr/local/lib/php.ini
If you choose one of these php.ini files be certain to read the list
of changes within, as they affect how PHP behaves.
You may edit your .ini file to set PHP options. If you prefer having
php.ini in another location, use --with-config-file-path=/some/path in
step 10.
If you instead choose php.ini-recommended, be certain to read the list
of changes within, as they affect how PHP behaves.
14. Edit your httpd.conf to load the PHP module. The path on the right hand
side of the LoadModule statement must point to the path of the PHP
module on your system. The make install from above may have already
@@ -858,7 +870,7 @@ Using Binary Packages
Example 2-6. OpenBSD Package Install Example
# pkg_add php4-core-4.3.8.tgz
# /usr/local/sbin/phpxs -s
# cp /usr/local/share/doc/php4/php.ini-recommended /var/www/conf/php.ini
# cp /usr/local/share/doc/php4/php.ini-development /var/www/conf/php.ini
(add in mysql)
# pkg_add php4-mysql-4.3.8.tgz
# /usr/local/sbin/phpxs -a mysql
@@ -1242,10 +1254,10 @@ setenv OPTIM=-O2
back to the root of the Apache source directory and run the above
configure command again. That'll bring the link table up to date.
Run make and make install again.
7. Copy and rename the php.ini-dist file to your bin directory from
your PHP 4 source directory: cp php.ini-dist /usr/local/bin/php.ini
or (if your don't have a local directory) cp php.ini-dist
/usr/bin/php.ini.
7. Copy and rename the php.ini-development or php.ini-production file to
your bin directory from your PHP 4 source directory:
cp php.ini-development /usr/local/bin/php.ini or (if your don't have a
local directory) cp php.ini-development /usr/bin/php.ini.
__________________________________________________________________
Compiling for MacOS X Client
@@ -1735,8 +1747,8 @@ cgi error:
example, set it with something like:
--with-config-file-path=/etc
And then you would copy php.ini-dist from the distribution to
/etc/php.ini and edit it to make any local changes you want.
And then you would copy php.ini-development or php.ini-production from the
distribution to /etc/php.ini and edit it to make any local changes you want.
--with-config-file-scan-dir=PATH
On Windows the default path for the php.ini file is the Windows
+1 -1
View File
@@ -1,6 +1,6 @@
--------------------------------------------------------------------
The PHP License, version 3.01
Copyright (c) 1999 - 2009 The PHP Group. All rights reserved.
Copyright (c) 1999 - 2010 The PHP Group. All rights reserved.
--------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
+1
View File
@@ -98,6 +98,7 @@ test: all
TEST_PHP_SRCDIR=$(top_srcdir) \
CC="$(CC)" \
$(PHP_EXECUTABLE) -n -c $(top_builddir)/tmp-php.ini $(PHP_TEST_SETTINGS) $(top_srcdir)/run-tests.php -n -c $(top_builddir)/tmp-php.ini -d extension_dir=$(top_builddir)/modules/ $(PHP_TEST_SHARED_EXTENSIONS) $(TESTS); \
rm $(top_builddir)/tmp-php.ini; \
else \
echo "ERROR: Cannot run tests without CLI sapi."; \
fi
+388 -40
View File
@@ -1,45 +1,359 @@
PHP NEWS
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
15 Jul 2010, PHP 5.3.3 RC3
- Rewrote var_export() to use smart_str rather than output buffering, prevents
data disclosure if a fatal error occurs. (Scott)
09 Dec 2010, PHP 5.3.4
- Upgraded bundled Sqlite3 to version 3.7.3. (Ilia)
- Upgraded bundled PCRE to version 8.10. (Ilia)
- Fixed bug #52262 (json_decode() shows no errors on invalid UTF-8).
(Scott)
- Fixed bug #52240 (hash_copy() does not copy the HMAC key, causes wrong
results and PHP crashes). (Felipe)
- Fixed bug #52238 (Crash when an Exception occured in iterator_to_array).
(Johannes)
- Fixed bug #52037 (Concurrent builds fail in install-programs). (seanius at
debian dot org, Kalle)
- Fixed bug #51943 (AIX: Several files are out of ANSI spec). (Kalle,
coreystup at gmail dot com)
- Fixed bug #51697 (Unsafe operations in free_storage of SPL iterators,
causes crash during shutdown). (Etienne)
- Security enhancements:
. Fixed crash in zip extract method (possible CWE-170).
(Maksymilian Arciemowicz, Pierre)
. Paths with NULL in them (foo\0bar.txt) are now considered as invalid. (Rasmus)
. Fixed a possible double free in imap extension (Identified by Mateusz
Kocielski). (CVE-2010-4150). (Ilia)
. Fixed NULL pointer dereference in ZipArchive::getArchiveComment.
(CVE-2010-3709). (Maksymilian Arciemowicz)
. Fixed possible flaw in open_basedir (CVE-2010-3436). (Pierre)
. Fixed MOPS-2010-24, fix string validation. (CVE-2010-2950). (Pierre)
. Fixed symbolic resolution support when the target is a DFS share. (Pierre)
. Fixed bug #52929 (Segfault in filter_var with FILTER_VALIDATE_EMAIL with
large amount of data) (CVE-2010-3710). (Adam)
01 Jul 2010, PHP 5.3.3 RC2
- Fixed SplObjectStorage unserialization problems (CVE-2010-2225). (Stas)
- General improvements:
. Added stat support for zip stream. (Pierre)
. Added follow_location (enabled by default) option for the http stream
support. (Pierre)
. Improved support for is_link and related functions on Windows. (Pierre)
. Added a 3rd parameter to get_html_translation_table. It now takes a charset
hint, like htmlentities et al. (Gustavo)
- Implemented feature requests:
. Implemented FR #52348, added new constant ZEND_MULTIBYTE to detect
zend multibyte at runtime. (Kalle)
. Implemented FR #52173, added functions pcntl_get_last_error() and
pcntl_strerror(). (nick dot telford at gmail dot com, Arnaud)
. Implemented symbolic links support for open_basedir checks. (Pierre)
. Implemented FR #51804, SplFileInfo::getLinkTarget on Windows. (Pierre)
. Implemented FR #50692, not uploaded files don't count towards
max_file_uploads limit. As a side improvement, temporary files are not opened
for empty uploads and, in debug mode, 0-length uploads. (Gustavo)
- Improved MySQLnd:
. Added new character sets to mysqlnd, which are available in MySQL 5.5
(Andrey)
- Implemented FR #51295 (SQLite3::busyTimeout not existing). (Mark)
- Improved PHP-FPM SAPI:
. Added '-p/--prefix' to php-fpm to use a custom prefix and run multiple
instances. (fat)
. Added custom process title for FPM. (fat)
. Added '-t/--test' to php-fpm to check and validate FPM conf file. (fat)
. Added statistics about listening socket queue length for FPM.
(andrei dot nigmatulin at gmail dot com, fat)
- Core:
. Fixed extract() to do not overwrite $GLOBALS and $this when using
EXTR_OVERWRITE. (jorto at redhat dot com)
. Fixed bug in the Windows implementation of dns_get_record, where the two
last parameters wouldn't be filled unless the type were DNS_ANY (Gustavo).
. Changed the $context parameter on copy() to actually have an effect. (Kalle)
. Fixed htmlentities/htmlspecialchars accepting certain ill-formed UTF-8
sequences. (Gustavo)
. Fixed bug #53409 (sleep() returns NULL on Windows). (Pierre)
. Fixed bug #53319 (strip_tags() may strip '<br />' incorrectly). (Felipe)
. Fixed bug #53304 (quot_print_decode does not handle lower-case hex digits).
(Ilia, daniel dot mueller at inexio dot net)
. Fixed bug #53248 (rawurlencode RFC 3986 EBCDIC support misses tilde char).
(Justin Martin)
. Fixed bug #53226 (file_exists fails on big filenames). (Adam)
. Fixed bug #53198 (changing INI setting "from" with ini_set did not have any
effect). (Gustavo)
. Fixed bug #53180 (post_max_size=0 not disabling the limit when the content
type is application/x-www-form-urlencoded or is not registered with PHP).
(gm at tlink dot de, Gustavo)
. Fixed bug #53141 (autoload misbehaves if called from closing session).
(ladislav at marek dot su)
. Fixed bug #53021 (In html_entity_decode, failure to convert numeric entities
with ENT_NOQUOTES and ISO-8859-1). Fixed and extended the fix of ENT_NOQUOTES
in html_entity_decode that had introduced the bug (rev #185591) to other
encodings. Additionaly, html_entity_decode() now doesn't decode &#34; if
ENT_NOQUOTES is given. (Gustavo)
. Fixed bug #52931 (strripos not overloaded with function overloading enabled).
(Felipe)
. Fixed bug #52772 (var_dump() doesn't check for the existence of
get_class_name before calling it). (Kalle, Gustavo)
. Fixed bug #52534 (var_export array with negative key). (Felipe)
. Fixed bug #52327 (base64_decode() improper handling of leading padding in
strict mode). (Ilia)
. Fixed bug #52260 (dns_get_record fails with non-existing domain on Windows).
(a_jelly_doughnut at phpbb dot com, Pierre)
. Fixed bug #50953 (socket will not connect to IPv4 address when the host has
both IPv4 and IPv6 addresses, on Windows). (Gustavo, Pierre)
. Fixed bug #50524 (proc_open on Windows does not respect cwd as it does on
other platforms). (Pierre)
. Fixed bug #49687 (utf8_decode vulnerabilities and deficiencies in the number
of reported malformed sequences). (CVE-2010-3870) (Gustavo)
. Fixed bug #49407 (get_html_translation_table doesn't handle UTF-8). (Gustavo)
. Fixed bug #48831 (php -i has different output to php --ini). (Richard,
Pierre)
. Fixed bug #47643 (array_diff() takes over 3000 times longer than php 5.2.4).
(Felipe)
. Fixed bug #47168 (printf of floating point variable prints maximum of 40
decimal places). (Ilia)
. Fixed bug #46587 (mt_rand() does not check that max is greater than min).
(Ilia)
. Fixed bug #29085 (bad default include_path on Windows). (Pierre)
. Fixed bug #25927 (get_html_translation_table calls the ' &#39; instead of
&#039;). (Gustavo)
- Zend engine:
. Reverted fix for bug #51176 (Static calling in non-static method behaves
like $this->). (Felipe)
. Changed deprecated ini options on startup from E_WARNING to E_DEPRECATED.
(Kalle)
. Fixed NULL dereference in lex_scan on zend multibyte builds where the script
had a flex incompatible encoding and there was no converter. (Gustavo)
. Fixed covariance of return-by-ref constraints. (Etienne)
. Fixed bug #53305 (E_NOTICE when defining a constant starts with
__COMPILER_HALT_OFFSET__). (Felipe)
. Fixed bug #52939 (zend_call_function does not respect ZEND_SEND_PREFER_REF).
(Dmitry)
. Fixed bug #52879 (Objects unreferenced in __get, __set, __isset or __unset
can be freed too early). (mail_ben_schmidt at yahoo dot com dot au, Dmitry)
. Fixed bug #52786 (PHP should reset section to [PHP] after ini sections).
(Fedora at famillecollet dot com)
. Fixed bug #52508 (newline problem with parse_ini_file+INI_SCANNER_RAW).
(Felipe)
. Fixed bug #52484 (__set() ignores setting properties with empty names).
(Felipe)
. Fixed bug #52361 (Throwing an exception in a destructor causes invalid
catching). (Dmitry)
. Fixed bug #51008 (Zend/tests/bug45877.phpt fails). (Dmitry)
- Build issues:
. Fixed bug #52436 (Compile error if systems do not have stdint.h)
(Sriram Natarajan)
. Fixed bug #50345 (nanosleep not detected properly on some solaris versions).
(Ulf, Tony)
. Fixed bug #49215 (make fails on glob_wrapper). (Felipe)
- Fixed the mail.log ini setting when no filename was given. (Johannes)
- Calendar extension:
. Fixed bug #52744 (cal_days_in_month incorrect for December 1 BCE).
(gpap at internet dot gr, Adam)
- cURL extension:
. Fixed bug #52828 (curl_setopt does not accept persistent streams).
(Gustavo, Ilia)
. Fixed bug #52827 (cURL leaks handle and causes assertion error
(CURLOPT_STDERR)). (Gustavo)
. Fixed bug #52202 (CURLOPT_PRIVATE gets corrupted). (Ilia)
. Fixed bug #50410 (curl extension slows down PHP on Windows). (Pierre)
- DateTime extension:
. Fixed bug #53297 (gettimeofday implementation in php/win32/time.c can return
1 million microsecs). (ped at 7gods dot org)
. Fixed bug #52668 (Iterating over a dateperiod twice is broken). (Derick)
. Fixed bug #52454 (Relative dates and getTimestamp increments by one day).
(Derick)
. Fixed bug #52430 (date_parse parse 24:xx:xx as valid time). (Derick)
. Added support for the ( and ) delimiters/separators to
DateTime::createFromFormat(). (Derick)
- Fixed bug #52193 (converting closure to array yields empty array). (Felipe)
- Fixed bug #52183 (Reflectionfunction reports invalid number of arguments for
function aliases). (Felipe)
- Fixed bug #52162 (custom request header variables with numbers are removed).
(Sriram Natarajan)
- Fixed bug #52160 (Invalid E_STRICT redefined constructor error). (Felipe)
- Fixed bug #52138 (Constants are parsed into the ini file for section names).
(Felipe)
- Fixed bug #52115 (mysqli_result::fetch_all returns null, not an empty array).
(Andrey)
- Fixed bug #49216 (Reflection doesn't seem to work properly on MySqli). (Andrey)
- Fixed bug #48930 (__COMPILER_HALT_OFFSET__ incorrect in PHP >= 5.3). (Felipe)
- Fixed bug #33210 (getimagesize() fails to detect width/height on certain
JPEGs). (Ilia)
- DBA extension:
. Added Berkeley DB 5.1 support to the DBA extension. (Oracle Corp.)
17 Jun 2010, PHP 5.3.3 RC1
- DOM extension:
. Fixed bug #52656 (DOMCdataSection does not work with splitText). (Ilia)
- Filter extension:
. Fixed the filter extension accepting IPv4 octets with a leading 0 as that
belongs to the unsupported "dotted octal" representation. (Gustavo)
. Fixed bug #53236 (problems in the validation of IPv6 addresses with leading
and trailing :: in the filter extension). (Gustavo)
. Fixed bug #50117 (problems in the validation of IPv6 addresses with IPv4
addresses and ::). (Gustavo)
- GD extension:
. Fixed bug #53492 (fix crash if anti-aliasing steps are invalid). (Pierre)
- GMP extension:
. Fixed bug #52906 (gmp_mod returns negative result when non-negative is
expected). (Stas)
. Fixed bug #52849 (GNU MP invalid version match). (Adam)
- Hash extension:
. Fixed bug #51003 (unaligned memory access in ext/hash/hash_tiger.c).
(Mike, Ilia)
- Iconv extension:
. Fixed bug #52941 (The 'iconv_mime_decode_headers' function is skipping
headers). (Adam)
. Fixed bug #52599 (iconv output handler outputs incorrect content type
when flags are used). (Ilia)
. Fixed bug #51250 (iconv_mime_decode() does not ignore malformed Q-encoded
words). (Ilia)
- Intl extension:
. Fixed crashes on invalid parameters in intl extension. (CVE-2010-4409). (Stas, Maksymilian
Arciemowicz)
. Added support for formatting the timestamp stored in a DateTime object.
(Stas)
. Fixed bug #50590 (IntlDateFormatter::parse result is limited to the integer
range). (Stas)
- Mbstring extension:
. Fixed bug #53273 (mb_strcut() returns garbage with the excessive length
parameter). (CVE-2010-4156) (Mateusz Kocielski, Pierre, Moriyoshi)
. Fixed bug #52981 (Unicode casing table was out-of-date. Updated with
UnicodeData-6.0.0d7.txt and included the source of the generator program with
the distribution) (Gustavo).
. Fixed bug #52681 (mb_send_mail() appends an extra MIME-Version header).
(Adam)
- MSSQL extension:
. Fixed possible crash in mssql_fetch_batch(). (Kalle)
. Fixed bug #52843 (Segfault when optional parameters are not passed in to
mssql_connect). (Felipe)
- MySQL extension:
. Fixed bug #52636 (php_mysql_fetch_hash writes long value into int).
(Kalle, rein at basefarm dot no)
- MySQLi extension:
. Fixed bug #52891 (Wrong data inserted with mysqli/mysqlnd when using
mysqli_stmt_bind_param and value> PHP_INT_MAX). (Andrey)
. Fixed bug #52686 (mysql_stmt_attr_[gs]et argument points to incorrect type).
(rein at basefarm dot no)
. Fixed bug #52654 (mysqli doesn't install headers with structures it uses).
(Andrey)
. Fixed bug #52433 (Call to undefined method mysqli::poll() - must be static).
(Andrey)
. Fixed bug #52417 (MySQLi build failure with mysqlnd on MacOS X). (Andrey)
. Fixed bug #52413 (MySQLi/libmysql build failure on OS X, FreeBSD). (Andrey)
. Fixed bug #52390 (mysqli_report() should be per-request setting). (Kalle)
. Fixed bug #52302 (mysqli_fetch_all does not work with MYSQLI_USE_RESULT).
(Andrey)
. Fixed bug #52221 (Misbehaviour of magic_quotes_runtime (get/set)). (Andrey)
. Fixed bug #45921 (Can't initialize character set hebrew). (Andrey)
- MySQLnd:
. Fixed bug #52613 (crash in mysqlnd after hitting memory limit). (Andrey)
- ODBC extension:
- Fixed bug #52512 (Broken error handling in odbc_execute).
(mkoegler at auto dot tuwien dot ac dot at)
- Openssl extension:
. Fixed possible blocking behavior in openssl_random_pseudo_bytes on Windows.
(Pierre)
. Fixed bug #53136 (Invalid read on openssl_csr_new()). (Felipe)
. Fixed bug #52947 (segfault when ssl stream option capture_peer_cert_chain
used). (Felipe)
- Oracle Database extension (OCI8):
. Fixed bug #53284 (Valgrind warnings in oci_set_* functions) (Oracle Corp.)
. Fixed bug #51610 (Using oci_connect causes PHP to take a long time to
exit). Requires Oracle 11.2.0.2 client libraries (or Oracle bug fix
9891199) for this patch to have an effect. (Oracle Corp.)
- PCNTL extension:
. Fixed bug #52784 (Race condition when handling many concurrent signals).
(nick dot telford at gmail dot com, Arnaud)
- PCRE extension:
. Fixed bug #52971 (PCRE-Meta-Characters not working with utf-8). (Felipe)
. Fixed bug #52732 (Docs say preg_match() returns FALSE on error, but it
returns int(0)). (slugonamission at gmail dot com)
- PHAR extension:
. Fixed bug #50987 (unaligned memory access in phar.c).
(geissert at debian dot org, Ilia)
- PHP-FPM SAPI:
. Fixed bug #53412 (segfault when using -y). (fat)
. Fixed inconsistent backlog default value (-1) in FPM on many systems. (fat)
. Fixed bug #52501 (libevent made FPM crashed when forking -- libevent has
been removed). (fat)
. Fixed bug #52725 (gcc builtin atomic functions were sometimes used when they
were not available). (fat)
. Fixed bug #52693 (configuration file errors are not logged to stderr). (fat)
. Fixed bug #52674 (FPM Status page returns inconsistent Content-Type headers).
(fat)
. Fixed bug #52498 (libevent was not only linked to php-fpm). (fat)
- PDO:
. Fixed bug #52699 (PDO bindValue writes long int 32bit enum).
(rein at basefarm dot no)
. Fixed bug #52487 (PDO::FETCH_INTO leaks memory). (Felipe)
- PDO DBLib driver:
. Fixed bug #52546 (pdo_dblib segmentation fault when iterating MONEY values).
(Felipe)
- PDO Firebird driver:
. Restored firebird support (VC9 builds only). (Pierre)
. Fixed bug #53335 (pdo_firebird did not implement rowCount()).
(preeves at ibphoenix dot com)
. Fixed bug #53323 (pdo_firebird getAttribute() crash).
(preeves at ibphoenix dot com)
- PDO MySQL driver:
. Fixed bug #52745 (Binding params doesn't work when selecting a date inside a
CASE-WHEN). (Andrey)
- PostgreSQL extension:
. Fixed bug #47199 (pg_delete() fails on NULL). (ewgraf at gmail dot com)
- Reflection extension:
. Fixed ReflectionProperty::isDefault() giving a wrong result for properties
obtained with ReflectionClass::getProperties(). (Gustavo)
- Reflection extension:
. Fixed bug #53366 (Reflection doesnt get dynamic property value from
getProperty()). (Felipe)
. Fixed bug #52854 (ReflectionClass::newInstanceArgs does not work for classes
without constructors). (Johannes)
- SOAP extension:
. Fixed bug #44248 (RFC2616 transgression while HTTPS request through proxy
with SoapClient object). (Dmitry)
- SPL extension:
. Fixed bug #53362 (Segmentation fault when extending SplFixedArray). (Felipe)
. Fixed bug #53279 (SplFileObject doesn't initialise default CSV escape
character). (Adam)
. Fixed bug #53144 (Segfault in SplObjectStorage::removeAll()). (Felipe)
. Fixed bug #53071 (SPLObjectStorage defeats gc_collect_cycles). (Gustavo)
. Fixed bug #52573 (SplFileObject::fscanf Segmentation fault). (Felipe)
. Fixed bug #51763 (SplFileInfo::getType() does not work symbolic link
and directory). (Pierre)
. Fixed bug #50481 (Storing many SPLFixedArray in an array crashes). (Felipe)
. Fixed bug #50579 (RegexIterator::REPLACE doesn't work). (Felipe)
- SQLite3 extension:
. Fixed bug #53463 (sqlite3 columnName() segfaults on bad column_number).
(Felipe)
- Streams:
. Fixed forward stream seeking emulation in streams that don't support seeking
in situations where the read operation gives back less data than requested
and when there was data in the buffer before the emulation started. Also made
more consistent its behavior -- should return failure every time less data
than was requested was skipped. (Gustavo)
. Fixed bug #53241 (stream casting that relies on fdopen/fopencookie fails
with streams opened with, inter alia, the 'xb' mode). (Gustavo)
. Fixed bug #53006 (stream_get_contents has an unpredictable behavior when the
underlying stream does not support seeking). (Gustavo)
. Fixed bug #52944 (Invalid write on second and subsequent reads with an
inflate filter fed invalid data). (Gustavo)
. Fixed bug #52820 (writes to fopencookie FILE* not commited when seeking the
stream). (Gustavo)
- WDDX extension:
. Fixed bug #52468 (wddx_deserialize corrupts integer field value when left
empty). (Felipe)
- Zlib extension:
. Fixed bug #52926 (zlib fopen wrapper does not use context). (Gustavo)
22 Jul 2010, PHP 5.3.3
- Upgraded bundled sqlite to version 3.6.23.1. (Ilia)
- Upgraded bundled PCRE to version 8.02. (Ilia)
@@ -68,8 +382,11 @@ PHP NEWS
__construct now. (Stas)
- Reset error state in PDO::beginTransaction() reset error state. (Ilia)
- Implemented FR#51295 (SQLite3::busyTimeout not existing). (Mark)
- Implemented FR#35638 (Adding udate to imap_fetch_overview results).
(Charles_Duffy at dell dot com )
- Rewrote var_export() to use smart_str rather than output buffering, prevents
data disclosure if a fatal error occurs (CVE-2010-2531). (Scott)
- Fixed possible buffer overflows in mysqlnd_list_fields, mysqlnd_change_user.
(Andrey)
- Fixed possible buffer overflows when handling error packets in mysqlnd.
@@ -112,9 +429,27 @@ PHP NEWS
- Fixed a NULL pointer dereference when processing invalid XML-RPC
requests (Fixes CVE-2010-0397, bug #51288). (Raphael Geissert)
- Fixed 64-bit integer overflow in mhash_keygen_s2k(). (Clément LECIGNE, Stas)
- Fixed SplObjectStorage unserialization problems (CVE-2010-2225). (Stas)
- Fixed the mail.log ini setting when no filename was given. (Johannes)
- Fixed bug #45808 (stream_socket_enable_crypto() blocks and eats CPU).
(vincent at optilian dot com)
- Fixed bug #52317 (Segmentation fault when using mail() on a rhel 4.x (only 64
bit)). (Adam)
- Fixed bug #52262 (json_decode() shows no errors on invalid UTF-8).
(Scott)
- Fixed bug #52240 (hash_copy() does not copy the HMAC key, causes wrong
results and PHP crashes). (Felipe)
- Fixed bug #52238 (Crash when an Exception occured in iterator_to_array).
(Johannes)
- Fixed bug #52193 (converting closure to array yields empty array). (Felipe)
- Fixed bug #52183 (Reflectionfunction reports invalid number of arguments for
function aliases). (Felipe)
- Fixed bug #52162 (custom request header variables with numbers are removed).
(Sriram Natarajan)
- Fixed bug #52160 (Invalid E_STRICT redefined constructor error). (Felipe)
- Fixed bug #52138 (Constants are parsed into the ini file for section names).
(Felipe)
- Fixed bug #52115 (mysqli_result::fetch_all returns null, not an empty array).
(Andrey)
- Fixed bug #52101 (dns_get_record() garbage in 'ipv6' field on Windows).
(Pierre)
- Fixed bug #52082 (character_set_client & character_set_connection reset after
@@ -128,12 +463,16 @@ PHP NEWS
- Fixed bug #52057 (ReflectionClass fails on Closure class). (Felipe)
- Fixed bug #52051 (handling of case sensitivity of old-style constructors
changed in 5.3+). (Felipe)
- Fixed bug #52037 (Concurrent builds fail in install-programs). (seanius at
debian dot org, Kalle)
- Fixed bug #52019 (make lcov doesn't support TESTS variable anymore). (Patrick)
- Fixed bug #52010 (open_basedir restrictions mismatch on vacuum command).
(Ilia)
- Fixed bug #52001 (Memory allocation problems after using variable variables).
(Dmitry)
- Fixed bug #51991 (spl_autoload and *nix support with namespace). (Felipe)
- Fixed bug #51943 (AIX: Several files are out of ANSI spec). (Kalle,
coreystup at gmail dot com)
- Fixed bug #51911 (ReflectionParameter::getDefaultValue() memory leaks with
constant array). (Felipe)
- Fixed bug #51905 (ReflectionParameter fails if default value is an array
@@ -156,6 +495,8 @@ PHP NEWS
(David Zuelke)
- Fixed bug #51712 (Test mysql_mysqlnd_read_timeout_long must fail on MySQL4).
(Andrey)
- Fixed bug #51697 (Unsafe operations in free_storage of SPL iterators,
causes crash during shutdown). (Etienne)
- Fixed bug #51690 (Phar::setStub looks for case-sensitive
__HALT_COMPILER()). (Ilia)
- Fixed bug #51688 (ini per dir crashes when invalid document root are given).
@@ -182,6 +523,7 @@ PHP NEWS
- Fixed bug #51604 (newline in end of header is shown in start of message).
(Daniel Egeberg)
- Fixed bug #51590 (JSON_ERROR_UTF8 is undefined). (Felipe)
- Fixed bug #51583 (Bus error due to wrong alignment in mysqlnd). (Rainer Jung)
- Fixed bug #51582 (Don't assume UINT64_C it's ever available).
(reidrac at usebox dot net, Pierre)
- Fixed bug #51577 (Uninitialized memory reference with oci_bind_array_by_name)
@@ -245,8 +587,6 @@ PHP NEWS
com, Pierre)
- Fixed bug #50578 (incorrect shebang in phar.phar). (Fedora at FamilleCollet
dot com)
- Fixed bug #50555 (DateTime::sub() allows 'relative' time modifications).
(Derick)
- Fixed bug #50392 (date_create_from_format enforces 6 digits for 'u' format
character). (Derick)
- Fixed bug #50383 (Exceptions thrown in __call / __callStatic do not include
@@ -254,6 +594,8 @@ PHP NEWS
- Fixed bug #50358 (Compile failure compiling ext/phar/util.lo). (Felipe)
- Fixed bug #50101 (name clash between global and local variable).
(patch by yoarvi at gmail dot com)
- Fixed bug #50055 (DateTime::sub() allows 'relative' time modifications).
(Derick)
- Fixed bug #51002 (fix possible memory corruption with very long names).
(Pierre)
- Fixed bug #49893 (Crash while creating an instance of Zend_Mail_Storage_Pop3).
@@ -268,12 +610,15 @@ PHP NEWS
- Fixed bug #49429 (odbc_autocommit doesn't work). (Felipe)
- Fixed bug #49320 (PDO returns null when SQLite connection fails). (Felipe)
- Fixed bug #49234 (mysqli_ssl_set not found). (Andrey)
- Fixed bug #49216 (Reflection doesn't seem to work properly on MySqli).
(Andrey)
- Fixed bug #49192 (PHP crashes when GC invoked on COM object). (Stas)
- Fixed bug #49081 (DateTime::diff() mistake if start in January and interval >
28 days). (Derick)
- Fixed bug #49059 (DateTime::diff() repeats previous sub() operation).
(yoarvi@gmail.com, Derick)
- Fixed bug #48983 (DomDocument : saveHTMLFile wrong charset). (Rob)
- Fixed bug #48930 (__COMPILER_HALT_OFFSET__ incorrect in PHP >= 5.3). (Felipe)
- Fixed bug #48902 (Timezone database fallback map is outdated). (Derick)
- Fixed bug #48781 (Cyclical garbage collector memory leak). (Dmitry)
- Fixed bug #48601 (xpath() returns FALSE for legitimate query). (Rob)
@@ -283,9 +628,12 @@ PHP NEWS
(Adam, patch from hiroaki dot kawai at gmail dot com).
- Fixed bug #47842 (sscanf() does not support 64-bit values). (Mike)
- Fixed bug #46111 (Some timezone identifiers can not be parsed). (Derick)
- Fixed bug #45808 (stream_socket_enable_crypto() blocks and eats CPU).
(vincent at optilian dot com)
- Fixed bug #43233 (sasl support for ldap on Windows). (Pierre)
- Fixed bug #35673 (formatOutput does not work with saveHTML). (Rob)
- Fixed bug #33210 (getimagesize() fails to detect width/height on certain
JPEGs). (Ilia)
04 Mar 2010, PHP 5.3.2
+213 -86
View File
@@ -14,6 +14,7 @@
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Sascha Schumann <sascha@schumann.cx> |
| Pierre Joye <pierre@php.net> |
+----------------------------------------------------------------------+
*/
@@ -38,6 +39,18 @@
# ifndef IO_REPARSE_TAG_SYMLINK
# define IO_REPARSE_TAG_SYMLINK 0xA000000C
# endif
# ifndef VOLUME_NAME_NT
# define VOLUME_NAME_NT 0x2
# endif
# ifndef VOLUME_NAME_DOS
# define VOLUME_NAME_DOS 0x0
# endif
#endif
#ifndef S_IFLNK
# define S_IFLNK 0120000
#endif
#ifdef NETWARE
@@ -83,14 +96,14 @@ cwd_state main_cwd_state; /* True global */
#include <tchar.h>
#define tsrm_strtok_r(a,b,c) _tcstok((a),(b))
#define TOKENIZER_STRING "/\\"
static int php_check_dots(const char *element, int n)
static int php_check_dots(const char *element, int n)
{
while (n-- > 0) if (element[n] != '.') break;
return (n != -1);
}
#define IS_DIRECTORY_UP(element, len) \
(len >= 2 && !php_check_dots(element, len))
@@ -124,7 +137,7 @@ static int php_check_dots(const char *element, int n)
/* define this to check semantics */
#define IS_DIR_OK(s) (1)
#ifndef IS_DIR_OK
#define IS_DIR_OK(state) (php_is_dir_ok(state) == 0)
#endif
@@ -137,7 +150,7 @@ static int php_check_dots(const char *element, int n)
#define CWD_STATE_FREE(s) \
free((s)->cwd);
#ifdef TSRM_WIN32
#ifdef CTL_CODE
@@ -202,21 +215,98 @@ static inline time_t FileTimeToUnixTime(const FILETIME FileTime)
return (time_t)UnixTime;
}
CWD_API int php_sys_readlink(const char *link, char *target, size_t target_len){ /* {{{ */
HINSTANCE kernel32;
HANDLE hFile;
DWORD dwRet;
typedef BOOL (WINAPI *gfpnh_func)(HANDLE, LPTSTR, DWORD, DWORD);
gfpnh_func pGetFinalPathNameByHandle;
kernel32 = LoadLibrary("kernel32.dll");
if (kernel32) {
pGetFinalPathNameByHandle = (gfpnh_func)GetProcAddress(kernel32, "GetFinalPathNameByHandleA");
if (pGetFinalPathNameByHandle == NULL) {
return -1;
}
} else {
return -1;
}
hFile = CreateFile(link, // file to open
GENERIC_READ, // open for reading
FILE_SHARE_READ, // share for reading
NULL, // default security
OPEN_EXISTING, // existing file only
FILE_FLAG_BACKUP_SEMANTICS, // normal file
NULL); // no attr. template
if( hFile == INVALID_HANDLE_VALUE) {
return -1;
}
dwRet = pGetFinalPathNameByHandle(hFile, target, MAXPATHLEN, VOLUME_NAME_DOS);
if(dwRet >= MAXPATHLEN) {
return -1;
}
CloseHandle(hFile);
if(dwRet > 4) {
/* Skip first 4 characters if they are "\??\" */
if(target[0] == '\\' && target[1] == '\\' && target[2] == '?' && target[3] == '\\') {
char tmp[MAXPATHLEN];
unsigned int offset = 4;
dwRet -= 4;
/* \??\UNC\ */
if (dwRet > 7 && target[4] == 'U' && target[5] == 'N' && target[6] == 'C') {
offset += 2;
dwRet -= 2;
target[offset] = '\\';
}
memcpy(tmp, target + offset, dwRet);
memcpy(target, tmp, dwRet);
}
}
target[dwRet] = '\0';
return dwRet;
}
/* }}} */
CWD_API int php_sys_stat(const char *path, struct stat *buf) /* {{{ */
{
return php_sys_stat_ex(path, buf, 0);
}
/* }}} */
CWD_API int php_sys_lstat(const char *path, struct stat *buf) /* {{{ */
{
return php_sys_stat_ex(path, buf, 1);
}
/* }}} */
CWD_API int php_sys_stat_ex(const char *path, struct stat *buf, int lstat) /* {{{ */
{
WIN32_FILE_ATTRIBUTE_DATA data;
__int64 t;
const size_t path_len = strlen(path);
if (!GetFileAttributesEx(path, GetFileExInfoStandard, &data)) {
return stat(path, buf);
}
if (path[1] == ':') {
if (path_len >= 1 && path[1] == ':') {
if (path[0] >= 'A' && path[0] <= 'Z') {
buf->st_dev = buf->st_rdev = path[0] - 'A';
} else {
buf->st_dev = buf->st_rdev = path[0] - 'a';
}
} else if (IS_UNC_PATH(path, path_len)) {
buf->st_dev = buf->st_rdev = 0;
} else {
char cur_path[MAXPATHLEN+1];
DWORD len = sizeof(cur_path);
@@ -245,19 +335,56 @@ CWD_API int php_sys_stat(const char *path, struct stat *buf) /* {{{ */
}
if (tmp != cur_path) {
free(tmp);
}
}
}
buf->st_uid = buf->st_gid = buf->st_ino = 0;
buf->st_mode = (data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ? (S_IFDIR|S_IEXEC|(S_IEXEC>>3)|(S_IEXEC>>6)) : S_IFREG;
buf->st_mode |= (data.dwFileAttributes & FILE_ATTRIBUTE_READONLY) ? (S_IREAD|(S_IREAD>>3)|(S_IREAD>>6)) : (S_IREAD|(S_IREAD>>3)|(S_IREAD>>6)|S_IWRITE|(S_IWRITE>>3)|(S_IWRITE>>6));
if (lstat && data.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) {
/* File is a reparse point. Get the target */
HANDLE hLink = NULL;
REPARSE_DATA_BUFFER * pbuffer;
unsigned int retlength = 0;
TSRM_ALLOCA_FLAG(use_heap_large);
hLink = CreateFile(path, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_FLAG_OPEN_REPARSE_POINT|FILE_FLAG_BACKUP_SEMANTICS, NULL);
if(hLink == INVALID_HANDLE_VALUE) {
return -1;
}
pbuffer = (REPARSE_DATA_BUFFER *)tsrm_do_alloca(MAXIMUM_REPARSE_DATA_BUFFER_SIZE, use_heap_large);
if(!DeviceIoControl(hLink, FSCTL_GET_REPARSE_POINT, NULL, 0, pbuffer, MAXIMUM_REPARSE_DATA_BUFFER_SIZE, &retlength, NULL)) {
tsrm_free_alloca(pbuffer, use_heap_large);
CloseHandle(hLink);
return -1;
}
CloseHandle(hLink);
if(pbuffer->ReparseTag == IO_REPARSE_TAG_SYMLINK) {
buf->st_mode = S_IFLNK;
buf->st_mode |= (data.dwFileAttributes & FILE_ATTRIBUTE_READONLY) ? (S_IREAD|(S_IREAD>>3)|(S_IREAD>>6)) : (S_IREAD|(S_IREAD>>3)|(S_IREAD>>6)|S_IWRITE|(S_IWRITE>>3)|(S_IWRITE>>6));
}
#if 0 /* Not used yet */
else if(pbuffer->ReparseTag == IO_REPARSE_TAG_MOUNT_POINT) {
buf->st_mode |=;
}
#endif
tsrm_free_alloca(pbuffer, use_heap_large);
} else {
buf->st_mode = (data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ? (S_IFDIR|S_IEXEC|(S_IEXEC>>3)|(S_IEXEC>>6)) : S_IFREG;
buf->st_mode |= (data.dwFileAttributes & FILE_ATTRIBUTE_READONLY) ? (S_IREAD|(S_IREAD>>3)|(S_IREAD>>6)) : (S_IREAD|(S_IREAD>>3)|(S_IREAD>>6)|S_IWRITE|(S_IWRITE>>3)|(S_IWRITE>>6));
}
if ((data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0) {
int len = strlen(path);
if (path[len-4] == '.') {
if (_memicmp(path+len-3, "exe", 3) == 0 ||
_memicmp(path+len-3, "com", 3) == 0 ||
_memicmp(path+len-3, "bat", 3) == 0 ||
_memicmp(path+len-3, "cmd", 3) == 0) {
_memicmp(path+len-3, "com", 3) == 0 ||
_memicmp(path+len-3, "bat", 3) == 0 ||
_memicmp(path+len-3, "cmd", 3) == 0) {
buf->st_mode |= (S_IEXEC|(S_IEXEC>>3)|(S_IEXEC>>6));
}
}
@@ -332,7 +459,7 @@ CWD_API void virtual_cwd_startup(void) /* {{{ */
}
}
#else
result = getcwd(cwd, sizeof(cwd));
result = getcwd(cwd, sizeof(cwd));
#endif
if (!result) {
cwd[0] = '\0';
@@ -383,7 +510,7 @@ CWD_API char *virtual_getcwd_ex(size_t *length TSRMLS_DC) /* {{{ */
*length = 1;
retval = (char *) malloc(2);
retval[0] = DEFAULT_SLASH;
retval[1] = '\0';
retval[1] = '\0';
return retval;
}
@@ -493,7 +620,7 @@ CWD_API void realpath_cache_del(const char *path, int path_len TSRMLS_DC) /* {{{
while (*bucket != NULL) {
if (key == (*bucket)->key && path_len == (*bucket)->path_len &&
memcmp(path, (*bucket)->path, path_len) == 0) {
memcmp(path, (*bucket)->path, path_len) == 0) {
realpath_cache_bucket *r = *bucket;
*bucket = (*bucket)->next;
CWDG(realpath_cache_size) -= sizeof(realpath_cache_bucket) + r->path_len + 1 + r->realpath_len + 1;
@@ -510,9 +637,9 @@ static inline void realpath_cache_add(const char *path, int path_len, const char
{
long size = sizeof(realpath_cache_bucket) + path_len + 1;
int same = 1;
if (realpath_len != path_len ||
memcmp(path, realpath, path_len) != 0) {
memcmp(path, realpath, path_len) != 0) {
size += realpath_len + 1;
same = 0;
}
@@ -570,7 +697,7 @@ static inline realpath_cache_bucket* realpath_cache_find(const char *path, int p
CWDG(realpath_cache_size) -= sizeof(realpath_cache_bucket) + r->path_len + 1 + r->realpath_len + 1;
free(r);
} else if (key == (*bucket)->key && path_len == (*bucket)->path_len &&
memcmp(path, (*bucket)->path, path_len) == 0) {
memcmp(path, (*bucket)->path, path_len) == 0) {
return *bucket;
} else {
bucket = &(*bucket)->next;
@@ -582,21 +709,21 @@ static inline realpath_cache_bucket* realpath_cache_find(const char *path, int p
CWD_API realpath_cache_bucket* realpath_cache_lookup(const char *path, int path_len, time_t t TSRMLS_DC) /* {{{ */
{
return realpath_cache_find(path, path_len, t TSRMLS_CC);
return realpath_cache_find(path, path_len, t TSRMLS_CC);
}
/* }}} */
CWD_API int realpath_cache_size(TSRMLS_D)
CWD_API int realpath_cache_size(TSRMLS_D)
{
return CWDG(realpath_cache_size);
}
CWD_API int realpath_cache_max_buckets(TSRMLS_D)
CWD_API int realpath_cache_max_buckets(TSRMLS_D)
{
return (sizeof(CWDG(realpath_cache)) / sizeof(CWDG(realpath_cache)[0]));
}
CWD_API realpath_cache_bucket** realpath_cache_get_buckets(TSRMLS_D)
CWD_API realpath_cache_bucket** realpath_cache_get_buckets(TSRMLS_D)
{
return CWDG(realpath_cache);
}
@@ -650,14 +777,14 @@ static int tsrm_realpath_r(char *path, int start, int len, int *ll, time_t *t, i
if (!start) {
/* leading '..' must not be removed in case of relative path */
if (j == 0 && path[0] == '.' && path[1] == '.' &&
IS_SLASH(path[2])) {
IS_SLASH(path[2])) {
path[3] = '.';
path[4] = '.';
path[5] = DEFAULT_SLASH;
j = 5;
} else if (j > 0 &&
path[j+1] == '.' && path[j+2] == '.' &&
IS_SLASH(path[j+3])) {
} else if (j > 0 &&
path[j+1] == '.' && path[j+2] == '.' &&
IS_SLASH(path[j+3])) {
j += 4;
path[j++] = '.';
path[j++] = '.';
@@ -673,7 +800,7 @@ static int tsrm_realpath_r(char *path, int start, int len, int *ll, time_t *t, i
}
return j;
}
path[len] = 0;
save = (use_realpath != CWD_EXPAND);
@@ -683,18 +810,18 @@ static int tsrm_realpath_r(char *path, int start, int len, int *ll, time_t *t, i
if (!*t) {
*t = time(0);
}
if ((bucket = realpath_cache_find(path, len, *t TSRMLS_CC)) != NULL) {
if (is_dir && !bucket->is_dir) {
if ((bucket = realpath_cache_find(path, len, *t TSRMLS_CC)) != NULL) {
if (is_dir && !bucket->is_dir) {
/* not a directory */
return -1;
} else {
if (link_is_dir) {
*link_is_dir = bucket->is_dir;
}
} else {
if (link_is_dir) {
*link_is_dir = bucket->is_dir;
}
memcpy(path, bucket->realpath, bucket->realpath_len + 1);
return bucket->realpath_len;
return bucket->realpath_len;
}
}
}
}
#ifdef TSRM_WIN32
@@ -706,7 +833,7 @@ static int tsrm_realpath_r(char *path, int start, int len, int *ll, time_t *t, i
/* continue resolution anyway but don't save result in the cache */
save = 0;
}
if (save) {
FindClose(hFind);
}
@@ -714,9 +841,9 @@ static int tsrm_realpath_r(char *path, int start, int len, int *ll, time_t *t, i
tmp = tsrm_do_alloca(len+1, use_heap);
memcpy(tmp, path, len+1);
if(save &&
!(IS_UNC_PATH(path, len) && len >= 3 && path[2] != '?') &&
(data.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT)) {
if(save &&
!(IS_UNC_PATH(path, len) && len >= 3 && path[2] != '?') &&
(data.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT)) {
/* File is a reparse point. Get the target */
HANDLE hLink = NULL;
REPARSE_DATA_BUFFER * pbuffer;
@@ -751,7 +878,7 @@ static int tsrm_realpath_r(char *path, int start, int len, int *ll, time_t *t, i
reparsetarget = pbuffer->SymbolicLinkReparseBuffer.ReparseTarget;
printname_len = pbuffer->MountPointReparseBuffer.PrintNameLength / sizeof(WCHAR);
isabsolute = (pbuffer->SymbolicLinkReparseBuffer.Flags == 0) ? 1 : 0;
if (!WideCharToMultiByte(CP_THREAD_ACP, 0,
if (!WideCharToMultiByte(CP_THREAD_ACP, 0,
reparsetarget + pbuffer->MountPointReparseBuffer.PrintNameOffset / sizeof(WCHAR),
printname_len + 1,
printname, MAX_PATH, NULL, NULL
@@ -763,7 +890,7 @@ static int tsrm_realpath_r(char *path, int start, int len, int *ll, time_t *t, i
printname[printname_len] = 0;
substitutename_len = pbuffer->MountPointReparseBuffer.SubstituteNameLength / sizeof(WCHAR);
if (!WideCharToMultiByte(CP_THREAD_ACP, 0,
if (!WideCharToMultiByte(CP_THREAD_ACP, 0,
reparsetarget + pbuffer->MountPointReparseBuffer.SubstituteNameOffset / sizeof(WCHAR),
substitutename_len + 1,
substitutename, MAX_PATH, NULL, NULL
@@ -777,7 +904,7 @@ static int tsrm_realpath_r(char *path, int start, int len, int *ll, time_t *t, i
isabsolute = 1;
reparsetarget = pbuffer->MountPointReparseBuffer.ReparseTarget;
printname_len = pbuffer->MountPointReparseBuffer.PrintNameLength / sizeof(WCHAR);
if (!WideCharToMultiByte(CP_THREAD_ACP, 0,
if (!WideCharToMultiByte(CP_THREAD_ACP, 0,
reparsetarget + pbuffer->MountPointReparseBuffer.PrintNameOffset / sizeof(WCHAR),
printname_len + 1,
printname, MAX_PATH, NULL, NULL
@@ -788,7 +915,7 @@ static int tsrm_realpath_r(char *path, int start, int len, int *ll, time_t *t, i
printname[pbuffer->MountPointReparseBuffer.PrintNameLength / sizeof(WCHAR)] = 0;
substitutename_len = pbuffer->MountPointReparseBuffer.SubstituteNameLength / sizeof(WCHAR);
if (!WideCharToMultiByte(CP_THREAD_ACP, 0,
if (!WideCharToMultiByte(CP_THREAD_ACP, 0,
reparsetarget + pbuffer->MountPointReparseBuffer.SubstituteNameOffset / sizeof(WCHAR),
substitutename_len + 1,
substitutename, MAX_PATH, NULL, NULL
@@ -803,20 +930,22 @@ static int tsrm_realpath_r(char *path, int start, int len, int *ll, time_t *t, i
}
if(isabsolute && substitutename_len > 4) {
/* Do not resolve volumes (for now). A mounted point can
/* Do not resolve volumes (for now). A mounted point can
target a volume without a drive, it is not certain that
all IO functions we use in php and its deps support
all IO functions we use in php and its deps support
path with volume GUID instead of the DOS way, like:
d:\test\mnt\foo
\\?\Volume{62d1c3f8-83b9-11de-b108-806e6f6e6963}\foo
*/
if (strncmp(substitutename, "\\??\\Volume{",11) == 0
|| strncmp(substitutename, "\\\\?\\Volume{",11) == 0) {
isVolume = TRUE;
if (strncmp(substitutename, "\\??\\Volume{",11) == 0
|| strncmp(substitutename, "\\\\?\\Volume{",11) == 0
|| strncmp(substitutename, "\\??\\UNC\\", 8) == 0
) {
isVolume = TRUE;
substitutename_off = 0;
} else
/* do not use the \??\ and \\?\ prefix*/
if (strncmp(substitutename, "\\??\\", 4) == 0
if (strncmp(substitutename, "\\??\\", 4) == 0
|| strncmp(substitutename, "\\\\?\\", 4) == 0) {
substitutename_off = 4;
}
@@ -887,7 +1016,7 @@ static int tsrm_realpath_r(char *path, int start, int len, int *ll, time_t *t, i
tmp = tsrm_do_alloca(len+1, use_heap);
memcpy(tmp, path, len+1);
#else
if (save && lstat(path, &st) < 0) {
if (save && php_sys_lstat(path, &st) < 0) {
if (use_realpath == CWD_REALPATH) {
/* file not found */
return -1;
@@ -900,8 +1029,8 @@ static int tsrm_realpath_r(char *path, int start, int len, int *ll, time_t *t, i
memcpy(tmp, path, len+1);
if (save && S_ISLNK(st.st_mode)) {
if (++(*ll) > LINK_MAX || (j = readlink(tmp, path, MAXPATHLEN)) < 0) {
/* too many links or broken symlinks */
if (++(*ll) > LINK_MAX || (j = php_sys_readlink(tmp, path, MAXPATHLEN)) < 0) {
/* too many links or broken symlinks */
tsrm_free_alloca(tmp, use_heap);
return -1;
}
@@ -913,10 +1042,10 @@ static int tsrm_realpath_r(char *path, int start, int len, int *ll, time_t *t, i
return -1;
}
} else {
if (i + j >= MAXPATHLEN-1) {
if (i + j >= MAXPATHLEN-1) {
tsrm_free_alloca(tmp, use_heap);
return -1; /* buffer overflow */
}
}
memmove(path+i, path, j+1);
memcpy(path, tmp, i-1);
path[i-1] = DEFAULT_SLASH;
@@ -1038,18 +1167,18 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
state_cwd_length = 2;
while (IS_SLASH(state->cwd[state_cwd_length])) {
state_cwd_length++;
}
}
while (state->cwd[state_cwd_length] &&
!IS_SLASH(state->cwd[state_cwd_length])) {
!IS_SLASH(state->cwd[state_cwd_length])) {
state_cwd_length++;
}
}
while (IS_SLASH(state->cwd[state_cwd_length])) {
state_cwd_length++;
}
}
while (state->cwd[state_cwd_length] &&
!IS_SLASH(state->cwd[state_cwd_length])) {
!IS_SLASH(state->cwd[state_cwd_length])) {
state_cwd_length++;
}
}
}
}
#endif
@@ -1061,7 +1190,7 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
memcpy(resolved_path + state_cwd_length + 1, path, path_length + 1);
path_length += state_cwd_length + 1;
}
} else {
} else {
#ifdef TSRM_WIN32
if (path_length > 2 && path[1] == ':' && !IS_SLASH(path[2])) {
resolved_path[0] = path[0];
@@ -1072,11 +1201,11 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
} else
#endif
memcpy(resolved_path, path, path_length + 1);
}
}
#ifdef TSRM_WIN32
if (memchr(resolved_path, '*', path_length) ||
memchr(resolved_path, '?', path_length)) {
memchr(resolved_path, '?', path_length)) {
return 1;
}
#endif
@@ -1126,12 +1255,12 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
add_slash = (use_realpath != CWD_REALPATH) && path_length > 0 && IS_SLASH(resolved_path[path_length-1]);
t = CWDG(realpath_cache_ttl) ? 0 : -1;
path_length = tsrm_realpath_r(resolved_path, start, path_length, &ll, &t, use_realpath, 0, NULL TSRMLS_CC);
if (path_length < 0) {
errno = ENOENT;
return 1;
}
if (!start && !path_length) {
resolved_path[path_length++] = '.';
}
@@ -1184,7 +1313,7 @@ verify:
memcpy(state->cwd, resolved_path, state->cwd_length+1);
ret = 0;
}
#if VIRTUAL_CWD_DEBUG
fprintf (stderr, "virtual_file_ex() = %s\n",state->cwd);
#endif
@@ -1207,7 +1336,7 @@ CWD_API int virtual_chdir_file(const char *path, int (*p_chdir)(const char *path
if (length == 0) {
return 1; /* Can't cd to empty string */
}
}
while(--length >= 0 && !IS_SLASH(path[length])) {
}
@@ -1242,16 +1371,16 @@ CWD_API char *virtual_realpath(const char *path, char *real_path TSRMLS_DC) /* {
if (!*path) {
new_state.cwd = (char*)malloc(1);
new_state.cwd[0] = '\0';
new_state.cwd_length = 0;
if (VCWD_GETCWD(cwd, MAXPATHLEN)) {
path = cwd;
new_state.cwd_length = 0;
if (VCWD_GETCWD(cwd, MAXPATHLEN)) {
path = cwd;
}
} else if (!IS_ABSOLUTE_PATH(path, strlen(path))) {
CWD_STATE_COPY(&new_state, &CWDG(cwd));
} else {
new_state.cwd = (char*)malloc(1);
new_state.cwd[0] = '\0';
new_state.cwd_length = 0;
new_state.cwd_length = 0;
}
if (virtual_file_ex(&new_state, path, NULL, CWD_REALPATH)==0) {
@@ -1317,7 +1446,7 @@ CWD_API int virtual_access(const char *pathname, int mode TSRMLS_DC) /* {{{ */
{
cwd_state new_state;
int ret;
CWD_STATE_COPY(&new_state, &CWDG(cwd));
if (virtual_file_ex(&new_state, pathname, NULL, CWD_REALPATH)) {
CWD_STATE_FREE(&new_state);
@@ -1329,9 +1458,9 @@ CWD_API int virtual_access(const char *pathname, int mode TSRMLS_DC) /* {{{ */
#else
ret = access(new_state.cwd, mode);
#endif
CWD_STATE_FREE(&new_state);
return ret;
}
/* }}} */
@@ -1352,12 +1481,12 @@ static void UnixTimeToFileTime(time_t t, LPFILETIME pft) /* {{{ */
TSRM_API int win32_utime(const char *filename, struct utimbuf *buf) /* {{{ */
{
FILETIME mtime, atime;
HANDLE hFile;
HANDLE hFile;
hFile = CreateFile(filename, GENERIC_WRITE, FILE_SHARE_WRITE|FILE_SHARE_READ, NULL,
OPEN_ALWAYS, FILE_FLAG_BACKUP_SEMANTICS, NULL);
/* OPEN_ALWAYS mode sets the last error to ERROR_ALREADY_EXISTS but
/* OPEN_ALWAYS mode sets the last error to ERROR_ALREADY_EXISTS but
the CreateFile operation succeeds */
if (GetLastError() == ERROR_ALREADY_EXISTS) {
SetLastError(0);
@@ -1477,7 +1606,7 @@ CWD_API int virtual_open(const char *path TSRMLS_DC, int flags, ...) /* {{{ */
f = open(new_state.cwd, flags, mode);
} else {
f = open(new_state.cwd, flags);
}
}
CWD_STATE_FREE(&new_state);
return f;
}
@@ -1556,7 +1685,6 @@ CWD_API int virtual_stat(const char *path, struct stat *buf TSRMLS_DC) /* {{{ */
}
/* }}} */
#if !defined(TSRM_WIN32)
CWD_API int virtual_lstat(const char *path, struct stat *buf TSRMLS_DC) /* {{{ */
{
cwd_state new_state;
@@ -1568,13 +1696,12 @@ CWD_API int virtual_lstat(const char *path, struct stat *buf TSRMLS_DC) /* {{{ *
return -1;
}
retval = lstat(new_state.cwd, buf);
retval = php_sys_lstat(new_state.cwd, buf);
CWD_STATE_FREE(&new_state);
return retval;
}
/* }}} */
#endif
CWD_API int virtual_unlink(const char *path TSRMLS_DC) /* {{{ */
{
@@ -1738,7 +1865,7 @@ CWD_API FILE *virtual_popen(const char *command, const char *type TSRMLS_DC) /*
}
*ptr++ = '\'';
}
*ptr++ = ' ';
*ptr++ = ';';
*ptr++ = ' ';
@@ -1761,18 +1888,18 @@ CWD_API char *tsrm_realpath(const char *path, char *real_path TSRMLS_DC) /* {{{
if (!*path) {
new_state.cwd = (char*)malloc(1);
new_state.cwd[0] = '\0';
new_state.cwd_length = 0;
if (VCWD_GETCWD(cwd, MAXPATHLEN)) {
path = cwd;
new_state.cwd_length = 0;
if (VCWD_GETCWD(cwd, MAXPATHLEN)) {
path = cwd;
}
} else if (!IS_ABSOLUTE_PATH(path, strlen(path)) &&
VCWD_GETCWD(cwd, MAXPATHLEN)) {
VCWD_GETCWD(cwd, MAXPATHLEN)) {
new_state.cwd = strdup(cwd);
new_state.cwd_length = strlen(cwd);
} else {
new_state.cwd = (char*)malloc(1);
new_state.cwd[0] = '\0';
new_state.cwd_length = 0;
new_state.cwd_length = 0;
}
if (virtual_file_ex(&new_state, path, NULL, CWD_REALPATH)) {
+13 -9
View File
@@ -14,6 +14,7 @@
+----------------------------------------------------------------------+
| Authors: Andi Gutmans <andi@zend.com> |
| Sascha Schumann <sascha@schumann.cx> |
| Pierre Joye <pierre@php.net> |
+----------------------------------------------------------------------+
*/
@@ -107,7 +108,7 @@ typedef unsigned short mode_t;
#define COPY_WHEN_ABSOLUTE(path) 0
#endif
#ifndef IS_ABSOLUTE_PATH
#ifndef IS_ABSOLUTE_PATH
#define IS_ABSOLUTE_PATH(path, len) \
(IS_SLASH(path[0]))
#endif
@@ -129,9 +130,16 @@ typedef unsigned short mode_t;
#endif
#ifdef TSRM_WIN32
CWD_API int php_sys_stat_ex(const char *path, struct stat *buf, int lstat);
CWD_API int php_sys_stat(const char *path, struct stat *buf);
CWD_API int php_sys_lstat(const char *path, struct stat *buf);
CWD_API int php_sys_readlink(const char *link, char *target, size_t target_len);
#else
# define php_sys_stat stat
# define php_sys_lstat lstat
# ifdef HAVE_SYMLINK
# define php_sys_readlink(link, target, target_len) readlink(link, target, target_len)
# endif
#endif
typedef struct _cwd_state {
@@ -155,9 +163,7 @@ CWD_API int virtual_open(const char *path TSRMLS_DC, int flags, ...);
CWD_API int virtual_creat(const char *path, mode_t mode TSRMLS_DC);
CWD_API int virtual_rename(char *oldname, char *newname TSRMLS_DC);
CWD_API int virtual_stat(const char *path, struct stat *buf TSRMLS_DC);
#if !defined(TSRM_WIN32)
CWD_API int virtual_lstat(const char *path, struct stat *buf TSRMLS_DC);
#endif
CWD_API int virtual_unlink(const char *path TSRMLS_DC);
CWD_API int virtual_mkdir(const char *pathname, mode_t mode TSRMLS_DC);
CWD_API int virtual_rmdir(const char *pathname TSRMLS_DC);
@@ -188,7 +194,7 @@ CWD_API int virtual_chmod(const char *filename, mode_t mode TSRMLS_DC);
CWD_API int virtual_chown(const char *filename, uid_t owner, gid_t group, int link TSRMLS_DC);
#endif
/* One of the following constants must be used as the last argument
/* One of the following constants must be used as the last argument
in virtual_file_ex() call. */
#define CWD_EXPAND 0 /* expand "." and ".." but dont resolve symlinks */
@@ -216,7 +222,7 @@ typedef struct _realpath_cache_bucket {
unsigned char is_wvalid;
unsigned char is_writable;
#endif
struct _realpath_cache_bucket *next;
struct _realpath_cache_bucket *next;
} realpath_cache_bucket;
typedef struct _virtual_cwd_globals {
@@ -244,7 +250,7 @@ CWD_API realpath_cache_bucket** realpath_cache_get_buckets(TSRMLS_D);
/* The actual macros to be used in programs using TSRM
* If the program defines VIRTUAL_DIR it will use the
* virtual_* functions
* virtual_* functions
*/
#ifdef VIRTUAL_DIR
@@ -261,9 +267,7 @@ CWD_API realpath_cache_bucket** realpath_cache_get_buckets(TSRMLS_D);
#define VCWD_REALPATH(path, real_path) virtual_realpath(path, real_path TSRMLS_CC)
#define VCWD_RENAME(oldname, newname) virtual_rename(oldname, newname TSRMLS_CC)
#define VCWD_STAT(path, buff) virtual_stat(path, buff TSRMLS_CC)
#if !defined(TSRM_WIN32)
# define VCWD_LSTAT(path, buff) virtual_lstat(path, buff TSRMLS_CC)
#endif
#define VCWD_LSTAT(path, buff) virtual_lstat(path, buff TSRMLS_CC)
#define VCWD_UNLINK(path) virtual_unlink(path TSRMLS_CC)
#define VCWD_MKDIR(pathname, mode) virtual_mkdir(pathname, mode TSRMLS_CC)
#define VCWD_RMDIR(pathname) virtual_rmdir(pathname TSRMLS_CC)
+13
View File
@@ -40,6 +40,9 @@ UPGRADE NOTES - PHP 5.3
2. Changes made to existing functions
=====================================
- Paths containing NULL (like /some/path\0foo.txt) are now considered invalid.
See http://news.php.net/php.internals/50191
- The HTTP stream wrapper now considers all status codes from 200 to 399 to be
successful.
@@ -273,6 +276,8 @@ UPGRADE NOTES - PHP 5.3
- MySQLi: Now supports persistent connections by prepending the hostname
with "p:".
- imagepstext now rejects invalid antialiasing steps and raises a warning.
d. no longer possible to disable
- PCRE
@@ -457,6 +462,14 @@ UPGRADE NOTES - PHP 5.3
- Firebird and SNMP support are no longer available on Windows. Firebird support
may be reintroduced in the future.
=====================
11.1 New in PHP 5.3.4
=====================
- open_basedir supports now symbolic links (checks the target).
- is_link and SplFileInfo symbolic links related method are now fully supported
(on Windows Vista or later).
===================
12. New in PHP 5.3:
===================
+23
View File
@@ -0,0 +1,23 @@
$Id$
UPGRADE NOTES - PHP 5.3.4
1. Internal API changes
========================
1. Internal API changes
========================
a. stat/lstat support
lstat is now available on all platforms. On unix-like platform
php_sys_lstat is an alias to lstat (when avaible). On Windows it is now
available using php_sys_lstat. php_sys_stat and php_sys_lstat usage is recommended
instead of calling lstat directly, to ensure portability.
b. readlink support
readlink is now available on all platforms. On unix-like platform
php_sys_readlink is an alias to readlink (when avaible). On Windows it is now
available using php_sys_readlink. php_sys_readlink usage is recommended
instead of calling readlink directly, to ensure portability.
+1 -1
View File
@@ -4,7 +4,7 @@ dnl This file contains local autoconf functions.
AC_DEFUN([LIBZEND_BISON_CHECK],[
# we only support certain bison versions
bison_version_list="1.28 1.35 1.75 1.875 2.0 2.1 2.2 2.3 2.4 2.4.1 2.4.2"
bison_version_list="1.28 1.35 1.75 1.875 2.0 2.1 2.2 2.3 2.4 2.4.1 2.4.2 2.4.3"
# for standalone build of Zend Engine
test -z "$SED" && SED=sed
+4 -4
View File
@@ -43,11 +43,11 @@ __call:
string(3) "ABC"
__call:
string(3) "ABC"
__callstatic:
__call:
string(3) "XYZ"
__callstatic:
__call:
string(3) "WWW"
__callstatic:
__call:
string(3) "ABC"
__callstatic:
string(1) "A"
@@ -58,4 +58,4 @@ string(1) "C"
__callstatic:
string(3) "FOO"
__callstatic:
string(3) "FOO"
string(3) "FOO"
+4 -4
View File
@@ -35,17 +35,17 @@ call_user_func('self::y');
?>
--EXPECTF--
__callstatic:
__call:
string(3) "ABC"
__callstatic:
__call:
string(3) "ABC"
__call:
string(3) "xyz"
__callstatic:
__call:
string(3) "www"
__call:
string(1) "y"
__callstatic:
__call:
string(1) "y"
ok
__callstatic:
+3 -3
View File
@@ -27,6 +27,6 @@ $foo->start();
?>
--EXPECT--
static
static
static
instance
instance
instance
+35
View File
@@ -0,0 +1,35 @@
--TEST--
Bug #52361 (Throwing an exception in a destructor causes invalid catching)
--FILE--
<?php
class aaa {
public function __destruct() {
try {
throw new Exception(__CLASS__);
} catch(Exception $ex) {
echo "1. $ex\n";
}
}
}
function bbb() {
$a = new aaa();
throw new Exception(__FUNCTION__);
}
try {
bbb();
echo "must be skipped !!!";
} catch(Exception $ex) {
echo "2. $ex\n";
}
?>
--EXPECTF--
1. exception 'Exception' with message 'aaa' in %sbug52361.php:5
Stack trace:
#0 %sbug52361.php(16): aaa->__destruct()
#1 %sbug52361.php(16): bbb()
#2 {main}
2. exception 'Exception' with message 'bbb' in %sbug52361.php:13
Stack trace:
#0 %sbug52361.php(16): bbb()
#1 {main}
+19
View File
@@ -0,0 +1,19 @@
--TEST--
Bug #52484 (__set() ignores setting properties with empty names)
--FILE--
<?php
class A {
function __unset($prop) {
unset($this->$prop);
}
}
$a = new A();
$prop = null;
unset($a->$prop);
?>
--EXPECTF--
Fatal error: Cannot access empty property in %s on line %d
+19
View File
@@ -0,0 +1,19 @@
--TEST--
Bug #52484.2 (__set() ignores setting properties with empty names)
--FILE--
<?php
class A {
function __set($prop, $val) {
$this->$prop = $val;
}
}
$a = new A();
$prop = null;
$a->$prop = 2;
?>
--EXPECTF--
Fatal error: Cannot access empty property in %s on line %d
+19
View File
@@ -0,0 +1,19 @@
--TEST--
Bug #52484.3 (__set() ignores setting properties with empty names)
--FILE--
<?php
class A {
function __get($prop) {
var_dump($this->$prop);
}
}
$a = new A();
$prop = null;
var_dump($a->$prop);
?>
--EXPECTF--
Fatal error: Cannot access empty property in %s on line %d
+20
View File
@@ -0,0 +1,20 @@
--TEST--
Bug #52508 (newline problem with parse_ini_file+INI_SCANNER_RAW)
--FILE--
<?php
$file = dirname(__FILE__) .'/bug52508.ini';
file_put_contents($file, "a = 1");
$ini_array = parse_ini_file($file, true, INI_SCANNER_RAW);
var_dump($ini_array);
unlink($file);
?>
--EXPECT--
array(1) {
["a"]=>
string(1) "1"
}
+16
View File
@@ -0,0 +1,16 @@
--TEST--
Bug #52879 (Objects unreferenced in __get, __set, __isset or __unset can be freed too early)
--FILE--
<?php
class MyClass {
public $myRef;
public function __set($property,$value) {
$this->myRef = $value;
}
}
$myGlobal=new MyClass($myGlobal);
$myGlobal->myRef=&$myGlobal;
$myGlobal->myNonExistentProperty="ok\n";
echo $myGlobal;
--EXPECT--
ok
+40
View File
@@ -0,0 +1,40 @@
--TEST--
Bug #52939 (zend_call_function_array does not respect ZEND_SEND_PREFER_REF)
--FILE--
<?php
$ar1 = array("row1" => 2, "row2" => 1);
var_dump(array_multisort($ar1));
var_dump($ar1);
$ar1 = array("row1" => 2, "row2" => 1);
$args = array(&$ar1);
var_dump(call_user_func_array("array_multisort", $args));
var_dump($ar1);
$ar1 = array("row1" => 2, "row2" => 1);
$args = array($ar1);
var_dump(call_user_func_array("array_multisort", $args));
var_dump($ar1);
?>
--EXPECT--
bool(true)
array(2) {
["row2"]=>
int(1)
["row1"]=>
int(2)
}
bool(true)
array(2) {
["row2"]=>
int(1)
["row1"]=>
int(2)
}
bool(true)
array(2) {
["row1"]=>
int(2)
["row2"]=>
int(1)
}
+19
View File
@@ -0,0 +1,19 @@
--TEST--
Bug #53305 (E_NOTICE when defining a constant starts with __COMPILER_HALT_OFFSET__)
--FILE--
<?php
error_reporting(E_ALL);
define('__COMPILER_HALT_OFFSET__1', 1);
define('__COMPILER_HALT_OFFSET__2', 2);
define('__COMPILER_HALT_OFFSET__', 3);
define('__COMPILER_HALT_OFFSET__1'.chr(0), 4);
var_dump(__COMPILER_HALT_OFFSET__1);
var_dump(constant('__COMPILER_HALT_OFFSET__1'.chr(0)));
?>
--EXPECTF--
Notice: Constant __COMPILER_HALT_OFFSET__ already defined in %s on line %d
int(1)
int(4)
+2 -2
View File
@@ -28,9 +28,9 @@ foo::BAZ();
--EXPECT--
nonstatic
string(6) "fOoBaR"
static
nonstatic
string(6) "foOBAr"
static
nonstatic
string(6) "fOOBAr"
static
string(3) "bAr"
+1 -1
View File
@@ -30,5 +30,5 @@ a::Foo();
--EXPECT--
__callstatic: Test
__call: Test
__callstatic: Bar
__call: Bar
__callstatic: Foo
+6
View File
@@ -1,5 +1,11 @@
--TEST--
Testing declare statement with several type values
--SKIPIF--
<?php
if (in_array("detect_unicode", array_keys(ini_get_all()))) {
die("skip");
}
?>
--FILE--
<?php
+40
View File
@@ -0,0 +1,40 @@
--TEST--
GC 032: Crash in GC because of invalid reference counting
--FILE--
<?php
$a = array();
$b =& $a;
$a[0] = $a;
debug_zval_dump($a);
$a = array(array());
$b =& $a;
$a[0][0] = $a;
debug_zval_dump($a);
?>
--EXPECT--
array(1) refcount(1){
[0]=>
array(1) refcount(3){
[0]=>
array(1) refcount(3){
[0]=>
*RECURSION*
}
}
}
array(1) refcount(1){
[0]=>
array(1) refcount(3){
[0]=>
array(1) refcount(1){
[0]=>
array(1) refcount(3){
[0]=>
array(1) refcount(1){
[0]=>
*RECURSION*
}
}
}
}
}
Binary file not shown.
+40
View File
@@ -0,0 +1,40 @@
--TEST--
Covariant return-by-ref constraints
--FILE--
<?php
class A implements ArrayAccess {
public $foo = array();
public function &offsetGet($n) {
return $this->foo[$n];
}
public function offsetSet($n, $v) {
}
public function offsetUnset($n) {
}
public function offsetExists($n) {
}
}
$a = new A;
$a['foo']['bar'] = 2;
var_dump($a);
?>
==DONE==
--EXPECTF--
object(A)#1 (1) {
["foo"]=>
array(1) {
["foo"]=>
array(1) {
["bar"]=>
int(2)
}
}
}
==DONE==
+1 -1
View File
@@ -19,7 +19,7 @@ echo $HTTP_SESSION_VARS;
echo "\nok\n";
?>
--EXPECTF--
Warning: Directive 'register_long_arrays' is deprecated in PHP %d.%d and greater in Unknown on line 0
Deprecated: Directive 'register_long_arrays' is deprecated in PHP %d.%d and greater in Unknown on line 0
ok
Warning: session_start(): Cannot send session cookie - headers already sent by (output started at %sunset_cv05.php on line %d
+1 -1
View File
@@ -19,7 +19,7 @@ echo $x;
echo "ok\n";
?>
--EXPECTF--
Warning: Directive 'register_globals' is deprecated in PHP %d.%d and greater in Unknown on line 0
Deprecated: Directive 'register_globals' is deprecated in PHP %d.%d and greater in Unknown on line 0
1
Deprecated: Function session_register() is deprecated in %s on line %d
+1 -1
View File
@@ -1082,7 +1082,7 @@ ZEND_API int _object_and_properties_init(zval *arg, zend_class_entry *class_type
} else {
ALLOC_HASHTABLE_REL(object->properties);
zend_hash_init(object->properties, zend_hash_num_elements(&class_type->default_properties), NULL, ZVAL_PTR_DTOR, 0);
zend_hash_copy(object->properties, &class_type->default_properties, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
zend_hash_copy(object->properties, &class_type->default_properties, zval_copy_property_ctor(class_type), (void *) &tmp, sizeof(zval *));
}
} else {
Z_OBJVAL_P(arg) = class_type->create_object(class_type TSRMLS_CC);
+11 -4
View File
@@ -2551,12 +2551,14 @@ static zend_bool zend_do_perform_implementation_check(const zend_function *fe, c
return 0;
}
if (proto->common.pass_rest_by_reference
if (fe->common.type != ZEND_USER_FUNCTION
&& proto->common.pass_rest_by_reference
&& !fe->common.pass_rest_by_reference) {
return 0;
}
if (fe->common.return_reference != proto->common.return_reference) {
/* by-ref constraints on return values are covariant */
if (proto->common.return_reference && !fe->common.return_reference) {
return 0;
}
@@ -2580,6 +2582,8 @@ static zend_bool zend_do_perform_implementation_check(const zend_function *fe, c
/* Only one has an array type hint and the other one doesn't */
return 0;
}
/* by-ref constraints on arguments are invariant */
if (fe->common.arg_info[i].pass_by_reference != proto->common.arg_info[i].pass_by_reference) {
return 0;
}
@@ -2817,6 +2821,9 @@ static int inherit_static_prop(zval **p TSRMLS_DC, int num_args, va_list args, c
}
/* }}} */
#define zval_property_ctor(parent_ce, ce) \
((copy_ctor_func_t) (((parent_ce)->type != (ce)->type) ? zval_shared_property_ctor : zval_add_ref))
ZEND_API void zend_do_inheritance(zend_class_entry *ce, zend_class_entry *parent_ce TSRMLS_DC) /* {{{ */
{
if ((ce->ce_flags & ZEND_ACC_INTERFACE)
@@ -2840,7 +2847,7 @@ ZEND_API void zend_do_inheritance(zend_class_entry *ce, zend_class_entry *parent
zend_do_inherit_interfaces(ce, parent_ce TSRMLS_CC);
/* Inherit properties */
zend_hash_merge(&ce->default_properties, &parent_ce->default_properties, (void (*)(void *)) zval_add_ref, NULL, sizeof(zval *), 0);
zend_hash_merge(&ce->default_properties, &parent_ce->default_properties, zval_property_ctor(parent_ce, ce), NULL, sizeof(zval *), 0);
if (parent_ce->type != ce->type) {
/* User class extends internal class */
zend_update_class_constants(parent_ce TSRMLS_CC);
@@ -2850,7 +2857,7 @@ ZEND_API void zend_do_inheritance(zend_class_entry *ce, zend_class_entry *parent
}
zend_hash_merge_ex(&ce->properties_info, &parent_ce->properties_info, (copy_ctor_func_t) (ce->type & ZEND_INTERNAL_CLASS ? zend_duplicate_property_info_internal : zend_duplicate_property_info), sizeof(zend_property_info), (merge_checker_func_t) do_inherit_property_access_check, ce);
zend_hash_merge(&ce->constants_table, &parent_ce->constants_table, (void (*)(void *)) zval_add_ref, NULL, sizeof(zval *), 0);
zend_hash_merge(&ce->constants_table, &parent_ce->constants_table, zval_property_ctor(parent_ce, ce), NULL, sizeof(zval *), 0);
zend_hash_merge_ex(&ce->function_table, &parent_ce->function_table, (copy_ctor_func_t) do_inherit_method, sizeof(zend_function), (merge_checker_func_t) do_inherit_method_check, ce);
do_inherit_parent_constructor(ce);
+10 -2
View File
@@ -434,8 +434,16 @@ ZEND_API int zend_register_constant(zend_constant *c TSRMLS_DC)
}
}
if ((strncmp(name, "__COMPILER_HALT_OFFSET__", sizeof("__COMPILER_HALT_OFFSET__") - 1) == 0) ||
zend_hash_add(EG(zend_constants), name, c->name_len, (void *) c, sizeof(zend_constant), NULL)==FAILURE) {
/* Check if the user is trying to define the internal pseudo constant name __COMPILER_HALT_OFFSET__ */
if ((c->name_len == sizeof("__COMPILER_HALT_OFFSET__")
&& !memcmp(name, "__COMPILER_HALT_OFFSET__", sizeof("__COMPILER_HALT_OFFSET__")-1))
|| zend_hash_add(EG(zend_constants), name, c->name_len, (void *) c, sizeof(zend_constant), NULL)==FAILURE) {
/* The internal __COMPILER_HALT_OFFSET__ is prefixed by NULL byte */
if (c->name[0] == '\0' && c->name_len > sizeof("\0__COMPILER_HALT_OFFSET__")
&& memcmp(name, "\0__COMPILER_HALT_OFFSET__", sizeof("\0__COMPILER_HALT_OFFSET__")) == 0) {
name++;
}
zend_error(E_NOTICE,"Constant %s already defined", name);
free(c->name);
if (!(c->flags & CONST_PERSISTENT)) {
+6 -5
View File
@@ -137,7 +137,7 @@ static zend_object_value zend_default_exception_new_ex(zend_class_entry *class_t
ALLOC_HASHTABLE(object->properties);
zend_hash_init(object->properties, 0, NULL, ZVAL_PTR_DTOR, 0);
zend_hash_copy(object->properties, &class_type->default_properties, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
zend_hash_copy(object->properties, &class_type->default_properties, zval_copy_property_ctor(class_type), (void *) &tmp, sizeof(zval *));
ALLOC_ZVAL(trace);
Z_UNSET_ISREF_P(trace);
@@ -572,6 +572,7 @@ ZEND_METHOD(exception, __toString)
zend_call_function(&fci, NULL TSRMLS_CC);
if (Z_TYPE_P(trace) != IS_STRING) {
zval_ptr_dtor(&trace);
trace = NULL;
}
@@ -592,6 +593,10 @@ ZEND_METHOD(exception, __toString)
zval_dtor(&line);
exception = zend_read_property(default_exception_ce, exception, "previous", sizeof("previous")-1, 0 TSRMLS_CC);
if (trace) {
zval_ptr_dtor(&trace);
}
}
zval_dtor(&fname);
@@ -599,10 +604,6 @@ ZEND_METHOD(exception, __toString)
* the result in uncaught exception handlers without memleaks. */
zend_update_property_string(default_exception_ce, getThis(), "string", sizeof("string")-1, str TSRMLS_CC);
if (trace) {
zval_ptr_dtor(&trace);
}
RETURN_STRINGL(str, len, 0);
}
/* }}} */
+1 -1
View File
@@ -714,8 +714,8 @@ static inline zval* zend_assign_to_variable(zval **variable_ptr_ptr, zval *value
ALLOC_ZVAL(variable_ptr);
*variable_ptr_ptr = variable_ptr;
*variable_ptr = *value;
zval_copy_ctor(variable_ptr);
Z_SET_REFCOUNT_P(variable_ptr, 1);
zval_copy_ctor(variable_ptr);
} else {
*variable_ptr_ptr = value;
Z_ADDREF_P(value);
+2 -1
View File
@@ -870,7 +870,8 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS
if (Z_REFCOUNT_PP(fci->params[i]) > 1) {
zval *new_zval;
if (fci->no_separation) {
if (fci->no_separation &&
!ARG_MAY_BE_SENT_BY_REF(EX(function_state).function, i + 1)) {
if(i) {
/* hack to clean up the stack */
zend_vm_stack_push_nocheck((void *) (zend_uintptr_t)i TSRMLS_CC);
+3 -1
View File
@@ -78,7 +78,9 @@ extern ZEND_API void zend_ensure_fpu_mode(TSRMLS_D);
# define HAVE__CONTROLFP
# endif /* MSC_VER >= 1500 */
/* Tell MSVC optimizer that we access FP environment */
# pragma fenv_access (on)
# if _MSC_VER >= 1500
# pragma fenv_access (on)
# endif
#endif /* _MSC_VER */
#ifdef HAVE__CONTROLFP_S
+23 -19
View File
@@ -414,19 +414,21 @@ static void gc_mark_roots(TSRMLS_D)
gc_root_buffer *current = GC_G(roots).next;
while (current != &GC_G(roots)) {
if (current->handle && EG(objects_store).object_buckets) {
struct _store_object *obj = &EG(objects_store).object_buckets[current->handle].bucket.obj;
if (current->handle) {
if (EG(objects_store).object_buckets) {
struct _store_object *obj = &EG(objects_store).object_buckets[current->handle].bucket.obj;
if (GC_GET_COLOR(obj->buffered) == GC_PURPLE) {
zval z;
if (GC_GET_COLOR(obj->buffered) == GC_PURPLE) {
zval z;
INIT_PZVAL(&z);
Z_OBJ_HANDLE(z) = current->handle;
Z_OBJ_HT(z) = current->u.handlers;
zobj_mark_grey(obj, &z TSRMLS_CC);
} else {
GC_SET_ADDRESS(obj->buffered, NULL);
GC_REMOVE_FROM_BUFFER(current);
INIT_PZVAL(&z);
Z_OBJ_HANDLE(z) = current->handle;
Z_OBJ_HT(z) = current->u.handlers;
zobj_mark_grey(obj, &z TSRMLS_CC);
} else {
GC_SET_ADDRESS(obj->buffered, NULL);
GC_REMOVE_FROM_BUFFER(current);
}
}
} else {
if (GC_ZVAL_GET_COLOR(current->u.pz) == GC_PURPLE) {
@@ -623,15 +625,17 @@ static void gc_collect_roots(TSRMLS_D)
gc_root_buffer *current = GC_G(roots).next;
while (current != &GC_G(roots)) {
if (current->handle && EG(objects_store).object_buckets) {
struct _store_object *obj = &EG(objects_store).object_buckets[current->handle].bucket.obj;
zval z;
if (current->handle) {
if (EG(objects_store).object_buckets) {
struct _store_object *obj = &EG(objects_store).object_buckets[current->handle].bucket.obj;
zval z;
GC_SET_ADDRESS(obj->buffered, NULL);
INIT_PZVAL(&z);
Z_OBJ_HANDLE(z) = current->handle;
Z_OBJ_HT(z) = current->u.handlers;
zobj_collect_white(&z TSRMLS_CC);
GC_SET_ADDRESS(obj->buffered, NULL);
INIT_PZVAL(&z);
Z_OBJ_HANDLE(z) = current->handle;
Z_OBJ_HT(z) = current->u.handlers;
zobj_collect_white(&z TSRMLS_CC);
}
} else {
GC_ZVAL_SET_ADDRESS(current->u.pz, NULL);
zval_collect_white(current->u.pz TSRMLS_CC);
+3
View File
@@ -63,6 +63,9 @@ static void _zend_is_inconsistent(const HashTable *ht, const char *file, int lin
case HT_CLEANING:
zend_output_debug_string(1, "%s(%d) : ht=%p is being cleaned", file, line, ht);
break;
default:
zend_output_debug_string(1, "%s(%d) : ht=%p is inconsistent", file, line, ht);
break;
}
zend_bailout();
}
+4 -4
View File
@@ -312,7 +312,7 @@ END_EXTERN_C()
} \
if (*tmp >= '0' && *tmp <= '9') { /* possibly a numeric index */ \
const char *end = key + length - 1; \
long idx; \
ulong idx; \
\
if ((*end != '\0') /* not a null terminated string */ \
|| (*tmp == '0' && length > 2) /* numbers with leading zeros */ \
@@ -328,11 +328,11 @@ END_EXTERN_C()
} \
if (tmp == end) { \
if (*key == '-') { \
idx = -idx; \
if (idx > 0) { /* overflow */ \
if (idx-1 > LONG_MAX) { /* overflow */ \
break; \
} \
} else if (idx < 0) { /* overflow */ \
idx = (ulong)(-(long)idx); \
} else if (idx > LONG_MAX) { /* overflow */ \
break; \
} \
return func; \
+1473 -1465
View File
File diff suppressed because it is too large. Load diff
+1 -1
View File
@@ -344,7 +344,7 @@ DOLLAR_CURLY "${"
SECTION_RAW_CHARS [^\]\n\r]
SINGLE_QUOTED_CHARS [^']
RAW_VALUE_CHARS [^\n\r;]
RAW_VALUE_CHARS [^\n\r;\000]
LITERAL_DOLLAR ("$"([^{\000]|("\\"{ANY_CHAR})))
VALUE_CHARS ([^$= \t\n\r;&|~()!"'\000]|{LITERAL_DOLLAR})
+1 -1
View File
@@ -1,4 +1,4 @@
/* Generated by re2c 0.13.5 on Tue May 25 22:53:58 2010 */
/* Generated by re2c 0.13.5 on Sun Aug 1 12:07:43 2010 */
#line 3 "Zend/zend_ini_scanner_defs.h"
enum YYCONDTYPE {
+4
View File
@@ -284,6 +284,10 @@ ZEND_API int open_file_for_scanning(zend_file_handle *file_handle TSRMLS_DC)
SCNG(script_filtered_size) = SCNG(script_org_size);
} else {
SCNG(input_filter)(&SCNG(script_filtered), &SCNG(script_filtered_size), SCNG(script_org), SCNG(script_org_size) TSRMLS_CC);
if (SCNG(script_filtered) == NULL) {
zend_error_noreturn(E_COMPILE_ERROR, "Could not convert the script from the detected "
"encoding \"%s\" to a compatible encoding", LANG_SCNG(script_encoding)->name);
}
}
SCNG(yy_start) = SCNG(script_filtered) - offset;
yy_scan_buffer((char *)SCNG(script_filtered), SCNG(script_filtered_size) TSRMLS_CC);
+44 -10
View File
@@ -340,13 +340,16 @@ zval *zend_std_read_property(zval *object, zval *member, int type TSRMLS_DC) /*
property_info = zend_get_property_info(zobj->ce, member, (zobj->ce->__get != NULL) TSRMLS_CC);
if (!property_info || zend_hash_quick_find(zobj->properties, property_info->name, property_info->name_length+1, property_info->h, (void **) &retval) == FAILURE) {
zend_guard *guard;
zend_guard *guard = NULL;
if (zobj->ce->__get &&
zend_get_property_guard(zobj, property_info, member, &guard) == SUCCESS &&
!guard->in_get) {
/* have getter - try with it! */
Z_ADDREF_P(object);
if (PZVAL_IS_REF(object)) {
SEPARATE_ZVAL(&object);
}
guard->in_get = 1; /* prevent circular getting */
rv = zend_std_call_getter(object, member TSRMLS_CC);
guard->in_get = 0;
@@ -373,6 +376,15 @@ zval *zend_std_read_property(zval *object, zval *member, int type TSRMLS_DC) /*
}
zval_ptr_dtor(&object);
} else {
if (zobj->ce->__get && guard && guard->in_get == 1) {
if (Z_STRVAL_P(member)[0] == '\0') {
if (Z_STRLEN_P(member) == 0) {
zend_error(E_ERROR, "Cannot access empty property");
} else {
zend_error(E_ERROR, "Cannot access property started with '\\0'");
}
}
}
if (!silent) {
zend_error(E_NOTICE,"Undefined property: %s::$%s", zobj->ce->name, Z_STRVAL_P(member));
}
@@ -436,22 +448,22 @@ static void zend_std_write_property(zval *object, zval *member, zval *value TSRM
}
}
} else {
int setter_done = 0;
zend_guard *guard;
zend_guard *guard = NULL;
if (zobj->ce->__set &&
zend_get_property_guard(zobj, property_info, member, &guard) == SUCCESS &&
!guard->in_set) {
Z_ADDREF_P(object);
if (PZVAL_IS_REF(object)) {
SEPARATE_ZVAL(&object);
}
guard->in_set = 1; /* prevent circular setting */
if (zend_std_call_setter(object, member, value TSRMLS_CC) != SUCCESS) {
/* for now, just ignore it - __set should take care of warnings, etc. */
}
setter_done = 1;
guard->in_set = 0;
zval_ptr_dtor(&object);
}
if (!setter_done && property_info) {
} else if (property_info) {
zval **foo;
/* if we assign referenced variable, we should separate it */
@@ -460,6 +472,14 @@ static void zend_std_write_property(zval *object, zval *member, zval *value TSRM
SEPARATE_ZVAL(&value);
}
zend_hash_quick_update(zobj->properties, property_info->name, property_info->name_length+1, property_info->h, &value, sizeof(zval *), (void **) &foo);
} else if (zobj->ce->__set && guard && guard->in_set == 1) {
if (Z_STRVAL_P(member)[0] == '\0') {
if (Z_STRLEN_P(member) == 0) {
zend_error(E_ERROR, "Cannot access empty property");
} else {
zend_error(E_ERROR, "Cannot access property started with '\\0'");
}
}
}
}
@@ -619,17 +639,28 @@ static void zend_std_unset_property(zval *object, zval *member TSRMLS_DC) /* {{{
property_info = zend_get_property_info(zobj->ce, member, (zobj->ce->__unset != NULL) TSRMLS_CC);
if (!property_info || zend_hash_quick_del(zobj->properties, property_info->name, property_info->name_length+1, property_info->h) == FAILURE) {
zend_guard *guard;
zend_guard *guard = NULL;
if (zobj->ce->__unset &&
zend_get_property_guard(zobj, property_info, member, &guard) == SUCCESS &&
!guard->in_unset) {
/* have unseter - try with it! */
Z_ADDREF_P(object);
if (PZVAL_IS_REF(object)) {
SEPARATE_ZVAL(&object);
}
guard->in_unset = 1; /* prevent circular unsetting */
zend_std_call_unsetter(object, member TSRMLS_CC);
guard->in_unset = 0;
zval_ptr_dtor(&object);
} else if (zobj->ce->__unset && guard && guard->in_unset == 1) {
if (Z_STRVAL_P(member)[0] == '\0') {
if (Z_STRLEN_P(member) == 0) {
zend_error(E_ERROR, "Cannot access empty property");
} else {
zend_error(E_ERROR, "Cannot access property started with '\\0'");
}
}
}
}
@@ -953,13 +984,13 @@ ZEND_API zend_function *zend_std_get_static_method(zend_class_entry *ce, char *f
if (!fbc && zend_hash_find(&ce->function_table, lc_function_name, function_name_strlen+1, (void **) &fbc)==FAILURE) {
efree(lc_function_name);
if (ce->__callstatic) {
return zend_get_user_callstatic_function(ce, function_name_strval, function_name_strlen);
} else if (ce->__call &&
if (ce->__call &&
EG(This) &&
Z_OBJ_HT_P(EG(This))->get_class_entry &&
instanceof_function(Z_OBJCE_P(EG(This)), ce TSRMLS_CC)) {
return zend_get_user_call_function(ce, function_name_strval, function_name_strlen);
} else if (ce->__callstatic) {
return zend_get_user_callstatic_function(ce, function_name_strval, function_name_strlen);
} else {
return NULL;
}
@@ -1144,6 +1175,9 @@ static int zend_std_has_property(zval *object, zval *member, int has_set_exists
/* have issetter - try with it! */
Z_ADDREF_P(object);
if (PZVAL_IS_REF(object)) {
SEPARATE_ZVAL(&object);
}
guard->in_isset = 1; /* prevent circular getting */
rv = zend_std_call_issetter(object, member TSRMLS_CC);
if (rv) {
+3 -5
View File
@@ -106,15 +106,13 @@ ZEND_API void zend_objects_destroy_object(zend_object *object, zend_object_handl
zend_error(E_ERROR, "Attempt to destruct pending exception");
} else {
old_exception = EG(exception);
Z_ADDREF_P(old_exception);
EG(exception) = NULL;
}
}
zend_exception_save(TSRMLS_C);
zend_call_method_with_0_params(&obj, object->ce, &destructor, ZEND_DESTRUCTOR_FUNC_NAME, NULL);
zend_exception_restore(TSRMLS_C);
if (old_exception) {
if (EG(exception)) {
zval_ptr_dtor(&old_exception);
zend_exception_set_previous(EG(exception), old_exception TSRMLS_CC);
} else {
EG(exception) = old_exception;
}
@@ -148,7 +146,7 @@ ZEND_API zend_object *zend_objects_get_address(const zval *zobject TSRMLS_DC)
ZEND_API void zend_objects_clone_members(zend_object *new_object, zend_object_value new_obj_val, zend_object *old_object, zend_object_handle handle TSRMLS_DC)
{
zend_hash_copy(new_object->properties, old_object->properties, (copy_ctor_func_t) zval_add_ref, (void *) NULL /* Not used anymore */, sizeof(zval *));
zend_hash_copy(new_object->properties, old_object->properties, zval_copy_property_ctor(old_object->ce), (void *) NULL /* Not used anymore */, sizeof(zval *));
if (old_object->ce->clone) {
zval *new_obj;
+11
View File
@@ -159,6 +159,17 @@ ZEND_API void _zval_dtor_wrapper(zval *zvalue)
zval_dtor(zvalue);
}
ZEND_API void zval_property_ctor(zval **p) /* {{{ */
{
zval *orig_ptr = *p;
ALLOC_ZVAL(*p);
**p = *orig_ptr;
zval_copy_ctor(*p);
Z_SET_REFCOUNT_PP(p, 1);
Z_UNSET_ISREF_PP(p);
}
/* }}} */
#if ZEND_DEBUG
ZEND_API void _zval_copy_ctor_wrapper(zval *zvalue)
+11
View File
@@ -76,6 +76,17 @@ ZEND_API void _zval_internal_ptr_dtor_wrapper(zval **zvalue);
ZEND_API void zval_add_ref(zval **p);
ZEND_API void zval_property_ctor(zval **);
#ifdef ZTS
# define zval_shared_property_ctor zval_property_ctor
#else
# define zval_shared_property_ctor zval_add_ref
#endif
#define zval_copy_property_ctor(ce) ((copy_ctor_func_t) (((ce)->type == ZEND_INTERNAL_CLASS) ? zval_shared_property_ctor : zval_add_ref))
END_EXTERN_C()
#define ZVAL_DESTRUCTOR (void (*)(void *)) zval_dtor_wrapper
+44
View File
@@ -1880,6 +1880,16 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HANDLER(ZEND_OPCODE_HA
return_value_used = RETURN_VALUE_USED(opline);
if (Z_LVAL(opline->op2.u.constant) != ZEND_EVAL && strlen(Z_STRVAL_P(inc_filename)) != Z_STRLEN_P(inc_filename)) {
if (Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE_ONCE ||
Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE) {
zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
} else {
zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
}
goto done;
}
switch (Z_LVAL(opline->op2.u.constant)) {
case ZEND_INCLUDE_ONCE:
case ZEND_REQUIRE_ONCE: {
@@ -1933,6 +1943,7 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HANDLER(ZEND_OPCODE_HA
break;
EMPTY_SWITCH_DEFAULT_CASE()
}
done:
if (inc_filename==&tmp_inc_filename) {
zval_dtor(&tmp_inc_filename);
}
@@ -5154,6 +5165,16 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_TMP_HANDLER(ZEND_OPCODE_HAND
return_value_used = RETURN_VALUE_USED(opline);
if (Z_LVAL(opline->op2.u.constant) != ZEND_EVAL && strlen(Z_STRVAL_P(inc_filename)) != Z_STRLEN_P(inc_filename)) {
if (Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE_ONCE ||
Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE) {
zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
} else {
zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
}
goto done;
}
switch (Z_LVAL(opline->op2.u.constant)) {
case ZEND_INCLUDE_ONCE:
case ZEND_REQUIRE_ONCE: {
@@ -5207,6 +5228,7 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_TMP_HANDLER(ZEND_OPCODE_HAND
break;
EMPTY_SWITCH_DEFAULT_CASE()
}
done:
if (inc_filename==&tmp_inc_filename) {
zval_dtor(&tmp_inc_filename);
}
@@ -8524,6 +8546,16 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_VAR_HANDLER(ZEND_OPCODE_HAND
return_value_used = RETURN_VALUE_USED(opline);
if (Z_LVAL(opline->op2.u.constant) != ZEND_EVAL && strlen(Z_STRVAL_P(inc_filename)) != Z_STRLEN_P(inc_filename)) {
if (Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE_ONCE ||
Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE) {
zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
} else {
zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
}
goto done;
}
switch (Z_LVAL(opline->op2.u.constant)) {
case ZEND_INCLUDE_ONCE:
case ZEND_REQUIRE_ONCE: {
@@ -8577,6 +8609,7 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_VAR_HANDLER(ZEND_OPCODE_HAND
break;
EMPTY_SWITCH_DEFAULT_CASE()
}
done:
if (inc_filename==&tmp_inc_filename) {
zval_dtor(&tmp_inc_filename);
}
@@ -22387,6 +22420,16 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_CV_HANDLER(ZEND_OPCODE_HANDL
return_value_used = RETURN_VALUE_USED(opline);
if (Z_LVAL(opline->op2.u.constant) != ZEND_EVAL && strlen(Z_STRVAL_P(inc_filename)) != Z_STRLEN_P(inc_filename)) {
if (Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE_ONCE ||
Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE) {
zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
} else {
zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
}
goto done;
}
switch (Z_LVAL(opline->op2.u.constant)) {
case ZEND_INCLUDE_ONCE:
case ZEND_REQUIRE_ONCE: {
@@ -22440,6 +22483,7 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_CV_HANDLER(ZEND_OPCODE_HANDL
break;
EMPTY_SWITCH_DEFAULT_CASE()
}
done:
if (inc_filename==&tmp_inc_filename) {
zval_dtor(&tmp_inc_filename);
}
+20 -15
View File
@@ -711,10 +711,7 @@ ifelse([$2],,,[AC_MSG_CHECKING([$2])])
AC_ARG_WITH($1,[$3],$5=[$]withval,
[
$5=ifelse($4,,no,$4)
if test "$PHP_ENABLE_ALL" && test "$6" = "yes"; then
$5=$PHP_ENABLE_ALL
fi
ifelse($6,yes,[test "$PHP_ENABLE_ALL" && $5=$PHP_ENABLE_ALL])
])
PHP_ARG_ANALYZE($5,[$2],$6)
])
@@ -739,10 +736,7 @@ ifelse([$2],,,[AC_MSG_CHECKING([$2])])
AC_ARG_ENABLE($1,[$3],$5=[$]enableval,
[
$5=ifelse($4,,no,$4)
if test "$PHP_ENABLE_ALL" && test "$6" = "yes"; then
$5=$PHP_ENABLE_ALL
fi
ifelse($6,yes,[test "$PHP_ENABLE_ALL" && $5=$PHP_ENABLE_ALL])
])
PHP_ARG_ANALYZE($5,[$2],$6)
])
@@ -884,6 +878,17 @@ dnl and optionally also the source-files for the SAPI-specific
dnl objects.
dnl
AC_DEFUN([PHP_SELECT_SAPI],[
if test "$PHP_SAPI" != "default"; then
AC_MSG_ERROR([
+--------------------------------------------------------------------+
| *** ATTENTION *** |
| |
| You've configured multiple SAPIs to be build. You can build only |
| one SAPI module and CLI binary at the same time. |
+--------------------------------------------------------------------+
])
fi
PHP_SAPI=$1
case "$2" in
@@ -2661,13 +2666,13 @@ EOF
for arg in $ac_configure_args; do
if test `expr -- $arg : "'.*"` = 0; then
if test `expr -- $arg : "--.*"` = 0; then
break;
break;
fi
echo "'[$]arg' \\" >> $1
CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS '[$]arg'"
else
if test `expr -- $arg : "'--.*"` = 0; then
break;
break;
fi
echo "[$]arg \\" >> $1
CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS [$]arg"
@@ -2687,19 +2692,19 @@ AC_DEFUN([PHP_CHECK_CONFIGURE_OPTIONS],[
for arg in $ac_configure_args; do
case $arg in
--with-*[)]
arg_name="`echo [$]arg | $SED -e 's/--with-/with-/g' -e 's/=.*//g'`"
arg_name="`echo [$]arg | $SED -e 's/--with-/with-/g' -e 's/=.*//g'`"
;;
--without-*[)]
arg_name="`echo [$]arg | $SED -e 's/--without-/with-/g' -e 's/=.*//g'`"
arg_name="`echo [$]arg | $SED -e 's/--without-/with-/g' -e 's/=.*//g'`"
;;
--enable-*[)]
arg_name="`echo [$]arg | $SED -e 's/--enable-/enable-/g' -e 's/=.*//g'`"
arg_name="`echo [$]arg | $SED -e 's/--enable-/enable-/g' -e 's/=.*//g'`"
;;
--disable-*[)]
arg_name="`echo [$]arg | $SED -e 's/--disable-/enable-/g' -e 's/=.*//g'`"
arg_name="`echo [$]arg | $SED -e 's/--disable-/enable-/g' -e 's/=.*//g'`"
;;
*[)]
continue
continue
;;
esac
case $arg_name in
+6 -6
View File
@@ -41,8 +41,8 @@ AC_CONFIG_HEADER(main/php_config.h)
PHP_MAJOR_VERSION=5
PHP_MINOR_VERSION=3
PHP_RELEASE_VERSION=3
PHP_EXTRA_VERSION="RC3"
PHP_RELEASE_VERSION=4
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`
@@ -611,7 +611,7 @@ asprintf \
)
dnl Some systems (like OpenSolaris) do not have nanosleep in libc
PHP_CHECK_FUNC(nanosleep, rt)
PHP_CHECK_FUNC_LIB(nanosleep, rt)
dnl Check for getaddrinfo, should be a better way, but...
dnl Also check for working getaddrinfo
@@ -764,7 +764,7 @@ if test "$PHP_DEBUG" = "yes"; then
changequote([,])
dnl add -O0 only if GCC or ICC is used
if test "$GCC" = "yes" || test "$ICC" = "yes"; then
CFLAGS="$CFLAGS -g -O0"
CFLAGS="$CFLAGS -O0"
CXXFLAGS="$CXXFLAGS -g -O0"
fi
if test "$SUNCC" = "yes"; then
@@ -1329,8 +1329,8 @@ dnl Autoconf 2.13's libtool checks go slightly nuts on Mac OS X 10.5 and 10.6.
dnl This hack works around it. Ugly.
case $host_alias in
*darwin9*|*darwin10*)
ac_cv_exeext=
;;
ac_cv_exeext=
;;
esac
dnl Only allow AC_PROG_CXX and AC_PROG_CXXCPP if they are explicitly called (by PHP_REQUIRE_CXX).
+4 -1
View File
@@ -317,7 +317,7 @@ static PHP_MINFO_FUNCTION(bz2)
{
php_info_print_table_start();
php_info_print_table_row(2, "BZip2 Support", "Enabled");
php_info_print_table_row(2, "Stream Wrapper support", "compress.bz2://");
php_info_print_table_row(2, "Stream Wrapper support", "compress.bzip2://");
php_info_print_table_row(2, "Stream Filter support", "bzip2.decompress, bzip2.compress");
php_info_print_table_row(2, "BZip2 Version", (char *) BZ2_bzlibVersion());
php_info_print_table_end();
@@ -387,6 +387,9 @@ static PHP_FUNCTION(bzopen)
if (Z_TYPE_PP(file) == IS_STRING) {
convert_to_string_ex(file);
if (strlen(Z_STRVAL_PP(file)) != Z_STRLEN_PP(file)) {
RETURN_FALSE;
}
if (Z_STRLEN_PP(file) == 0) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "filename cannot be empty");
RETURN_FALSE;
+9 -2
View File
@@ -348,8 +348,15 @@ PHP_FUNCTION(cal_days_in_month)
sdn_next = calendar->to_jd(year, 1 + month, 1);
if (sdn_next == 0) {
/* if invalid, try first month of the next year... */
sdn_next = calendar->to_jd(year + 1, 1, 1);
/* If the next month is invalid, then we need to try the first month of
* the next year, bearing in mind that the next year after 1 BCE is
* actually 1 AD and not 0. */
if (year == -1) {
sdn_next = calendar->to_jd(1, 1, 1);
}
else {
sdn_next = calendar->to_jd(year + 1, 1, 1);
}
}
RETURN_LONG(sdn_next - sdn_start);
+12
View File
@@ -0,0 +1,12 @@
--TEST--
Bug #52744 (cal_days_in_month incorrect for December 1 BCE)
--SKIPIF--
<?php include 'skipif.inc'; ?>
--FILE--
<?php
var_dump(cal_days_in_month(CAL_GREGORIAN, 12, -1));
var_dump(cal_days_in_month(CAL_JULIAN, 12, -1));
?>
--EXPECT--
int(31)
int(31)
+7
View File
@@ -389,6 +389,9 @@ CPH_METHOD(SaveToFile)
}
if (filename) {
if (strlen(filename) != filename_len) {
RETURN_FALSE;
}
fullpath = expand_filepath(filename, NULL TSRMLS_CC);
if (!fullpath) {
RETURN_FALSE;
@@ -453,6 +456,10 @@ CPH_METHOD(LoadFromFile)
return;
}
if (strlen(filename) != filename_len) {
RETURN_FALSE;
}
if (!(fullpath = expand_filepath(filename, NULL TSRMLS_CC))) {
RETURN_FALSE;
}
+17 -17
View File
@@ -1252,7 +1252,6 @@ static size_t curl_passwd(void *ctx, char *prompt, char *buf, int buflen)
/* }}} */
#endif
#if LIBCURL_VERSION_NUM < 0x071101
/* {{{ curl_free_string
*/
static void curl_free_string(void **string)
@@ -1260,7 +1259,6 @@ static void curl_free_string(void **string)
efree(*string);
}
/* }}} */
#endif
/* {{{ curl_free_post
*/
@@ -1337,9 +1335,7 @@ static void alloc_curl_handle(php_curl **ch)
memset(&(*ch)->err, 0, sizeof((*ch)->err));
#if LIBCURL_VERSION_NUM < 0x071101
zend_llist_init(&(*ch)->to_free.str, sizeof(char *), (llist_dtor_func_t) curl_free_string, 0);
#endif
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);
}
@@ -1556,11 +1552,10 @@ PHP_FUNCTION(curl_copy_handle)
curl_easy_setopt(dupch->cp, CURLOPT_INFILE, (void *) dupch);
curl_easy_setopt(dupch->cp, CURLOPT_WRITEHEADER, (void *) dupch);
#if LIBCURL_VERSION_NUM < 0x071101
zend_llist_copy(&dupch->to_free.str, &ch->to_free.str);
/* Don't try to free copied strings, they're free'd when the original handle is destroyed */
dupch->to_free.str.dtor = NULL;
#endif
zend_llist_copy(&dupch->to_free.slist, &ch->to_free.slist);
zend_llist_copy(&dupch->to_free.post, &ch->to_free.post);
@@ -1742,14 +1737,22 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu
return 1;
}
} else {
#if LIBCURL_VERSION_NUM >= 0x071100
/* Strings passed to libcurl as ’char *’ arguments, are copied by the library... NOTE: before 7.17.0 strings were not copied. */
error = curl_easy_setopt(ch->cp, option, Z_STRVAL_PP(zvalue));
#else
copystr = estrndup(Z_STRVAL_PP(zvalue), Z_STRLEN_PP(zvalue));
error = curl_easy_setopt(ch->cp, option, copystr);
zend_llist_add_element(&ch->to_free.str, &copystr);
if (option == CURLOPT_PRIVATE) {
char *copystr;
#if LIBCURL_VERSION_NUM < 0x071100
string_copy:
#endif
copystr = estrndup(Z_STRVAL_PP(zvalue), Z_STRLEN_PP(zvalue));
error = curl_easy_setopt(ch->cp, option, copystr);
zend_llist_add_element(&ch->to_free.str, &copystr);
} else {
#if LIBCURL_VERSION_NUM >= 0x071100
/* Strings passed to libcurl as ’char *’ arguments, are copied by the library... NOTE: before 7.17.0 strings were not copied. */
error = curl_easy_setopt(ch->cp, option, Z_STRVAL_PP(zvalue));
#else
goto string_copy;
#endif
}
}
break;
}
@@ -1761,7 +1764,7 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu
int type;
void * what;
what = zend_fetch_resource(zvalue TSRMLS_CC, -1, "File-Handle", &type, 1, php_file_le_stream());
what = zend_fetch_resource(zvalue TSRMLS_CC, -1, "File-Handle", &type, 1, php_file_le_stream(), php_file_le_pstream());
if (!what) {
RETVAL_FALSE;
return 1;
@@ -1816,7 +1819,6 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu
}
zval_add_ref(zvalue);
ch->handlers->std_err = *zvalue;
zend_list_addref(Z_LVAL_PP(zvalue));
} else {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "the provided file handle is not writable");
RETVAL_FALSE;
@@ -2457,9 +2459,7 @@ static void _php_curl_close_ex(php_curl *ch TSRMLS_DC)
}
curl_easy_cleanup(ch->cp);
#if LIBCURL_VERSION_NUM < 0x071101
zend_llist_clean(&ch->to_free.str);
#endif
/* cURL destructors should be invoked only by last curl handle */
if (Z_REFCOUNT_P(ch->clone) <= 1) {
-2
View File
@@ -124,9 +124,7 @@ struct _php_curl_send_headers {
};
struct _php_curl_free {
#if LIBCURL_VERSION_NUM < 0x071100
zend_llist str;
#endif
zend_llist post;
zend_llist slist;
};
+16
View File
@@ -0,0 +1,16 @@
--TEST--
Bug #52202 (CURLOPT_PRIVATE gets clobbered)
--SKIPIF--
<?php
if (!extension_loaded('curl')) exit("skip curl extension not loaded");
?>
--FILE--
<?php
$curl = curl_init("http://www.google.com");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_PRIVATE, "123");
curl_exec($curl);
var_dump(curl_getinfo($curl, CURLINFO_PRIVATE));
--EXPECT--
string(3) "123"
+32
View File
@@ -0,0 +1,32 @@
--TEST--
Bug #52827 (curl_setopt with CURLOPT_STDERR erroneously increments the resource refcount)
--SKIPIF--
<?php
if (!extension_loaded('curl')) {
exit("skip curl extension not loaded");
}
?>
--FILE--
<?php
$s = fopen('php://temp/maxmemory=1024','wb+');
/* force conversion of inner stream to STDIO.
* This is not necessary in Windows because the
* cast to a FILE* handle in curl_setopt already
* forces the conversion in that platform. The
* reason for this conversion is that the memory
* stream has an ugly but working mechanism to
* prevent being double freed when it's encapsulated,
* while STDIO streams don't. */
$i = 0;
while ($i++ < 5000) {
fwrite($s, str_repeat('a',1024));
}
$handle=curl_init('http://www.example.com');
curl_setopt($handle, CURLOPT_STDERR, $s);
echo "Done.";
--EXPECTF--
Done.
@@ -17,7 +17,7 @@ if (!extension_loaded('curl')) print 'skip';
//SET URL AND OTHER OPTIONS
curl_setopt($ch1, CURLOPT_URL, "http://php.net/robots.txt");
curl_setopt($ch2, CURLOPT_URL, "file://".dirname(__FILE__)."/curl_testdata2.txt");
curl_setopt($ch2, CURLOPT_URL, "file://".dirname(__FILE__). DIRECTORY_SEPARATOR . "curl_testdata2.txt");
curl_setopt($ch1, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch2, CURLOPT_RETURNTRANSFER, true);
@@ -55,5 +55,10 @@ Disallow: /source.php
Disallow: /search.php
Disallow: /mod.php
Disallow: /manual/add-note.php
Disallow: /harming/humans
Disallow: /ignoring/human/orders
Disallow: /harm/to/self
CURL2
@@ -16,8 +16,8 @@ if (!extension_loaded('curl')) print 'skip';
$ch2=curl_init();
//SET URL AND OTHER OPTIONS
curl_setopt($ch1, CURLOPT_URL, "file://".dirname(__FILE__)."/curl_testdata1.txt");
curl_setopt($ch2, CURLOPT_URL, "file://".dirname(__FILE__)."/curl_testdata2.txt");
curl_setopt($ch1, CURLOPT_URL, "file://".dirname(__FILE__). DIRECTORY_SEPARATOR . "curl_testdata1.txt");
curl_setopt($ch2, CURLOPT_URL, "file://".dirname(__FILE__). DIRECTORY_SEPARATOR . "curl_testdata2.txt");
curl_setopt($ch1, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch2, CURLOPT_RETURNTRANSFER, true);
@@ -16,8 +16,8 @@ if (!extension_loaded('curl')) print 'skip';
$ch2=curl_init();
//SET URL AND OTHER OPTIONS
curl_setopt($ch1, CURLOPT_URL, "file://".dirname(__FILE__)."/curl_testdata1.txt");
curl_setopt($ch2, CURLOPT_URL, "file://".dirname(__FILE__)."/curl_testdata2.txt");
curl_setopt($ch1, CURLOPT_URL, "file://".dirname(__FILE__). DIRECTORY_SEPARATOR . "curl_testdata1.txt");
curl_setopt($ch2, CURLOPT_URL, "file://".dirname(__FILE__). DIRECTORY_SEPARATOR . "curl_testdata2.txt");
curl_setopt($ch1, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch2, CURLOPT_RETURNTRANSFER, true);
@@ -16,8 +16,8 @@ if (!extension_loaded('curl')) print 'skip';
$ch2=curl_init();
//SET URL AND OTHER OPTIONS
curl_setopt($ch1, CURLOPT_URL, "file://".dirname(__FILE__)."/curl_testdata1.txt");
curl_setopt($ch2, CURLOPT_URL, "file://".dirname(__FILE__)."/curl_testdata2.txt");
curl_setopt($ch1, CURLOPT_URL, "file://".dirname(__FILE__). DIRECTORY_SEPARATOR . "curl_testdata1.txt");
curl_setopt($ch2, CURLOPT_URL, "file://".dirname(__FILE__). DIRECTORY_SEPARATOR . "curl_testdata2.txt");
curl_setopt($ch1, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch2, CURLOPT_RETURNTRANSFER, true);
@@ -16,8 +16,8 @@ if (!extension_loaded('curl')) print 'skip';
$ch2=curl_init();
//SET URL AND OTHER OPTIONS
curl_setopt($ch1, CURLOPT_URL, "file://".dirname(__FILE__)."/curl_testdata1.txt");
curl_setopt($ch2, CURLOPT_URL, "file://".dirname(__FILE__)."/curl_testdata2.txt");
curl_setopt($ch1, CURLOPT_URL, "file://".dirname(__FILE__). DIRECTORY_SEPARATOR . "curl_testdata1.txt");
curl_setopt($ch2, CURLOPT_URL, "file://".dirname(__FILE__). DIRECTORY_SEPARATOR . "curl_testdata2.txt");
curl_setopt($ch1, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch2, CURLOPT_RETURNTRANSFER, true);
+1 -1
View File
@@ -27,7 +27,7 @@ curl_close($ch);
var_dump( $curl_content );
?>
--EXPECTF--
Warning: Directive 'safe_mode' is deprecated in PHP 5.3 and greater in Unknown on line 0
Deprecated: Directive 'safe_mode' is deprecated in PHP 5.3 and greater in Unknown on line 0
*** Testing curl_setopt with CURLOPT_FOLLOWLOCATION in safemode
Warning: curl_setopt(): CURLOPT_FOLLOWLOCATION cannot be activated when safe_mode is enabled or an open_basedir is set in %s on line %d
+1
View File
@@ -42,3 +42,4 @@ Warning: curl_setopt() expects parameter 1 to be resource, boolean given in %s o
Warning: curl_setopt() expects parameter 2 to be long, %unicode_string_optional% given in %s on line %d
Warning: curl_setopt(): Invalid curl configuration option in %scurl_setopt_error.php on line %d
+105 -99
View File
@@ -1,4 +1,4 @@
/* Generated by re2c 0.13.5 on Fri Mar 26 12:00:44 2010 */
/* Generated by re2c 0.13.5 on Sat Nov 13 14:58:02 2010 */
#line 1 "ext/date/lib/parse_date.re"
/*
+----------------------------------------------------------------------+
@@ -843,11 +843,11 @@ static int scan(Scanner *s)
std:
s->tok = cursor;
s->len = 0;
#line 967 "ext/date/lib/parse_date.re"
#line 969 "ext/date/lib/parse_date.re"
#line 849 "ext/date/lib/parse_date.c"
#line 851 "ext/date/lib/parse_date.c"
{
YYCTYPE yych;
unsigned int yyaccept = 0;
@@ -967,7 +967,7 @@ std:
}
yy2:
YYDEBUG(2, *YYCURSOR);
#line 1052 "ext/date/lib/parse_date.re"
#line 1054 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("firstdayof | lastdayof");
TIMELIB_INIT;
@@ -983,7 +983,7 @@ yy2:
TIMELIB_DEINIT;
return TIMELIB_LF_DAY_OF_MONTH;
}
#line 985 "ext/date/lib/parse_date.c"
#line 987 "ext/date/lib/parse_date.c"
yy3:
YYDEBUG(3, *YYCURSOR);
++YYCURSOR;
@@ -1006,7 +1006,7 @@ yy3:
}
yy4:
YYDEBUG(4, *YYCURSOR);
#line 1634 "ext/date/lib/parse_date.re"
#line 1636 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("tzcorrection | tz");
@@ -1019,7 +1019,7 @@ yy4:
TIMELIB_DEINIT;
return TIMELIB_TIMEZONE;
}
#line 1021 "ext/date/lib/parse_date.c"
#line 1023 "ext/date/lib/parse_date.c"
yy5:
YYDEBUG(5, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1330,12 +1330,12 @@ yy12:
if (yych <= '9') goto yy1385;
yy13:
YYDEBUG(13, *YYCURSOR);
#line 1729 "ext/date/lib/parse_date.re"
#line 1731 "ext/date/lib/parse_date.re"
{
add_error(s, "Unexpected character");
goto std;
}
#line 1337 "ext/date/lib/parse_date.c"
#line 1339 "ext/date/lib/parse_date.c"
yy14:
YYDEBUG(14, *YYCURSOR);
yych = *++YYCURSOR;
@@ -2392,11 +2392,11 @@ yy49:
if (yych <= '9') goto yy55;
yy50:
YYDEBUG(50, *YYCURSOR);
#line 1718 "ext/date/lib/parse_date.re"
#line 1720 "ext/date/lib/parse_date.re"
{
goto std;
}
#line 2398 "ext/date/lib/parse_date.c"
#line 2400 "ext/date/lib/parse_date.c"
yy51:
YYDEBUG(51, *YYCURSOR);
yych = *++YYCURSOR;
@@ -2405,12 +2405,12 @@ yy52:
YYDEBUG(52, *YYCURSOR);
++YYCURSOR;
YYDEBUG(53, *YYCURSOR);
#line 1723 "ext/date/lib/parse_date.re"
#line 1725 "ext/date/lib/parse_date.re"
{
s->pos = cursor; s->line++;
goto std;
}
#line 2412 "ext/date/lib/parse_date.c"
#line 2414 "ext/date/lib/parse_date.c"
yy54:
YYDEBUG(54, *YYCURSOR);
yych = *++YYCURSOR;
@@ -2797,7 +2797,7 @@ yy72:
if (yych == 's') goto yy74;
yy73:
YYDEBUG(73, *YYCURSOR);
#line 1702 "ext/date/lib/parse_date.re"
#line 1704 "ext/date/lib/parse_date.re"
{
timelib_ull i;
DEBUG_OUTPUT("relative");
@@ -2812,7 +2812,7 @@ yy73:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
#line 2814 "ext/date/lib/parse_date.c"
#line 2816 "ext/date/lib/parse_date.c"
yy74:
YYDEBUG(74, *YYCURSOR);
yych = *++YYCURSOR;
@@ -3574,7 +3574,7 @@ yy166:
}
yy167:
YYDEBUG(167, *YYCURSOR);
#line 1565 "ext/date/lib/parse_date.re"
#line 1567 "ext/date/lib/parse_date.re"
{
const timelib_relunit* relunit;
DEBUG_OUTPUT("daytext");
@@ -3591,7 +3591,7 @@ yy167:
TIMELIB_DEINIT;
return TIMELIB_WEEKDAY;
}
#line 3593 "ext/date/lib/parse_date.c"
#line 3595 "ext/date/lib/parse_date.c"
yy168:
YYDEBUG(168, *YYCURSOR);
yych = *++YYCURSOR;
@@ -4111,7 +4111,7 @@ yy193:
}
yy194:
YYDEBUG(194, *YYCURSOR);
#line 1624 "ext/date/lib/parse_date.re"
#line 1626 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("monthtext");
TIMELIB_INIT;
@@ -4120,7 +4120,7 @@ yy194:
TIMELIB_DEINIT;
return TIMELIB_DATE_TEXT;
}
#line 4122 "ext/date/lib/parse_date.c"
#line 4124 "ext/date/lib/parse_date.c"
yy195:
YYDEBUG(195, *YYCURSOR);
++YYCURSOR;
@@ -4171,7 +4171,7 @@ yy198:
}
yy199:
YYDEBUG(199, *YYCURSOR);
#line 1374 "ext/date/lib/parse_date.re"
#line 1376 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("datetextual | datenoyear");
TIMELIB_INIT;
@@ -4183,7 +4183,7 @@ yy199:
TIMELIB_DEINIT;
return TIMELIB_DATE_TEXT;
}
#line 4185 "ext/date/lib/parse_date.c"
#line 4187 "ext/date/lib/parse_date.c"
yy200:
YYDEBUG(200, *YYCURSOR);
yyaccept = 6;
@@ -4452,7 +4452,7 @@ yy222:
}
yy223:
YYDEBUG(223, *YYCURSOR);
#line 1672 "ext/date/lib/parse_date.re"
#line 1674 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("dateshortwithtimeshort | dateshortwithtimelong | dateshortwithtimelongtz");
@@ -4481,7 +4481,7 @@ yy223:
TIMELIB_DEINIT;
return TIMELIB_SHORTDATE_WITH_TIME;
}
#line 4483 "ext/date/lib/parse_date.c"
#line 4485 "ext/date/lib/parse_date.c"
yy224:
YYDEBUG(224, *YYCURSOR);
yyaccept = 7;
@@ -5179,7 +5179,7 @@ yy278:
YYDEBUG(278, *YYCURSOR);
++YYCURSOR;
YYDEBUG(279, *YYCURSOR);
#line 1648 "ext/date/lib/parse_date.re"
#line 1650 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("dateshortwithtimeshort12 | dateshortwithtimelong12");
TIMELIB_INIT;
@@ -5202,7 +5202,7 @@ yy278:
TIMELIB_DEINIT;
return TIMELIB_SHORTDATE_WITH_TIME;
}
#line 5204 "ext/date/lib/parse_date.c"
#line 5206 "ext/date/lib/parse_date.c"
yy280:
YYDEBUG(280, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5380,7 +5380,7 @@ yy294:
++YYCURSOR;
yy295:
YYDEBUG(295, *YYCURSOR);
#line 1348 "ext/date/lib/parse_date.re"
#line 1350 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("datenoday");
TIMELIB_INIT;
@@ -5392,7 +5392,7 @@ yy295:
TIMELIB_DEINIT;
return TIMELIB_DATE_NO_DAY;
}
#line 5394 "ext/date/lib/parse_date.c"
#line 5396 "ext/date/lib/parse_date.c"
yy296:
YYDEBUG(296, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6612,7 +6612,7 @@ yy362:
if (yych <= '9') goto yy365;
yy364:
YYDEBUG(364, *YYCURSOR);
#line 1488 "ext/date/lib/parse_date.re"
#line 1490 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("pgtextshort");
TIMELIB_INIT;
@@ -6624,7 +6624,7 @@ yy364:
TIMELIB_DEINIT;
return TIMELIB_PG_TEXT;
}
#line 6626 "ext/date/lib/parse_date.c"
#line 6628 "ext/date/lib/parse_date.c"
yy365:
YYDEBUG(365, *YYCURSOR);
yych = *++YYCURSOR;
@@ -7262,7 +7262,7 @@ yy392:
}
yy393:
YYDEBUG(393, *YYCURSOR);
#line 1544 "ext/date/lib/parse_date.re"
#line 1546 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("ago");
TIMELIB_INIT;
@@ -7282,7 +7282,7 @@ yy393:
TIMELIB_DEINIT;
return TIMELIB_AGO;
}
#line 7284 "ext/date/lib/parse_date.c"
#line 7286 "ext/date/lib/parse_date.c"
yy394:
YYDEBUG(394, *YYCURSOR);
yyaccept = 5;
@@ -9032,7 +9032,7 @@ yy454:
++YYCURSOR;
yy455:
YYDEBUG(455, *YYCURSOR);
#line 1258 "ext/date/lib/parse_date.re"
#line 1260 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("iso8601date4 | iso8601date2 | iso8601dateslash | dateslash");
TIMELIB_INIT;
@@ -9043,7 +9043,7 @@ yy455:
TIMELIB_DEINIT;
return TIMELIB_ISO_DATE;
}
#line 9045 "ext/date/lib/parse_date.c"
#line 9047 "ext/date/lib/parse_date.c"
yy456:
YYDEBUG(456, *YYCURSOR);
yyaccept = 0;
@@ -9603,7 +9603,7 @@ yy475:
}
yy476:
YYDEBUG(476, *YYCURSOR);
#line 1387 "ext/date/lib/parse_date.re"
#line 1389 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("datenoyearrev");
TIMELIB_INIT;
@@ -9614,7 +9614,7 @@ yy476:
TIMELIB_DEINIT;
return TIMELIB_DATE_TEXT;
}
#line 9616 "ext/date/lib/parse_date.c"
#line 9618 "ext/date/lib/parse_date.c"
yy477:
YYDEBUG(477, *YYCURSOR);
yyaccept = 10;
@@ -9755,7 +9755,7 @@ yy488:
YYDEBUG(488, *YYCURSOR);
++YYCURSOR;
YYDEBUG(489, *YYCURSOR);
#line 1114 "ext/date/lib/parse_date.re"
#line 1116 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("timetiny12 | timeshort12 | timelong12");
TIMELIB_INIT;
@@ -9771,7 +9771,7 @@ yy488:
TIMELIB_DEINIT;
return TIMELIB_TIME12;
}
#line 9773 "ext/date/lib/parse_date.c"
#line 9775 "ext/date/lib/parse_date.c"
yy490:
YYDEBUG(490, *YYCURSOR);
yyaccept = 11;
@@ -9784,7 +9784,7 @@ yy490:
}
yy491:
YYDEBUG(491, *YYCURSOR);
#line 1151 "ext/date/lib/parse_date.re"
#line 1153 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("timeshort24 | timelong24 | iso8601long");
@@ -9809,7 +9809,7 @@ yy491:
TIMELIB_DEINIT;
return TIMELIB_TIME24_WITH_ZONE;
}
#line 9811 "ext/date/lib/parse_date.c"
#line 9813 "ext/date/lib/parse_date.c"
yy492:
YYDEBUG(492, *YYCURSOR);
yyaccept = 11;
@@ -10119,7 +10119,7 @@ yy523:
YYDEBUG(523, *YYCURSOR);
++YYCURSOR;
YYDEBUG(524, *YYCURSOR);
#line 1131 "ext/date/lib/parse_date.re"
#line 1133 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("mssqltime");
TIMELIB_INIT;
@@ -10138,7 +10138,7 @@ yy523:
TIMELIB_DEINIT;
return TIMELIB_TIME24_WITH_ZONE;
}
#line 10140 "ext/date/lib/parse_date.c"
#line 10142 "ext/date/lib/parse_date.c"
yy525:
YYDEBUG(525, *YYCURSOR);
yyaccept = 11;
@@ -10244,7 +10244,7 @@ yy534:
if (yych <= '9') goto yy541;
yy535:
YYDEBUG(535, *YYCURSOR);
#line 1309 "ext/date/lib/parse_date.re"
#line 1311 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("datefull");
TIMELIB_INIT;
@@ -10257,7 +10257,7 @@ yy535:
TIMELIB_DEINIT;
return TIMELIB_DATE_FULL;
}
#line 10259 "ext/date/lib/parse_date.c"
#line 10261 "ext/date/lib/parse_date.c"
yy536:
YYDEBUG(536, *YYCURSOR);
yych = *++YYCURSOR;
@@ -10994,7 +10994,7 @@ yy605:
YYDEBUG(606, *YYCURSOR);
++YYCURSOR;
YYDEBUG(607, *YYCURSOR);
#line 1323 "ext/date/lib/parse_date.re"
#line 1325 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("pointed date YYYY");
TIMELIB_INIT;
@@ -11005,7 +11005,7 @@ yy605:
TIMELIB_DEINIT;
return TIMELIB_DATE_FULL_POINTED;
}
#line 11007 "ext/date/lib/parse_date.c"
#line 11009 "ext/date/lib/parse_date.c"
yy608:
YYDEBUG(608, *YYCURSOR);
yyaccept = 11;
@@ -11041,7 +11041,7 @@ yy611:
if (yych <= '9') goto yy605;
yy612:
YYDEBUG(612, *YYCURSOR);
#line 1335 "ext/date/lib/parse_date.re"
#line 1337 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("pointed date YY");
TIMELIB_INIT;
@@ -11053,7 +11053,7 @@ yy612:
TIMELIB_DEINIT;
return TIMELIB_DATE_FULL_POINTED;
}
#line 11055 "ext/date/lib/parse_date.c"
#line 11057 "ext/date/lib/parse_date.c"
yy613:
YYDEBUG(613, *YYCURSOR);
yyaccept = 11;
@@ -11694,7 +11694,7 @@ yy656:
}
yy657:
YYDEBUG(657, *YYCURSOR);
#line 1296 "ext/date/lib/parse_date.re"
#line 1298 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("gnudateshort");
TIMELIB_INIT;
@@ -11706,7 +11706,7 @@ yy657:
TIMELIB_DEINIT;
return TIMELIB_ISO_DATE;
}
#line 11708 "ext/date/lib/parse_date.c"
#line 11710 "ext/date/lib/parse_date.c"
yy658:
YYDEBUG(658, *YYCURSOR);
yyaccept = 13;
@@ -11812,7 +11812,7 @@ yy666:
}
yy667:
YYDEBUG(667, *YYCURSOR);
#line 1243 "ext/date/lib/parse_date.re"
#line 1245 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("americanshort | american");
TIMELIB_INIT;
@@ -11826,7 +11826,7 @@ yy667:
TIMELIB_DEINIT;
return TIMELIB_AMERICAN;
}
#line 11828 "ext/date/lib/parse_date.c"
#line 11830 "ext/date/lib/parse_date.c"
yy668:
YYDEBUG(668, *YYCURSOR);
yyaccept = 14;
@@ -12059,7 +12059,7 @@ yy700:
if (yych <= ':') goto yy704;
yy701:
YYDEBUG(701, *YYCURSOR);
#line 1514 "ext/date/lib/parse_date.re"
#line 1516 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("clf");
@@ -12079,7 +12079,7 @@ yy701:
TIMELIB_DEINIT;
return TIMELIB_CLF;
}
#line 12081 "ext/date/lib/parse_date.c"
#line 12083 "ext/date/lib/parse_date.c"
yy702:
YYDEBUG(702, *YYCURSOR);
yych = *++YYCURSOR;
@@ -12631,7 +12631,7 @@ yy763:
}
yy764:
YYDEBUG(764, *YYCURSOR);
#line 1270 "ext/date/lib/parse_date.re"
#line 1272 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("iso8601date2");
TIMELIB_INIT;
@@ -12643,7 +12643,7 @@ yy764:
TIMELIB_DEINIT;
return TIMELIB_ISO_DATE;
}
#line 12645 "ext/date/lib/parse_date.c"
#line 12647 "ext/date/lib/parse_date.c"
yy765:
YYDEBUG(765, *YYCURSOR);
yych = *++YYCURSOR;
@@ -12682,7 +12682,7 @@ yy771:
YYDEBUG(771, *YYCURSOR);
++YYCURSOR;
YYDEBUG(772, *YYCURSOR);
#line 1501 "ext/date/lib/parse_date.re"
#line 1503 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("pgtextreverse");
TIMELIB_INIT;
@@ -12694,7 +12694,7 @@ yy771:
TIMELIB_DEINIT;
return TIMELIB_PG_TEXT;
}
#line 12696 "ext/date/lib/parse_date.c"
#line 12698 "ext/date/lib/parse_date.c"
yy773:
YYDEBUG(773, *YYCURSOR);
yych = *++YYCURSOR;
@@ -12832,7 +12832,7 @@ yy783:
}
yy784:
YYDEBUG(784, *YYCURSOR);
#line 1535 "ext/date/lib/parse_date.re"
#line 1537 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("year4");
TIMELIB_INIT;
@@ -12840,7 +12840,7 @@ yy784:
TIMELIB_DEINIT;
return TIMELIB_CLF;
}
#line 12842 "ext/date/lib/parse_date.c"
#line 12844 "ext/date/lib/parse_date.c"
yy785:
YYDEBUG(785, *YYCURSOR);
yych = *++YYCURSOR;
@@ -12991,7 +12991,7 @@ yy793:
}
yy794:
YYDEBUG(794, *YYCURSOR);
#line 1361 "ext/date/lib/parse_date.re"
#line 1363 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("datenodayrev");
TIMELIB_INIT;
@@ -13003,7 +13003,7 @@ yy794:
TIMELIB_DEINIT;
return TIMELIB_DATE_NO_DAY;
}
#line 13005 "ext/date/lib/parse_date.c"
#line 13007 "ext/date/lib/parse_date.c"
yy795:
YYDEBUG(795, *YYCURSOR);
yych = *++YYCURSOR;
@@ -13218,7 +13218,7 @@ yy814:
if (yych <= '7') goto yy817;
yy815:
YYDEBUG(815, *YYCURSOR);
#line 1469 "ext/date/lib/parse_date.re"
#line 1471 "ext/date/lib/parse_date.re"
{
timelib_sll w, d;
DEBUG_OUTPUT("isoweek");
@@ -13236,7 +13236,7 @@ yy815:
TIMELIB_DEINIT;
return TIMELIB_ISO_WEEK;
}
#line 13238 "ext/date/lib/parse_date.c"
#line 13240 "ext/date/lib/parse_date.c"
yy816:
YYDEBUG(816, *YYCURSOR);
yych = *++YYCURSOR;
@@ -13246,7 +13246,7 @@ yy817:
YYDEBUG(817, *YYCURSOR);
++YYCURSOR;
YYDEBUG(818, *YYCURSOR);
#line 1450 "ext/date/lib/parse_date.re"
#line 1452 "ext/date/lib/parse_date.re"
{
timelib_sll w, d;
DEBUG_OUTPUT("isoweekday");
@@ -13264,7 +13264,7 @@ yy817:
TIMELIB_DEINIT;
return TIMELIB_ISO_WEEK;
}
#line 13266 "ext/date/lib/parse_date.c"
#line 13268 "ext/date/lib/parse_date.c"
yy819:
YYDEBUG(819, *YYCURSOR);
yych = *++YYCURSOR;
@@ -13328,7 +13328,7 @@ yy821:
}
yy822:
YYDEBUG(822, *YYCURSOR);
#line 1437 "ext/date/lib/parse_date.re"
#line 1439 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("pgydotd");
TIMELIB_INIT;
@@ -13340,7 +13340,7 @@ yy822:
TIMELIB_DEINIT;
return TIMELIB_PG_YEARDAY;
}
#line 13342 "ext/date/lib/parse_date.c"
#line 13344 "ext/date/lib/parse_date.c"
yy823:
YYDEBUG(823, *YYCURSOR);
yych = *++YYCURSOR;
@@ -13443,7 +13443,7 @@ yy842:
++YYCURSOR;
yy843:
YYDEBUG(843, *YYCURSOR);
#line 1411 "ext/date/lib/parse_date.re"
#line 1413 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("xmlrpc | xmlrpcnocolon | soap | wddx | exif");
@@ -13468,7 +13468,7 @@ yy843:
TIMELIB_DEINIT;
return TIMELIB_XMLRPC_SOAP;
}
#line 13470 "ext/date/lib/parse_date.c"
#line 13472 "ext/date/lib/parse_date.c"
yy844:
YYDEBUG(844, *YYCURSOR);
yych = *++YYCURSOR;
@@ -13730,7 +13730,7 @@ yy848:
}
yy849:
YYDEBUG(849, *YYCURSOR);
#line 1399 "ext/date/lib/parse_date.re"
#line 1401 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("datenocolon");
TIMELIB_INIT;
@@ -13741,7 +13741,7 @@ yy849:
TIMELIB_DEINIT;
return TIMELIB_DATE_NOCOLON;
}
#line 13743 "ext/date/lib/parse_date.c"
#line 13745 "ext/date/lib/parse_date.c"
yy850:
YYDEBUG(850, *YYCURSOR);
yych = *++YYCURSOR;
@@ -14661,7 +14661,7 @@ yy973:
if (yych <= '9') goto yy996;
yy974:
YYDEBUG(974, *YYCURSOR);
#line 1283 "ext/date/lib/parse_date.re"
#line 1285 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("gnudateshorter");
TIMELIB_INIT;
@@ -14673,7 +14673,7 @@ yy974:
TIMELIB_DEINIT;
return TIMELIB_ISO_DATE;
}
#line 14675 "ext/date/lib/parse_date.c"
#line 14677 "ext/date/lib/parse_date.c"
yy975:
YYDEBUG(975, *YYCURSOR);
yyaccept = 22;
@@ -15682,7 +15682,7 @@ yy1066:
}
yy1068:
YYDEBUG(1068, *YYCURSOR);
#line 1177 "ext/date/lib/parse_date.re"
#line 1179 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("gnunocolon");
TIMELIB_INIT;
@@ -15704,7 +15704,7 @@ yy1068:
TIMELIB_DEINIT;
return TIMELIB_GNU_NOCOLON;
}
#line 15706 "ext/date/lib/parse_date.c"
#line 15708 "ext/date/lib/parse_date.c"
yy1069:
YYDEBUG(1069, *YYCURSOR);
yych = *++YYCURSOR;
@@ -15796,7 +15796,7 @@ yy1075:
}
yy1076:
YYDEBUG(1076, *YYCURSOR);
#line 1223 "ext/date/lib/parse_date.re"
#line 1225 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("iso8601nocolon");
@@ -15815,7 +15815,7 @@ yy1076:
TIMELIB_DEINIT;
return TIMELIB_ISO_NOCOLON;
}
#line 15817 "ext/date/lib/parse_date.c"
#line 15819 "ext/date/lib/parse_date.c"
yy1077:
YYDEBUG(1077, *YYCURSOR);
yyaccept = 25;
@@ -16713,7 +16713,7 @@ yy1117:
}
yy1118:
YYDEBUG(1118, *YYCURSOR);
#line 1607 "ext/date/lib/parse_date.re"
#line 1609 "ext/date/lib/parse_date.re"
{
timelib_sll i;
int behavior = 0;
@@ -16729,7 +16729,7 @@ yy1118:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
#line 16731 "ext/date/lib/parse_date.c"
#line 16733 "ext/date/lib/parse_date.c"
yy1119:
YYDEBUG(1119, *YYCURSOR);
++YYCURSOR;
@@ -16780,7 +16780,7 @@ yy1126:
YYDEBUG(1126, *YYCURSOR);
++YYCURSOR;
YYDEBUG(1127, *YYCURSOR);
#line 1092 "ext/date/lib/parse_date.re"
#line 1094 "ext/date/lib/parse_date.re"
{
timelib_sll i;
int behavior = 0;
@@ -16801,7 +16801,7 @@ yy1126:
TIMELIB_DEINIT;
return TIMELIB_WEEK_DAY_OF_MONTH;
}
#line 16803 "ext/date/lib/parse_date.c"
#line 16805 "ext/date/lib/parse_date.c"
yy1128:
YYDEBUG(1128, *YYCURSOR);
yyaccept = 26;
@@ -16909,7 +16909,7 @@ yy1141:
}
yy1142:
YYDEBUG(1142, *YYCURSOR);
#line 1583 "ext/date/lib/parse_date.re"
#line 1585 "ext/date/lib/parse_date.re"
{
timelib_sll i;
int behavior = 0;
@@ -16932,7 +16932,7 @@ yy1142:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
#line 16934 "ext/date/lib/parse_date.c"
#line 16936 "ext/date/lib/parse_date.c"
yy1143:
YYDEBUG(1143, *YYCURSOR);
yych = *++YYCURSOR;
@@ -19609,7 +19609,7 @@ yy1294:
goto yy1298;
yy1295:
YYDEBUG(1295, *YYCURSOR);
#line 1069 "ext/date/lib/parse_date.re"
#line 1071 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("backof | frontof");
TIMELIB_INIT;
@@ -19631,7 +19631,7 @@ yy1295:
TIMELIB_DEINIT;
return TIMELIB_LF_DAY_OF_MONTH;
}
#line 19633 "ext/date/lib/parse_date.c"
#line 19635 "ext/date/lib/parse_date.c"
yy1296:
YYDEBUG(1296, *YYCURSOR);
yyaccept = 28;
@@ -21322,7 +21322,7 @@ yy1385:
if (yych <= '9') goto yy1385;
yy1387:
YYDEBUG(1387, *YYCURSOR);
#line 1027 "ext/date/lib/parse_date.re"
#line 1029 "ext/date/lib/parse_date.re"
{
timelib_ull i;
@@ -21346,7 +21346,7 @@ yy1387:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
#line 21348 "ext/date/lib/parse_date.c"
#line 21350 "ext/date/lib/parse_date.c"
yy1388:
YYDEBUG(1388, *YYCURSOR);
yych = *++YYCURSOR;
@@ -21782,7 +21782,7 @@ yy1416:
++YYCURSOR;
yy1417:
YYDEBUG(1417, *YYCURSOR);
#line 1015 "ext/date/lib/parse_date.re"
#line 1017 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("tomorrow");
TIMELIB_INIT;
@@ -21793,7 +21793,7 @@ yy1417:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
#line 21795 "ext/date/lib/parse_date.c"
#line 21797 "ext/date/lib/parse_date.c"
yy1418:
YYDEBUG(1418, *YYCURSOR);
yych = *++YYCURSOR;
@@ -21828,7 +21828,7 @@ yy1419:
}
yy1420:
YYDEBUG(1420, *YYCURSOR);
#line 1005 "ext/date/lib/parse_date.re"
#line 1007 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("midnight | today");
TIMELIB_INIT;
@@ -21837,7 +21837,7 @@ yy1420:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
#line 21839 "ext/date/lib/parse_date.c"
#line 21841 "ext/date/lib/parse_date.c"
yy1421:
YYDEBUG(1421, *YYCURSOR);
yych = *++YYCURSOR;
@@ -23849,7 +23849,7 @@ yy1499:
}
yy1500:
YYDEBUG(1500, *YYCURSOR);
#line 984 "ext/date/lib/parse_date.re"
#line 986 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("now");
TIMELIB_INIT;
@@ -23857,7 +23857,7 @@ yy1500:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
#line 23859 "ext/date/lib/parse_date.c"
#line 23861 "ext/date/lib/parse_date.c"
yy1501:
YYDEBUG(1501, *YYCURSOR);
yych = *++YYCURSOR;
@@ -23996,7 +23996,7 @@ yy1507:
}
yy1508:
YYDEBUG(1508, *YYCURSOR);
#line 993 "ext/date/lib/parse_date.re"
#line 995 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("noon");
TIMELIB_INIT;
@@ -24007,7 +24007,7 @@ yy1508:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
#line 24009 "ext/date/lib/parse_date.c"
#line 24011 "ext/date/lib/parse_date.c"
yy1509:
YYDEBUG(1509, *YYCURSOR);
yyaccept = 0;
@@ -24540,7 +24540,7 @@ yy1530:
++YYCURSOR;
yy1531:
YYDEBUG(1531, *YYCURSOR);
#line 972 "ext/date/lib/parse_date.re"
#line 974 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("yesterday");
TIMELIB_INIT;
@@ -24551,7 +24551,7 @@ yy1531:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
#line 24553 "ext/date/lib/parse_date.c"
#line 24555 "ext/date/lib/parse_date.c"
yy1532:
YYDEBUG(1532, *YYCURSOR);
yyaccept = 0;
@@ -24724,7 +24724,7 @@ yy1537:
goto yy1531;
}
}
#line 1733 "ext/date/lib/parse_date.re"
#line 1735 "ext/date/lib/parse_date.re"
}
@@ -24791,6 +24791,10 @@ timelib_time* timelib_strtotime(char *s, int len, struct timelib_error_container
#endif
} while(t != EOI);
/* do funky checking whether the parsed time was valid time */
if (in.time->have_time && !timelib_valid_time( in.time->h, in.time->i, in.time->s)) {
add_warning(&in, "The parsed time was invalid");
}
/* do funky checking whether the parsed date was valid date */
if (in.time->have_date && !timelib_valid_date( in.time->y, in.time->m, in.time->d)) {
add_warning(&in, "The parsed date was invalid");
@@ -24986,7 +24990,7 @@ timelib_time *timelib_parse_from_format(char *format, char *string, int len, tim
break;
case '#': /* separation symbol */
if (*ptr == ';' || *ptr == ':' || *ptr == '/' || *ptr == '.' || *ptr == ',' || *ptr == '-') {
if (*ptr == ';' || *ptr == ':' || *ptr == '/' || *ptr == '.' || *ptr == ',' || *ptr == '-' || *ptr == '(' || *ptr == ')') {
++ptr;
} else {
add_pbf_error(s, "The separation symbol ([;:/.,-]) could not be found", string, begin);
@@ -24999,6 +25003,8 @@ timelib_time *timelib_parse_from_format(char *format, char *string, int len, tim
case '.':
case ',':
case '-':
case '(':
case ')':
if (*ptr == *fptr) {
++ptr;
} else {
+7 -1
View File
@@ -1798,6 +1798,10 @@ timelib_time* timelib_strtotime(char *s, int len, struct timelib_error_container
#endif
} while(t != EOI);
/* do funky checking whether the parsed time was valid time */
if (in.time->have_time && !timelib_valid_time( in.time->h, in.time->i, in.time->s)) {
add_warning(&in, "The parsed time was invalid");
}
/* do funky checking whether the parsed date was valid date */
if (in.time->have_date && !timelib_valid_date( in.time->y, in.time->m, in.time->d)) {
add_warning(&in, "The parsed date was invalid");
@@ -1993,7 +1997,7 @@ timelib_time *timelib_parse_from_format(char *format, char *string, int len, tim
break;
case '#': /* separation symbol */
if (*ptr == ';' || *ptr == ':' || *ptr == '/' || *ptr == '.' || *ptr == ',' || *ptr == '-') {
if (*ptr == ';' || *ptr == ':' || *ptr == '/' || *ptr == '.' || *ptr == ',' || *ptr == '-' || *ptr == '(' || *ptr == ')') {
++ptr;
} else {
add_pbf_error(s, "The separation symbol ([;:/.,-]) could not be found", string, begin);
@@ -2006,6 +2010,8 @@ timelib_time *timelib_parse_from_format(char *format, char *string, int len, tim
case '.':
case ',':
case '-':
case '(':
case ')':
if (*ptr == *fptr) {
++ptr;
} else {
+1 -1
View File
@@ -1,4 +1,4 @@
/* Generated by re2c 0.13.5 on Fri Mar 26 12:12:03 2010 */
/* Generated by re2c 0.13.5 on Sat Nov 13 14:57:59 2010 */
#line 1 "ext/date/lib/parse_iso_intervals.re"
/*
+----------------------------------------------------------------------+
+13 -2
View File
@@ -46,6 +46,19 @@ timelib_rel_time* timelib_rel_time_ctor(void)
return t;
}
timelib_time* timelib_time_clone(timelib_time *orig)
{
timelib_time *tmp = timelib_time_ctor();
memcpy(tmp, orig, sizeof(timelib_time));
if (orig->tz_abbr) {
tmp->tz_abbr = strdup(orig->tz_abbr);
}
if (orig->tz_info) {
tmp->tz_info = orig->tz_info;
}
return tmp;
}
timelib_rel_time* timelib_rel_time_clone(timelib_rel_time *rel)
{
timelib_rel_time *tmp = timelib_rel_time_ctor();
@@ -217,8 +230,6 @@ void timelib_dump_date(timelib_time *d, int options)
printf(" %05d%s", d->z, d->dst == 1 ? " (DST)" : "");
break;
}
} else {
printf(" GMT 00000");
}
if ((options & 1) == 1) {
+1
View File
@@ -109,6 +109,7 @@ timelib_rel_time* timelib_rel_time_clone(timelib_rel_time *tz);
timelib_time* timelib_time_ctor(void);
void timelib_time_set_option(timelib_time* tm, int option, void* option_value);
void timelib_time_dtor(timelib_time* t);
timelib_time* timelib_time_clone(timelib_time* orig);
timelib_time_offset* timelib_time_offset_ctor(void);
void timelib_time_offset_dtor(timelib_time_offset* t);
+699 -638
View File
File diff suppressed because it is too large. Load diff
+1
View File
@@ -444,6 +444,7 @@ void timelib_update_ts(timelib_time* time, timelib_tzinfo* tzi)
time->sse = res;
time->sse_uptodate = 1;
time->have_relative = time->relative.have_weekday_relative = time->relative.have_special_relative = 0;
}
#if 0
+32 -31
View File
@@ -475,7 +475,6 @@ const zend_function_entry date_funcs_period[] = {
static char* guess_timezone(const timelib_tzdb *tzdb TSRMLS_DC);
static void date_register_classes(TSRMLS_D);
static zval * date_instantiate(zend_class_entry *pce, zval *object TSRMLS_DC);
/* }}} */
ZEND_DECLARE_MODULE_GLOBALS(date)
@@ -1211,11 +1210,11 @@ PHPAPI int php_idate(char format, time_t ts, int localtime)
int retval = -1;
timelib_time_offset *offset = NULL;
timelib_sll isoweek, isoyear;
TSRMLS_FETCH();
t = timelib_time_ctor();
if (!localtime) {
TSRMLS_FETCH();
tzi = get_timezone_info(TSRMLS_C);
t->tz_info = tzi;
t->zone_type = TIMELIB_ZONETYPE_ID;
@@ -1822,7 +1821,7 @@ static int date_period_it_has_more(zend_object_iterator *iter TSRMLS_DC)
{
date_period_it *iterator = (date_period_it *)iter;
php_period_obj *object = iterator->object;
timelib_time *it_time = object->start;
timelib_time *it_time = object->current;
/* apply modification if it's not the first iteration */
if (!object->include_start_date || iterator->current_index > 0) {
@@ -1834,7 +1833,7 @@ static int date_period_it_has_more(zend_object_iterator *iter TSRMLS_DC)
}
if (object->end) {
return object->start->sse < object->end->sse ? SUCCESS : FAILURE;
return object->current->sse < object->end->sse ? SUCCESS : FAILURE;
} else {
return (iterator->current_index < object->recurrences) ? SUCCESS : FAILURE;
}
@@ -1847,12 +1846,12 @@ static void date_period_it_current_data(zend_object_iterator *iter, zval ***data
{
date_period_it *iterator = (date_period_it *)iter;
php_period_obj *object = iterator->object;
timelib_time *it_time = object->start;
timelib_time *it_time = object->current;
php_date_obj *newdateobj;
/* Create new object */
MAKE_STD_ZVAL(iterator->current);
date_instantiate(date_ce_date, iterator->current TSRMLS_CC);
php_date_instantiate(date_ce_date, iterator->current TSRMLS_CC);
newdateobj = (php_date_obj *) zend_object_store_get_object(iterator->current TSRMLS_CC);
newdateobj->time = timelib_time_ctor();
*newdateobj->time = *it_time;
@@ -1895,6 +1894,10 @@ static void date_period_it_rewind(zend_object_iterator *iter TSRMLS_DC)
date_period_it *iterator = (date_period_it *)iter;
iterator->current_index = 0;
if (iterator->object->current) {
timelib_time_dtor(iterator->object->current);
}
iterator->object->current = timelib_time_clone(iterator->object->start);
date_period_it_invalidate_current(iter TSRMLS_CC);
}
/* }}} */
@@ -2085,7 +2088,7 @@ static HashTable *date_object_get_properties(zval *object TSRMLS_DC)
dateobj = (php_date_obj *) zend_object_store_get_object(object TSRMLS_CC);
props = dateobj->std.properties;
props = zend_std_get_properties(object TSRMLS_CC);
if (!dateobj->time || GC_G(gc_active)) {
return props;
@@ -2228,7 +2231,7 @@ static HashTable *date_object_get_properties_interval(zval *object TSRMLS_DC)
intervalobj = (php_interval_obj *) zend_object_store_get_object(object TSRMLS_CC);
props = intervalobj->std.properties;
props = zend_std_get_properties(object TSRMLS_CC);
if (!intervalobj->initialized || GC_G(gc_active)) {
return props;
@@ -2335,6 +2338,10 @@ static void date_object_free_storage_period(void *object TSRMLS_DC)
timelib_time_dtor(intern->start);
}
if (intern->current) {
timelib_time_dtor(intern->current);
}
if (intern->end) {
timelib_time_dtor(intern->end);
}
@@ -2345,7 +2352,7 @@ static void date_object_free_storage_period(void *object TSRMLS_DC)
}
/* Advanced Interface */
static zval * date_instantiate(zend_class_entry *pce, zval *object TSRMLS_DC)
PHPAPI zval *php_date_instantiate(zend_class_entry *pce, zval *object TSRMLS_DC)
{
Z_TYPE_P(object) = IS_OBJECT;
object_init_ex(object, pce);
@@ -2365,7 +2372,7 @@ static void update_errors_warnings(timelib_error_container *last_errors TSRMLS_D
DATEG(last_errors) = last_errors;
}
static int date_initialize(php_date_obj *dateobj, /*const*/ char *time_str, int time_str_len, char *format, zval *timezone_object, int ctor TSRMLS_DC)
PHPAPI int php_date_initialize(php_date_obj *dateobj, /*const*/ char *time_str, int time_str_len, char *format, zval *timezone_object, int ctor TSRMLS_DC)
{
timelib_time *now;
timelib_tzinfo *tzi;
@@ -2460,8 +2467,8 @@ PHP_FUNCTION(date_create)
RETURN_FALSE;
}
date_instantiate(date_ce_date, return_value TSRMLS_CC);
if (!date_initialize(zend_object_store_get_object(return_value TSRMLS_CC), time_str, time_str_len, NULL, timezone_object, 0 TSRMLS_CC)) {
php_date_instantiate(date_ce_date, return_value TSRMLS_CC);
if (!php_date_initialize(zend_object_store_get_object(return_value TSRMLS_CC), time_str, time_str_len, NULL, timezone_object, 0 TSRMLS_CC)) {
RETURN_FALSE;
}
}
@@ -2480,8 +2487,8 @@ PHP_FUNCTION(date_create_from_format)
RETURN_FALSE;
}
date_instantiate(date_ce_date, return_value TSRMLS_CC);
if (!date_initialize(zend_object_store_get_object(return_value TSRMLS_CC), time_str, time_str_len, format_str, timezone_object, 0 TSRMLS_CC)) {
php_date_instantiate(date_ce_date, return_value TSRMLS_CC);
if (!php_date_initialize(zend_object_store_get_object(return_value TSRMLS_CC), time_str, time_str_len, format_str, timezone_object, 0 TSRMLS_CC)) {
RETURN_FALSE;
}
}
@@ -2499,7 +2506,7 @@ PHP_METHOD(DateTime, __construct)
zend_replace_error_handling(EH_THROW, NULL, &error_handling TSRMLS_CC);
if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|sO", &time_str, &time_str_len, &timezone_object, date_ce_timezone)) {
date_initialize(zend_object_store_get_object(getThis() TSRMLS_CC), time_str, time_str_len, NULL, timezone_object, 1 TSRMLS_CC);
php_date_initialize(zend_object_store_get_object(getThis() TSRMLS_CC), time_str, time_str_len, NULL, timezone_object, 1 TSRMLS_CC);
}
zend_restore_error_handling(&error_handling TSRMLS_CC);
}
@@ -2526,7 +2533,7 @@ static int php_date_initialize_from_hash(zval **return_value, php_date_obj **dat
case TIMELIB_ZONETYPE_ABBR: {
char *tmp = emalloc(Z_STRLEN_PP(z_date) + Z_STRLEN_PP(z_timezone) + 2);
snprintf(tmp, Z_STRLEN_PP(z_date) + Z_STRLEN_PP(z_timezone) + 2, "%s %s", Z_STRVAL_PP(z_date), Z_STRVAL_PP(z_timezone));
date_initialize(*dateobj, tmp, Z_STRLEN_PP(z_date) + Z_STRLEN_PP(z_timezone) + 1, NULL, NULL, 0 TSRMLS_CC);
php_date_initialize(*dateobj, tmp, Z_STRLEN_PP(z_date) + Z_STRLEN_PP(z_timezone) + 1, NULL, NULL, 0 TSRMLS_CC);
efree(tmp);
return 1;
}
@@ -2537,12 +2544,12 @@ static int php_date_initialize_from_hash(zval **return_value, php_date_obj **dat
tzi = php_date_parse_tzfile(Z_STRVAL_PP(z_timezone), DATE_TIMEZONEDB TSRMLS_CC);
ALLOC_INIT_ZVAL(tmp_obj);
tzobj = zend_object_store_get_object(date_instantiate(date_ce_timezone, tmp_obj TSRMLS_CC) TSRMLS_CC);
tzobj = zend_object_store_get_object(php_date_instantiate(date_ce_timezone, tmp_obj TSRMLS_CC) TSRMLS_CC);
tzobj->type = TIMELIB_ZONETYPE_ID;
tzobj->tzi.tz = tzi;
tzobj->initialized = 1;
date_initialize(*dateobj, Z_STRVAL_PP(z_date), Z_STRLEN_PP(z_date), NULL, tmp_obj, 0 TSRMLS_CC);
php_date_initialize(*dateobj, Z_STRVAL_PP(z_date), Z_STRLEN_PP(z_date), NULL, tmp_obj, 0 TSRMLS_CC);
zval_ptr_dtor(&tmp_obj);
return 1;
}
@@ -2566,7 +2573,7 @@ PHP_METHOD(DateTime, __set_state)
myht = HASH_OF(array);
date_instantiate(date_ce_date, return_value TSRMLS_CC);
php_date_instantiate(date_ce_date, return_value TSRMLS_CC);
dateobj = (php_date_obj *) zend_object_store_get_object(return_value TSRMLS_CC);
php_date_initialize_from_hash(&return_value, &dateobj, myht TSRMLS_CC);
}
@@ -2907,7 +2914,7 @@ PHP_FUNCTION(date_timezone_get)
dateobj = (php_date_obj *) zend_object_store_get_object(object TSRMLS_CC);
DATE_CHECK_INITIALIZED(dateobj->time, DateTime);
if (dateobj->time->is_localtime/* && dateobj->time->tz_info*/) {
date_instantiate(date_ce_timezone, return_value TSRMLS_CC);
php_date_instantiate(date_ce_timezone, return_value TSRMLS_CC);
tzobj = (php_timezone_obj *) zend_object_store_get_object(return_value TSRMLS_CC);
tzobj->initialized = 1;
tzobj->type = dateobj->time->zone_type;
@@ -3131,7 +3138,7 @@ PHP_FUNCTION(date_diff)
timelib_update_ts(dateobj1->time, NULL);
timelib_update_ts(dateobj2->time, NULL);
date_instantiate(date_ce_interval, return_value TSRMLS_CC);
php_date_instantiate(date_ce_interval, return_value TSRMLS_CC);
interval = zend_object_store_get_object(return_value TSRMLS_CC);
interval->diff = timelib_diff(dateobj1->time, dateobj2->time);
if (absolute) {
@@ -3177,7 +3184,7 @@ PHP_FUNCTION(timezone_open)
if (SUCCESS != timezone_initialize(&tzi, tz TSRMLS_CC)) {
RETURN_FALSE;
}
tzobj = zend_object_store_get_object(date_instantiate(date_ce_timezone, return_value TSRMLS_CC) TSRMLS_CC);
tzobj = zend_object_store_get_object(php_date_instantiate(date_ce_timezone, return_value TSRMLS_CC) TSRMLS_CC);
tzobj->type = TIMELIB_ZONETYPE_ID;
tzobj->tzi.tz = tzi;
tzobj->initialized = 1;
@@ -3569,7 +3576,7 @@ PHP_FUNCTION(date_interval_create_from_date_string)
RETURN_FALSE;
}
date_instantiate(date_ce_interval, return_value TSRMLS_CC);
php_date_instantiate(date_ce_interval, return_value TSRMLS_CC);
time = timelib_strtotime(time_str, time_str_len, &err, DATE_TIMEZONEDB);
diobj = (php_interval_obj *) zend_object_store_get_object(return_value TSRMLS_CC);
@@ -3713,6 +3720,7 @@ PHP_METHOD(DatePeriod, __construct)
}
dpobj = zend_object_store_get_object(getThis() TSRMLS_CC);
dpobj->current = NULL;
if (isostr_len) {
date_period_initialize(&(dpobj->start), &(dpobj->end), &(dpobj->interval), (int*) &recurrences, isostr, isostr_len TSRMLS_CC);
@@ -3754,14 +3762,7 @@ PHP_METHOD(DatePeriod, __construct)
/* end date */
if (end) {
dateobj = (php_date_obj *) zend_object_store_get_object(end TSRMLS_CC);
clone = timelib_time_ctor();
memcpy(clone, dateobj->time, sizeof(timelib_time));
if (dateobj->time->tz_abbr) {
clone->tz_abbr = strdup(dateobj->time->tz_abbr);
}
if (dateobj->time->tz_info) {
clone->tz_info = dateobj->time->tz_info;
}
clone = timelib_time_clone(dateobj->time);
dpobj->end = clone;
}
}
+6
View File
@@ -139,6 +139,7 @@ struct _php_interval_obj {
struct _php_period_obj {
zend_object std;
timelib_time *start;
timelib_time *current;
timelib_time *end;
timelib_rel_time *interval;
int recurrences;
@@ -177,4 +178,9 @@ PHPAPI timelib_tzinfo *get_timezone_info(TSRMLS_D);
PHPAPI zend_class_entry *php_date_get_date_ce(void);
PHPAPI zend_class_entry *php_date_get_timezone_ce(void);
/* Functions for creating DateTime objects, and initializing them from a string */
PHPAPI zval *php_date_instantiate(zend_class_entry *pce, zval *object TSRMLS_DC);
PHPAPI int php_date_initialize(php_date_obj *dateobj, /*const*/ char *time_str, int time_str_len, char *format, zval *timezone_object, int ctor TSRMLS_DC);
#endif /* PHP_DATE_H */
+18 -585
View File
@@ -4,649 +4,82 @@ timezone_abbreviations_list() tests
<?php
date_default_timezone_set('UTC');
$timezone_abbreviations = timezone_abbreviations_list();
var_dump($timezone_abbreviations["est"]);
var_dump($timezone_abbreviations["utc"]);
echo "Done\n";
?>
--EXPECTF--
array(71) {
array(8) {
[0]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
int(0)
["timezone_id"]=>
string(16) "America/New_York"
string(13) "Etc/Universal"
}
[1]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
int(0)
["timezone_id"]=>
string(15) "America/Antigua"
string(7) "Etc/UTC"
}
[2]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
int(0)
["timezone_id"]=>
string(16) "America/Atikokan"
string(8) "Etc/Zulu"
}
[3]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
int(0)
["timezone_id"]=>
string(21) "America/Cambridge_Bay"
string(3) "GMT"
}
[4]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
int(0)
["timezone_id"]=>
string(14) "America/Cancun"
string(9) "Universal"
}
[5]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
int(0)
["timezone_id"]=>
string(14) "America/Cayman"
string(3) "UTC"
}
[6]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
int(0)
["timezone_id"]=>
string(15) "America/Chicago"
string(4) "Zulu"
}
[7]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
int(0)
["timezone_id"]=>
string(21) "America/Coral_Harbour"
}
[8]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(15) "America/Detroit"
}
[9]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(18) "America/Fort_Wayne"
}
[10]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(18) "America/Grand_Turk"
}
[11]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(28) "America/Indiana/Indianapolis"
}
[12]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(20) "America/Indiana/Knox"
}
[13]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(23) "America/Indiana/Marengo"
}
[14]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(26) "America/Indiana/Petersburg"
}
[15]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(21) "America/Indiana/Vevay"
}
[16]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(25) "America/Indiana/Vincennes"
}
[17]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(23) "America/Indiana/Winamac"
}
[18]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(20) "America/Indianapolis"
}
[19]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(15) "America/Iqaluit"
}
[20]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(15) "America/Jamaica"
}
[21]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(27) "America/Kentucky/Louisville"
}
[22]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(27) "America/Kentucky/Monticello"
}
[23]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(15) "America/Knox_IN"
}
[24]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(18) "America/Louisville"
}
[25]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(15) "America/Managua"
}
[26]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(17) "America/Menominee"
}
[27]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(14) "America/Merida"
}
[28]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(16) "America/Montreal"
}
[29]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(14) "America/Nassau"
}
[30]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(15) "America/Nipigon"
}
[31]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(14) "America/Panama"
}
[32]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(19) "America/Pangnirtung"
}
[33]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(22) "America/Port-au-Prince"
}
[34]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(20) "America/Rankin_Inlet"
}
[35]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(21) "America/Santo_Domingo"
}
[36]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(19) "America/Thunder_Bay"
}
[37]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(15) "America/Toronto"
}
[38]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(14) "Canada/Eastern"
}
[39]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(3) "EST"
}
[40]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(7) "EST5EDT"
}
[41]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(7) "Jamaica"
}
[42]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(10) "US/Central"
}
[43]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(15) "US/East-Indiana"
}
[44]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(10) "US/Eastern"
}
[45]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(17) "US/Indiana-Starke"
}
[46]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(11) "US/Michigan"
}
[47]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(36000)
["timezone_id"]=>
string(13) "Australia/ACT"
}
[48]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(36000)
["timezone_id"]=>
string(18) "Australia/Brisbane"
}
[49]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(36000)
["timezone_id"]=>
string(18) "Australia/Canberra"
}
[50]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(36000)
["timezone_id"]=>
string(16) "Australia/Currie"
}
[51]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(36000)
["timezone_id"]=>
string(16) "Australia/Hobart"
}
[52]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(36000)
["timezone_id"]=>
string(18) "Australia/Lindeman"
}
[53]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(36000)
["timezone_id"]=>
string(19) "Australia/Melbourne"
}
[54]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(36000)
["timezone_id"]=>
string(13) "Australia/NSW"
}
[55]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(36000)
["timezone_id"]=>
string(20) "Australia/Queensland"
}
[56]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(36000)
["timezone_id"]=>
string(16) "Australia/Sydney"
}
[57]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(36000)
["timezone_id"]=>
string(18) "Australia/Tasmania"
}
[58]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(36000)
["timezone_id"]=>
string(18) "Australia/Victoria"
}
[59]=>
array(3) {
["dst"]=>
bool(true)
["offset"]=>
int(39600)
["timezone_id"]=>
string(19) "Australia/Melbourne"
}
[60]=>
array(3) {
["dst"]=>
bool(true)
["offset"]=>
int(39600)
["timezone_id"]=>
string(13) "Australia/ACT"
}
[61]=>
array(3) {
["dst"]=>
bool(true)
["offset"]=>
int(39600)
["timezone_id"]=>
string(18) "Australia/Brisbane"
}
[62]=>
array(3) {
["dst"]=>
bool(true)
["offset"]=>
int(39600)
["timezone_id"]=>
string(18) "Australia/Canberra"
}
[63]=>
array(3) {
["dst"]=>
bool(true)
["offset"]=>
int(39600)
["timezone_id"]=>
string(16) "Australia/Currie"
}
[64]=>
array(3) {
["dst"]=>
bool(true)
["offset"]=>
int(39600)
["timezone_id"]=>
string(16) "Australia/Hobart"
}
[65]=>
array(3) {
["dst"]=>
bool(true)
["offset"]=>
int(39600)
["timezone_id"]=>
string(18) "Australia/Lindeman"
}
[66]=>
array(3) {
["dst"]=>
bool(true)
["offset"]=>
int(39600)
["timezone_id"]=>
string(13) "Australia/NSW"
}
[67]=>
array(3) {
["dst"]=>
bool(true)
["offset"]=>
int(39600)
["timezone_id"]=>
string(20) "Australia/Queensland"
}
[68]=>
array(3) {
["dst"]=>
bool(true)
["offset"]=>
int(39600)
["timezone_id"]=>
string(16) "Australia/Sydney"
}
[69]=>
array(3) {
["dst"]=>
bool(true)
["offset"]=>
int(39600)
["timezone_id"]=>
string(18) "Australia/Tasmania"
}
[70]=>
array(3) {
["dst"]=>
bool(true)
["offset"]=>
int(39600)
["timezone_id"]=>
string(18) "Australia/Victoria"
string(3) "UTC"
}
}
Done
+66 -166
View File
@@ -111,44 +111,24 @@ fclose( $file_handle );
*** Testing DateTime::modify() : usage variation - unexpected values to first argument $modify***
-- int 0 --
object(DateTime)#3 (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: DateTime::modify(): Failed to parse time string (0) at position 0 (0): Unexpected character in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
bool(false)
-- int 1 --
object(DateTime)#3 (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: DateTime::modify(): Failed to parse time string (1) at position 0 (1): Unexpected character in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
bool(false)
-- int 12345 --
object(DateTime)#3 (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: DateTime::modify(): Failed to parse time string (12345) at position 4 (5): Unexpected character in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
bool(false)
-- int -12345 --
object(DateTime)#3 (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: DateTime::modify(): Failed to parse time string (-12345) at position 5 (5): Unexpected character in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
bool(false)
-- float 10.5 --
object(DateTime)#3 (3) {
@@ -161,14 +141,9 @@ object(DateTime)#3 (3) {
}
-- float -10.5 --
object(DateTime)#3 (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: DateTime::modify(): Failed to parse time string (-10.5) at position 4 (5): Unexpected character in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
bool(false)
-- float .5 --
object(DateTime)#3 (3) {
@@ -182,181 +157,106 @@ object(DateTime)#3 (3) {
-- empty array --
Warning: DateTime::modify() expects parameter 1 to be string, array given in %s on line %d
Warning: DateTime::modify() expects parameter 1 to be string, array given in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
bool(false)
-- int indexed array --
Warning: DateTime::modify() expects parameter 1 to be string, array given in %s on line %d
Warning: DateTime::modify() expects parameter 1 to be string, array given in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
bool(false)
-- associative array --
Warning: DateTime::modify() expects parameter 1 to be string, array given in %s on line %d
Warning: DateTime::modify() expects parameter 1 to be string, array given in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
bool(false)
-- nested arrays --
Warning: DateTime::modify() expects parameter 1 to be string, array given in %s on line %d
Warning: DateTime::modify() expects parameter 1 to be string, array given in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
bool(false)
-- uppercase NULL --
object(DateTime)#3 (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: DateTime::modify(): Failed to parse time string () at position 0 ( in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
bool(false)
-- lowercase null --
object(DateTime)#3 (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: DateTime::modify(): Failed to parse time string () at position 0 ( in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
bool(false)
-- lowercase true --
object(DateTime)#3 (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: DateTime::modify(): Failed to parse time string (1) at position 0 (1): Unexpected character in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
bool(false)
-- lowercase false --
object(DateTime)#3 (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: DateTime::modify(): Failed to parse time string () at position 0 ( in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
bool(false)
-- uppercase TRUE --
object(DateTime)#3 (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: DateTime::modify(): Failed to parse time string (1) at position 0 (1): Unexpected character in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
bool(false)
-- uppercase FALSE --
object(DateTime)#3 (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: DateTime::modify(): Failed to parse time string () at position 0 ( in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
bool(false)
-- empty string DQ --
object(DateTime)#3 (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: DateTime::modify(): Failed to parse time string () at position 0 ( in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
bool(false)
-- empty string SQ --
object(DateTime)#3 (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: DateTime::modify(): Failed to parse time string () at position 0 ( in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
bool(false)
-- string DQ --
object(DateTime)#3 (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: DateTime::modify(): Failed to parse time string (string) at position 0 (s): The timezone could not be found in the database in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
bool(false)
-- string SQ --
object(DateTime)#3 (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: DateTime::modify(): Failed to parse time string (string) at position 0 (s): The timezone could not be found in the database in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
bool(false)
-- mixed case string --
object(DateTime)#3 (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: DateTime::modify(): Failed to parse time string (sTrInG) at position 0 (s): The timezone could not be found in the database in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
bool(false)
-- heredoc --
object(DateTime)#3 (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: DateTime::modify(): Failed to parse time string (hello world) at position 0 (h): The timezone could not be found in the database in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
bool(false)
-- instance of classWithToString --
object(DateTime)#3 (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: DateTime::modify(): Failed to parse time string (Class A object) at position 0 (C): The timezone could not be found in the database in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
bool(false)
-- instance of classWithoutToString --
Warning: DateTime::modify() expects parameter 1 to be string, object given in %s on line %d
Warning: DateTime::modify() expects parameter 1 to be string, object given in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
bool(false)
-- undefined var --
object(DateTime)#3 (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: DateTime::modify(): Failed to parse time string () at position 0 ( in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
bool(false)
-- unset var --
object(DateTime)#3 (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: DateTime::modify(): Failed to parse time string () at position 0 ( in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
bool(false)
-- resource --
Warning: DateTime::modify() expects parameter 1 to be string, resource given in %s on line %d
Warning: DateTime::modify() expects parameter 1 to be string, resource given in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
bool(false)
===DONE===
+2 -2
View File
@@ -250,8 +250,8 @@ wanted=Sunday 00:30:00
TZ=Pacific/Truk - Is it OK for this to be 10 AM? Note: does not
appear to have a DST or timezone transition.
tStamp=Thursday 1970-01-01 17:17:17 TRUT 0
result=Tuesday 1970-01-06 00:00:00 TRUT 0
tStamp=Thursday 1970-01-01 17:17:17 CHUT 0
result=Tuesday 1970-01-06 00:00:00 CHUT 0
wanted=Tuesday 00:00:00
TZ=Pacific/Ponape - Is it OK for this to be 11 AM? Note: does
+31
View File
@@ -0,0 +1,31 @@
--TEST--
Bug #46874 (DatePeriod not resetting after foreach loop)
--FILE--
<?php
$dp = new DatePeriod('R5/2008-03-01T13:00:00Z/P1Y2M10DT2H30M');
foreach ($dp as $date) {
echo $date->format("Y-m-d H:i:s\n");
}
echo "\n";
// this should repeat the same range
foreach ($dp as $date) {
echo $date->format("Y-m-d H:i:s\n");
}
?>
--EXPECT--
2008-03-01 13:00:00
2009-05-11 15:30:00
2010-07-21 18:00:00
2011-10-01 20:30:00
2012-12-11 23:00:00
2014-02-22 01:30:00
2008-03-01 13:00:00
2009-05-11 15:30:00
2010-07-21 18:00:00
2011-10-01 20:30:00
2012-12-11 23:00:00
2014-02-22 01:30:00
+26
View File
@@ -0,0 +1,26 @@
--TEST--
Bug #48187 (DateTime::diff() corrupting microtime() result)
--FILE--
<?php
// two arbitrary dates
$date1 = new DateTime('2005-07-23');
$date2 = new DateTime('2006-02-14');
$begin_u = microtime(true);
$begin_t = time();
if (microtime(true) - $begin_u < 1) {
var_dump('microtime() difference less 1 second');
} else {
var_dump('microtime() difference greater or equal 1 second');
}
if (time() - $begin_t < 1) {
var_dump('time() difference less 1 second');
} else {
var_dump('time() difference greater or equal 1 second');
}
?>
--EXPECTF--
string(36) "microtime() difference less 1 second"
string(31) "time() difference less 1 second"
+18
View File
@@ -0,0 +1,18 @@
--TEST--
Bug #50475 (DateTime::setISODate followed by DateTime::setTime)
--FILE--
<?php
date_default_timezone_set('Asia/Calcutta');
$date = new DateTime('18-01-2009 00:00:00');
$date->setISODate(2009, 6, 1);
var_dump($date->format('Y-m-d H:i:s'));
$date->setTime(8, 0);
var_dump($date->format('Y-m-d H:i:s'));
?>
--EXPECT--
string(19) "2009-02-02 00:00:00"
string(19) "2009-02-02 08:00:00"
+31
View File
@@ -0,0 +1,31 @@
--TEST--
Bug #51819 (Case discrepancy in timezone names cause Uncaught exception and fatal error)
--FILE--
<?php
$aTzAbbr = timezone_abbreviations_list();
$aTz = array();
foreach (array_keys($aTzAbbr) as $sKey) {
foreach (array_keys($aTzAbbr[$sKey]) as $iIndex) {
$sTz = $aTzAbbr[$sKey][$iIndex]['timezone_id'];
if (! in_array($sTz, $aTz)) {
array_push($aTz, $sTz);
}
}
}
foreach ($aTz as $sTz) {
$sDate = '2010-05-15 00:00:00 ' . $sTz;
try {
$oDateTime = new DateTime($sDate);
} catch (Exception $oException) {
var_dump($oException->getMessage());
}
}
var_dump('this should be the only output');
?>
--EXPECTF--
string(30) "this should be the only output"
+38
View File
@@ -0,0 +1,38 @@
--TEST--
Bug #51994 (date_parse_from_format is parsing invalid date using 'yz' format)
--FILE--
<?php
$trans_date = '10153'; // 152nd day of year 2010 -> 03.06.2010
$a_date = date_parse_from_format('yz', $trans_date);
var_dump($a_date);
?>
--EXPECTF--
array(12) {
["year"]=>
int(2010)
["month"]=>
int(6)
["day"]=>
int(3)
["hour"]=>
bool(false)
["minute"]=>
bool(false)
["second"]=>
bool(false)
["fraction"]=>
bool(false)
["warning_count"]=>
int(0)
["warnings"]=>
array(0) {
}
["error_count"]=>
int(0)
["errors"]=>
array(0) {
}
["is_localtime"]=>
bool(false)
}
+27
View File
@@ -0,0 +1,27 @@
--TEST--
Bug #52290 (setDate, setISODate, setTime works wrong when DateTime created from timestamp)
--FILE--
<?php
$tz = 'UTC';
date_default_timezone_set($tz);
$ts = strtotime('2006-01-01');
$dt = new DateTime('@'.$ts);
$dt->setTimezone(new DateTimeZone($tz));
var_dump($dt->format('o-\WW-N | Y-m-d | H:i:s | U'));
$dt->setISODate(2005, 52, 1);
var_dump($dt->format('o-\WW-N | Y-m-d | H:i:s | U'));
$dt->setDate(2007, 10, 10);
var_dump($dt->format('o-\WW-N | Y-m-d | H:i:s | U'));
$dt->setTime(20, 30, 40);
var_dump($dt->format('o-\WW-N | Y-m-d | H:i:s | U'));
?>
--EXPECTF--
string(47) "2005-W52-7 | 2006-01-01 | 00:00:00 | 1136073600"
string(47) "2005-W52-1 | 2005-12-26 | 00:00:00 | 1135555200"
string(47) "2007-W40-5 | 2007-10-10 | 00:00:00 | 1191974400"
string(47) "2007-W40-5 | 2007-10-10 | 20:30:40 | 1192048240"
+23
View File
@@ -0,0 +1,23 @@
--TEST--
Bug #52342 (DateTime setIsoDate results in wrong timestamp)
--FILE--
<?php
date_default_timezone_set('Europe/Berlin');
$from = new DateTime();
$from->setTime(0, 0, 0);
$from->setISODate(2010, 28, 1); //Montag der 28ten Woche 2010
echo $from->format('d.m.Y H:i'), "\n"; //A
echo $from->getTimestamp(), "\n"; //B
echo date('d.m.Y H:i', $from->getTimestamp()), "\n"; //C
$from->add(new DateInterval('P0D'));
echo $from->getTimestamp(), "\n"; //B
echo date('d.m.Y H:i', $from->getTimestamp()), "\n"; //C
?>
--EXPECT--
12.07.2010 00:00
1278885600
12.07.2010 00:00
1278885600
12.07.2010 00:00
+37
View File
@@ -0,0 +1,37 @@
--TEST--
Bug #52430 (date_parse parse 24:xx:xx as valid time)
--FILE--
<?php
var_dump(date_parse('2010-1-1 24:59:59'));
?>
--EXPECT--
array(12) {
["year"]=>
int(2010)
["month"]=>
int(1)
["day"]=>
int(1)
["hour"]=>
int(24)
["minute"]=>
int(59)
["second"]=>
int(59)
["fraction"]=>
float(0)
["warning_count"]=>
int(1)
["warnings"]=>
array(1) {
[18]=>
string(27) "The parsed time was invalid"
}
["error_count"]=>
int(0)
["errors"]=>
array(0) {
}
["is_localtime"]=>
bool(false)
}
+22
View File
@@ -0,0 +1,22 @@
--TEST--
Bug #52454 (Relative dates and getTimestamp increments by one day)
--FILE--
<?php
date_default_timezone_set('Europe/London');
$endOfWeek = new DateTime('2010-07-27 09:46:49');
$endOfWeek->modify('this week +6 days');
echo $endOfWeek->format('Y-m-d H:i:s')."\n";
echo $endOfWeek->format('U')."\n";
/* Thar she blows! */
echo $endOfWeek->getTimestamp()."\n";
echo $endOfWeek->format('Y-m-d H:i:s')."\n";
?>
--EXPECT--
2010-08-01 09:46:49
1280652409
1280652409
2010-08-01 09:46:49
+19
View File
@@ -0,0 +1,19 @@
--TEST--
Bug #52577 (Incorrect date returning)
--FILE--
<?php
date_default_timezone_set('Europe/Kiev');
$date = '7.8.2010';
echo "String: ".$date."\n";
$date_format = DATE_RFC2822;
$unixtime = strtotime($date);
echo "Unixtime: ".$unixtime."\n";
echo "Date(PHP): ".date($date_format,$unixtime)."\n";
$date = new DateTime('@'.$unixtime);
echo "DateTime(PHP Class): ".$date->format($date_format);
?>
--EXPECT--
String: 7.8.2010
Unixtime: 1281128400
Date(PHP): Sat, 07 Aug 2010 00:00:00 +0300
DateTime(PHP Class): Fri, 06 Aug 2010 21:00:00 +0000
+25
View File
@@ -0,0 +1,25 @@
--TEST--
Bug #52668 (Iterating over a dateperiod twice is broken)
--INI--
date.timezone=UTC
--FILE--
<?php
$start = new DateTime('20101212');
$interval = DateInterval::createFromDateString('next day');
$dp = new DatePeriod($start, $interval, 1);
foreach($dp as $dt) {
echo $dt->format('r') . "\n"; // Sun, 12 Dec 2010 00:00:00 +0100
}
echo $start->format('r'), "\n";
foreach($dp as $dt) {
echo $dt->format('r') . "\n"; // Sun, 12 Dec 2010 00:00:00 +0100
}
echo $start->format('r'), "\n\n";
?>
--EXPECT--
Sun, 12 Dec 2010 00:00:00 +0000
Mon, 13 Dec 2010 00:00:00 +0000
Sun, 12 Dec 2010 00:00:00 +0000
Sun, 12 Dec 2010 00:00:00 +0000
Mon, 13 Dec 2010 00:00:00 +0000
Sun, 12 Dec 2010 00:00:00 +0000
+66 -166
View File
@@ -111,44 +111,24 @@ fclose( $file_handle );
*** Testing date_modify() : usage variation - unexpected values to second argument $format***
-- int 0 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: date_modify(): Failed to parse time string (0) at position 0 (0): Unexpected character in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
bool(false)
-- int 1 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: date_modify(): Failed to parse time string (1) at position 0 (1): Unexpected character in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
bool(false)
-- int 12345 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: date_modify(): Failed to parse time string (12345) at position 4 (5): Unexpected character in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
bool(false)
-- int -12345 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: date_modify(): Failed to parse time string (-12345) at position 5 (5): Unexpected character in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
bool(false)
-- float 10.5 --
object(DateTime)#%d (3) {
@@ -161,14 +141,9 @@ object(DateTime)#%d (3) {
}
-- float -10.5 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: date_modify(): Failed to parse time string (-10.5) at position 4 (5): Unexpected character in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
bool(false)
-- float .5 --
object(DateTime)#%d (3) {
@@ -182,181 +157,106 @@ object(DateTime)#%d (3) {
-- empty array --
Warning: date_modify() expects parameter 2 to be string, array given in %s on line %d
Warning: date_modify() expects parameter 2 to be string, array given in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
bool(false)
-- int indexed array --
Warning: date_modify() expects parameter 2 to be string, array given in %s on line %d
Warning: date_modify() expects parameter 2 to be string, array given in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
bool(false)
-- associative array --
Warning: date_modify() expects parameter 2 to be string, array given in %s on line %d
Warning: date_modify() expects parameter 2 to be string, array given in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
bool(false)
-- nested arrays --
Warning: date_modify() expects parameter 2 to be string, array given in %s on line %d
Warning: date_modify() expects parameter 2 to be string, array given in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
bool(false)
-- uppercase NULL --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: date_modify(): Failed to parse time string () at position 0 ( in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
bool(false)
-- lowercase null --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: date_modify(): Failed to parse time string () at position 0 ( in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
bool(false)
-- lowercase true --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: date_modify(): Failed to parse time string (1) at position 0 (1): Unexpected character in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
bool(false)
-- lowercase false --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: date_modify(): Failed to parse time string () at position 0 ( in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
bool(false)
-- uppercase TRUE --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: date_modify(): Failed to parse time string (1) at position 0 (1): Unexpected character in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
bool(false)
-- uppercase FALSE --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: date_modify(): Failed to parse time string () at position 0 ( in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
bool(false)
-- empty string DQ --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: date_modify(): Failed to parse time string () at position 0 ( in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
bool(false)
-- empty string SQ --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: date_modify(): Failed to parse time string () at position 0 ( in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
bool(false)
-- string DQ --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: date_modify(): Failed to parse time string (string) at position 0 (s): The timezone could not be found in the database in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
bool(false)
-- string SQ --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: date_modify(): Failed to parse time string (string) at position 0 (s): The timezone could not be found in the database in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
bool(false)
-- mixed case string --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: date_modify(): Failed to parse time string (sTrInG) at position 0 (s): The timezone could not be found in the database in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
bool(false)
-- heredoc --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: date_modify(): Failed to parse time string (hello world) at position 0 (h): The timezone could not be found in the database in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
bool(false)
-- instance of classWithToString --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: date_modify(): Failed to parse time string (Class A object) at position 0 (C): The timezone could not be found in the database in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
bool(false)
-- instance of classWithoutToString --
Warning: date_modify() expects parameter 2 to be string, object given in %s on line %d
Warning: date_modify() expects parameter 2 to be string, object given in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
bool(false)
-- undefined var --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: date_modify(): Failed to parse time string () at position 0 ( in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
bool(false)
-- unset var --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: date_modify(): Failed to parse time string () at position 0 ( in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
bool(false)
-- resource --
Warning: date_modify() expects parameter 2 to be string, resource given in %s on line %d
Warning: date_modify() expects parameter 2 to be string, resource given in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
bool(false)
===DONE===
@@ -26,7 +26,7 @@ var_dump( $abbr["acst"] );
--EXPECT--
*** Testing timezone_abbreviations_list() : basic functionality ***
string(5) "array"
int(338)
int(399)
-- Format a sample entry --
array(4) {
@@ -67,4 +67,4 @@ array(4) {
string(11) "Brazil/Acre"
}
}
===DONE===
===DONE===
+1 -1
View File
@@ -233,7 +233,7 @@ AC_DEFUN([PHP_DBA_DB_CHECK],[
AC_MSG_CHECKING([for DB4 minor version and patch level])
AC_EGREP_CPP(yes,[
#include "$THIS_INCLUDE"
#if DB_VERSION_MINOR != 1 || (DB_VERSION_MINOR == 1 && DB_VERSION_PATCH >= 25)
#if DB_VERSION_MAJOR > 4 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR != 1) || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR == 1 && DB_VERSION_PATCH >= 25)
yes
#endif
],[
+1 -1
View File
@@ -37,7 +37,7 @@ magic_quotes_runtime=1
require(dirname(__FILE__) .'/clean.inc');
?>
--EXPECT--
Warning: Directive 'magic_quotes_runtime' is deprecated in PHP 5.3 and greater in Unknown on line 0
Deprecated: Directive 'magic_quotes_runtime' is deprecated in PHP 5.3 and greater in Unknown on line 0
database handler: cdb_make
string(32) "12fc5ba2b9dcfef2480e5324eeb5f3e5"
string(32) "12fc5ba2b9dcfef2480e5324eeb5f3e5"
+14
View File
@@ -0,0 +1,14 @@
--TEST--
Bug #52656 (DOMCdataSection does not work with splitText).
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
$CData = new DOMCdataSection('splithere!');
$CDataSplit = $CData->splitText(5);
var_dump($CDataSplit, $CDataSplit->data);
?>
--EXPECT--
object(DOMText)#2 (0) {
}
string(5) "here!"
+1 -1
View File
@@ -160,7 +160,7 @@ PHP_FUNCTION(dom_text_split_text)
}
DOM_GET_OBJ(node, id, xmlNodePtr, intern);
if (node->type != XML_TEXT_NODE) {
if (node->type != XML_TEXT_NODE && node->type != XML_CDATA_SECTION_NODE) {
RETURN_FALSE;
}
Loaded 100 of 653 files, more files were not shown because too many files have changed in this diff. Show more