Compare commits

...
223 Commits
Author SHA1 Message Date
Stanislav Malyshev 46ee0e087e Revert "Fixed Bug #67724"
This reverts commit e4ff7f2ee3.
Reverted since it causes https://bugs.php.net/bug.php?id=67865
2014-08-20 13:15:22 -07:00
Stanislav Malyshev eb2360602e 5.4.32 2014-08-19 00:40:27 -07:00
Stanislav Malyshev 2b10db8e10 fix potentially missing NUL termination 2014-08-18 23:04:24 -07:00
Stanislav Malyshev 706aefb781 Fix bug #67730 - Null byte injection possible with imagexxx functions 2014-08-18 22:49:10 -07:00
Stanislav Malyshev 529da0f74c Fixed bug #67717 - segfault in dns_get_record 2014-08-18 22:37:25 -07:00
Remi Collet 7ba1409a1a Fix bug #67716 - Segfault in cdf.c 2014-08-14 17:44:19 -07:00
Stanislav Malyshev fd28010e20 5.4.32 RC1 2014-08-05 21:03:35 -07:00
Michael Wallner e4ff7f2ee3 Fixed Bug #67724
(chained zlib filters silently fail with large amounts of data)

Use the same buffer size zlib uses internally to avoid
Z_DATA_ERROR on massively compressed data
2014-08-05 15:44:43 +02:00
Remi Collet f59506cd27 typo 2014-08-04 11:08:30 +02:00
Remi Collet d3b5ed0787 NEWS 2014-08-04 10:46:53 +02:00
Remi Collet cf4753691d Fixed Bug #66901 php-gd 'c_color' NULL pointer dereference
Upstream https://bitbucket.org/libgd/gd-libgd/commits/463c3bd09bfe8e924e19acad7a2a6af16953a704

Notice: this fix don't manage monochrome/monovisual values
but just fix the security issue CVE-2014-2497
failing when trying to load such an image
2014-08-04 10:42:39 +02:00
Anatol Belski ae74549239 backport the fix for bug #67739 2014-08-04 09:57:08 +02:00
Stanislav Malyshev 61ec9b5b0f add test 2014-08-04 00:08:08 -07:00
Stanislav Malyshev eeaec70758 Fix bug #67705 (extensive backtracking in rule regular expression) 2014-08-04 00:05:40 -07:00
Peter Cowburn bff84d7c18 Merge branch 'pull-request/754' into PHP-5.4 2014-07-31 14:30:39 +01:00
Peter Cowburn 358aedc454 Bug #51096 - Remove unnecessary ? for first/last day of 2014-07-31 14:21:38 +01:00
Keyur Govande 0a29e4731e Update NEWS 2014-07-30 18:33:19 +00:00
Michael Wallner 12b2127b72 Fixed bug #67715 (php-milter does not build and crashes randomly). 2014-07-30 20:12:13 +02:00
Rasmus Lerdorf 8b9719d8b9 We need to turn off any strict mode here for this warning to show up 2014-07-30 12:22:48 -04:00
Tjerk Meesters b3466f862f Updated NEWS for #67693 2014-07-30 18:16:56 +08:00
Tjerk Meesters da3add26cf Fixed bug #67693 - incorrect push to the empty array 2014-07-30 18:15:14 +08:00
Keyur Govande ab6c1d21f9 Undo inadvertent commit of php_version 2014-07-30 02:34:21 +00:00
Keyur Govande 65364fe7d0 Corrected patch for bug #60616
For unixODBC, use ODBC version as defined by it (as of v2.2.14 it is 3.5).
This allows us to use newer features like SQL_DESC_OCTET_LENGTH (which
returns the number of bytes required to store the data). This fixes the issue
in #60616. If the newer version is not available, over-allocate to accomodate
4-byte Unicode characters for CHAR and VARCHAR datatypes (and their Wide
counterparts).
version.
Fixed a couple of failing tests.
2014-07-30 02:28:31 +00:00
Keyur Govande 00546bc9b7 Fix bug #60616 (odbc_fetch_into returns junk at end of multi-byte char fields)
The ODBC extension did not support WVARCHAR. WVARCHAR ends up being handled by
the default handler where vallen is set by the driver to the actual bytes
needed for the field. If it is larger than default-lrl then the output is
corrupted (reading past the buffer) because the return functions don't expect
that to happen. The patch add support to handle WVARCHAR just like a regular
VARCHAR.
2014-07-28 23:15:23 +00:00
Stanislav Malyshev 3e167ba990 fix NEWS 2014-07-28 00:38:10 -07:00
Stanislav Malyshev b4a4db467b Fix missing type checks in various functions 2014-07-27 02:42:49 -07:00
Stanislav Malyshev d0a244f1f3 update NEWS 2014-07-24 22:55:39 -07:00
Xinchen Hui 51c38a0997 Fixed bug #67539 (ArrayIterator use-after-free due to object change during sorting) 2014-07-24 22:54:14 -07:00
Xinchen Hui 61e0f8599d Fixed Bug #67538 (SPL Iterators use-after-free) 2014-07-24 22:53:46 -07:00
Dmitry Saprykin d491b2f916 Fix bug #67496 Save command history when exiting interactive shell with control-c 2014-07-24 17:58:39 +02:00
Johannes Schlüter 71d3a69425 Fix bug #55496 Interactive mode doesn't force a newline before the prompt 2014-07-24 16:53:51 +02:00
Anatol Belski dc3a5d783f fix nmake snap when ext name is different in target dll 2014-07-21 14:45:49 +02:00
Lior Kaplan 0678dc8d91 Enable $ replacement in exif, ldap, pdo_pgsql and tidy 2014-07-21 01:45:36 +03:00
Yasuo Ohgaki ad744263ca Update NEWS 2014-07-19 10:11:42 +09:00
Yasuo Ohgaki e946de29d2 Fixed bug #66827 Session raises E_NOTICE when session name variable is array 2014-07-19 09:52:31 +09:00
Anatol Belski c5ccaf1d04 implemented copy libs of core exts in phpize mode 2014-07-18 18:38:57 +02:00
Anatol Belski 35b077f53e fix copy the ext dll into the prefix path in phpize mode 2014-07-18 11:39:38 +02:00
Anatol Belski 8044d0680b fix default prefix in phpize mode 2014-07-18 11:36:44 +02:00
Anatol Belski a8e0a623ec fix file with zero size usage in phpize mode 2014-07-18 11:35:32 +02:00
Lior Kaplan 2dff153b23 Enable build without atoll (e.g old AIX flavours) 2014-07-17 22:58:36 +03:00
Anatol Belski f0a1e410a3 implemented usage of the non core ext deps in phpize mode 2014-07-17 21:47:15 +02:00
Anatol Belski b3c6089111 implemented force usage of generated .h and .js deps in phpize mode 2014-07-17 09:25:57 +02:00
Anatol Belski ce2ad0df18 basic routines for phpize mode to
- generate headers for non core ext defines
- generate js deps for non core exts
2014-07-16 21:33:07 +02:00
Anatol Belski 04821a1ee6 added headers install to phpize mode 2014-07-14 09:52:39 +02:00
Tjerk Meesters f25ff02b54 Updated NEWS for 34407 2014-07-12 11:07:06 +08:00
Tjerk Meesters 4fc0d46ae7 Fix for bug #34407 - ucwords and title case
Added support for ranges like trim() has
2014-07-12 10:44:11 +08:00
George Wang 0baaf9fade Fixed a bug that cannot access custom request header stored in apache_request_headers() though array index. 2014-07-11 14:31:59 -04:00
Anatol Belski ae313b6037 fix makefile in phpize mode
- extend LDFLAGS with dynamically generated ones
- prevend dynamically generated CFLAGS to be overridden by hardcoded ones
2014-07-11 15:05:01 +02:00
Anatol Belski 9f5cf7d41a fixe output_as_table() when no ext was enabled 2014-07-11 09:36:44 +02:00
Anatol Belski 02b661ecfc fix end of stream exception when generating makefile 2014-07-10 22:33:55 +02:00
Anatol Belski 1f90dd3359 force ext_dep.js prepend to configure.js in phpize mode 2014-07-10 21:50:37 +02:00
George Wang e7f36ba693 cleanup file headers. 2014-07-10 15:14:30 -04:00
George Wang 01a1c3067c Do not kill children process in pre-fork mode when parent process quit. 2014-07-10 15:14:06 -04:00
George Wang 1f46bec9ce update to LSAPI 6.6
Conflicts:
	sapi/litespeed/lsapi_main.c
2014-07-10 14:46:43 -04:00
George Wang e3df0c5f60 Update LiteSpeed SAPI code to V6.4
Conflicts:
	sapi/litespeed/lsapi_main.c
	sapi/litespeed/lsapidef.h
	sapi/litespeed/lsapilib.c
	sapi/litespeed/lsapilib.h
2014-07-10 14:42:05 -04:00
Anatol Belski e2b0d97950 turn off PGO in phpize mode 2014-07-10 19:35:26 +02:00
George Wang a34288fa1a Fixed typo in Makefile.frag 2014-07-10 12:21:23 -04:00
Stanislav Malyshev b93ea59665 5.4.31 2014-07-08 21:26:39 -07:00
Stanislav Malyshev 64e4261c9b fix unstable test 2014-07-08 14:13:46 -07:00
Christian Weiske 0bf50a8302 Fix bug #67587: Redirection loop on nginx with FPM
Redirection will work correctly as long as PATH_INFO is available,
e.g. via the following nginx configuration:

    set $path_info $fastcgi_path_info;
    fastcgi_param PATH_INFO $path_info;
2014-07-08 12:53:45 -07:00
Anatol Belski d472434ea0 updated NEWS 2014-07-08 10:06:35 +02:00
Anatol Belski 03214a2aef Backported the patch from bug #67407 into 5.4 2014-07-08 09:52:35 +02:00
Remi Collet 494034901e NEWS 2014-07-08 08:30:15 +02:00
Remi Collet f8acf826c3 Fix Bug #67530 error_log=syslog ignored
As for Bug #64915
Systemd use --nodaemonize but need to error_log to file or syslog to be honoured
2014-07-08 08:29:24 +02:00
Adam Harvey 604de67b7d Fixed bug #66830 (Empty header causes PHP built-in web server to hang).
We had an infinite loop in sapi_cli_server_send_headers(): while iterating over
the linked list of headers, when an empty header was hit, continue would go to
the next iteration of the loop without updating h to be the next value in the
linked list. Updating it to always increment regardless of whether the header
is actually valid or not fixes the issue.
2014-07-07 20:36:06 +00:00
Stanislav Malyshev a7d1cad4c3 change locale - looks like not everybody has sl_SI 2014-07-07 01:35:25 -07:00
Stanislav Malyshev 897b7b68cc fix format 2014-07-07 00:48:32 -07:00
Stanislav Malyshev 6c8a570a96 Fix bug #67052 (NumberFormatter::parse() resets LC_NUMERIC setting) 2014-07-07 00:36:57 -07:00
Lior Kaplan 716d2a3937 Make sure the generator script also creates a newline at the end of file
Similar to commit d6713f39 in master
2014-07-06 22:15:09 -07:00
Lior Kaplan c5fec9e09d Add newline at end of file to prevent compilation warning
The newline was removed at commit 50d50c2f
2014-07-06 22:15:00 -07:00
Nikita Popov 18989420b6 Add test for bug #67151 2014-07-02 22:39:54 +02:00
Ferenc Kovacs 37a13d2df7 adding a reproduce script for bug #49184 2014-07-02 22:37:58 +02:00
Nikita Popov 3cc6bd10ac Fix bug #67151: strtr with empty array crashes 2014-07-02 22:33:20 +02:00
Anatol Belski 5efda71e54 bundle deplister.exe with releases 2014-07-02 11:34:37 +02:00
Michael Wallner 34e686c556 fix integer overflow in {stream,file}_{get,put}_contents() 2014-07-02 09:53:03 +02:00
Adam Harvey 899fe3d8af Fix ext/pgsql builds with libpq < 7.3.
Fixes bug #67550 (Error in code "form" instead of "from", pgsql.c, line 756).
2014-07-01 13:19:22 -07:00
Anatol Belski 6081dd781a updated libs_version.txt 2014-07-01 10:33:09 +02:00
Anatol Belski af5f997a5d updated libmagic.patch 2014-07-01 10:25:20 +02:00
Ferenc Kovacs 48df4464ea remove the NEWS entry for the reverted fpm fix 2014-06-30 18:37:56 +02:00
Ferenc Kovacs 9c8b42960d Revert "Fix Bug #67530 error_log=syslog ignored"
This reverts commit a0ecb3794f.
2014-06-30 18:37:23 +02:00
Ferenc Kovacs a7d1656b96 Fix bug #67091: make install fails to install libphp5.so on FreeBSD 10.0
Simplest fix is to remove the specific checks for freebsd1* as it also matches freebsd10,
and nobody should be using >=PHP 5.4 with freebsd 1.x(if it is even possible to make it
to compile there).
2014-06-30 01:31:10 +02:00
Ferenc Kovacs cc22f021fe removing the format added by mistake, props to Solar Designer for spotting this. 2014-06-27 16:27:36 +02:00
Remi Collet 334758794d NEWS 2014-06-27 09:50:01 +02:00
Remi Collet bf328b1681 Fix Bug #67531 syslog cannot be set in pool configuration
error_log is listed in FPM_PHP_INI_TO_EXPAND,
but should not be expand when value = syslog
2014-06-27 09:47:28 +02:00
Remi Collet a0ecb3794f Fix Bug #67530 error_log=syslog ignored
As for Bug #64915
Systemd use --nodaemonize but need to error_log to file or syslog to be honoured
2014-06-27 09:45:53 +02:00
Stanislav Malyshev 2db96fea2d update the date 2014-06-26 21:15:47 -07:00
Stanislav Malyshev b23460063f better explanation 2014-06-26 15:25:19 -07:00
Stanislav Malyshev ad9ed232e7 more extensive note on unserialize() change 2014-06-26 10:35:47 -07:00
Stanislav Malyshev 9d1d25e625 Fix test - because of big #67397 we don't allow overlong locales anymore 2014-06-24 11:21:43 -07:00
Stanislav Malyshev 3488cf6fd8 Merge branch 'PHP-5.4.30' into PHP-5.4
* PHP-5.4.30:
  5.4.30
  Better fix for bug #67072 with more BC provisions
  Fix bug #67498 - phpinfo() Type Confusion Information Leak Vulnerability
  update CVE
  Fix bug #67492: unserialize() SPL ArrayObject / SPLObjectStorage Type Confusion
  Fix bug #67397 (Buffer overflow in locale_get_display_name->uloc_getDisplayName (libicu 4.8.1))
  Fix bug #67349: Locale::parseLocale Double Free
  add CVEs
  Fix potential segfault in dns_get_record()
  Fix bug #66127 (Segmentation fault with ArrayObject unset)
  5.4.30 rc1

Conflicts:
	configure.in
	main/php_version.h
2014-06-24 10:23:36 -07:00
Stanislav Malyshev 08e7252abf update NEWS 2014-06-24 10:20:33 -07:00
Stanislav Malyshev 79457d1964 5.4.30 2014-06-24 10:17:49 -07:00
Stanislav Malyshev 6d97b4b2b3 Better fix for bug #67072 with more BC provisions 2014-06-23 22:16:25 -07:00
Stanislav Malyshev fb0128af2a Fix bug #67498 - phpinfo() Type Confusion Information Leak Vulnerability 2014-06-23 00:22:59 -07:00
Stanislav Malyshev f3dd77714d update CVE 2014-06-23 00:07:08 -07:00
Stanislav Malyshev c42d5cf5de Better fix for bug #67072 with more BC provisions 2014-06-21 21:29:11 -07:00
Stanislav Malyshev 88223c5245 Fix bug #67492: unserialize() SPL ArrayObject / SPLObjectStorage Type Confusion 2014-06-21 19:46:16 -07:00
Stanislav Malyshev 6027c56fd7 Fix bug #67397 (Buffer overflow in locale_get_display_name->uloc_getDisplayName (libicu 4.8.1)) 2014-06-21 18:44:14 -07:00
Stanislav Malyshev aef6432fbe Fix bug #67349: Locale::parseLocale Double Free 2014-06-21 18:38:41 -07:00
Stanislav Malyshev 300e0418a4 add CVEs 2014-06-21 18:37:08 -07:00
Dmitry Stogov 680ddabac1 Fixed MarinaDB support 2014-06-20 13:56:32 +04:00
Lior Kaplan 4106d48d1c Update copyright year to 2014 2014-06-17 23:57:20 +03:00
Lior Kaplan 945938d33c Update copyright year to 2014 2014-06-17 23:56:46 +03:00
Lior Kaplan 6f3bcb0d6e Update copyright year for re2c generated files 2014-06-16 23:28:36 +03:00
Lior Kaplan 2d576c2a99 Update copyright year to 2014 2014-06-16 23:27:45 +03:00
Lior Kaplan e667d23178 Update copyright year for re2c files as well 2014-06-16 23:26:50 +03:00
Bob Weinand 0a3979e08b Fix patch for bug #67436 2014-06-16 11:10:50 +02:00
Bob Weinand 4053dbe29f Merge branch 'pull-request/695' into PHP-5.4 2014-06-16 00:35:20 +02:00
Levi Morrison 6c9c44905e Added tests for bug 67436 2014-06-15 16:31:39 -06:00
Bob Weinand a84a2d4ace Fixed wrong XFAIL test - already fixed 2014-06-15 23:52:41 +02:00
Lior Kaplan d9432d6a50 Fix typo in Bug #67406 NEWS entry 2014-06-16 00:26:01 +03:00
Bob Weinand 85d3ac5763 Updated NEWS 2014-06-15 22:32:47 +02:00
Bob Weinand ca29063da5 Fix bug #67436 2014-06-15 22:18:25 +02:00
Sara Golemon 21525d0413 Fix potential segfault in dns_get_record()
If the remote sends us a packet with a malformed TXT record,
we could end up trying to over-consume the packet and wander
off into overruns.
2014-06-15 01:04:24 -07:00
Stanislav Malyshev b053c4f4f6 update NEWS 2014-06-15 00:46:31 -07:00
Derick Rethans ce70b920e4 - Updated to version 2014.5 (2014e) 2014-06-13 23:26:42 +01:00
Adam Harvey b51f82f260 Follow 308 Permanent Redirect responses.
Fixes bug #67430 (http:// wrapper doesn't follow 308 redirects).
2014-06-12 18:12:53 -07:00
Adam Harvey fe67674809 Add 308 and 426 to the HTTP response code map in the CLI server.
Implements FR #67429 (CLI server is missing some new HTTP response codes).
2014-06-12 17:54:29 -07:00
Adam Harvey 1b9cbab9a7 Keep 308-399 HTTP response codes when header('Location:') is called.
Fixes bug #67428 (header('Location: foo') will override a 308-399 response
code).
2014-06-12 17:35:05 -07:00
Sara Golemon 5f2a30e111 NEWS entry for "Fix potential segfault in dns_get_record()" 2014-06-11 14:24:13 -07:00
Sara Golemon 4f73394fdd Fix potential segfault in dns_get_record()
If the remote sends us a packet with a malformed TXT record,
we could end up trying to over-consume the packet and wander
off into overruns.
2014-06-11 13:37:04 -07:00
Stanislav Malyshev 2b04d68972 Fix bug #66127 (Segmentation fault with ArrayObject unset) 2014-06-10 23:24:11 -07:00
Stanislav Malyshev 317bcb96d0 Fix bug #66127 (Segmentation fault with ArrayObject unset) 2014-06-10 23:17:30 -07:00
Stanislav Malyshev 979eed5c6b 5.4.31 next 2014-06-10 23:03:40 -07:00
Stanislav Malyshev 0235a8acdc 5.4.30 rc1 2014-06-10 21:17:37 -07:00
Remi Collet 6256b79a35 NEWS 2014-06-10 14:35:14 +02:00
Remi Collet 25b1dc917a Fixed Bug #67413 fileinfo: cdf_read_property_info insufficient boundary chec
Upstream:
https://github.com/file/file/commit/93e063ee374b6a75729df9e7201fb511e47e259d

Adapted for C standard.
2014-06-10 14:33:37 +02:00
Remi Collet da5d40bae6 NEWS 2014-06-10 14:23:31 +02:00
Remi Collet 40ef6e07e0 Bug #67412 fileinfo: cdf_count_chain insufficient boundary check
Upstream:
https://github.com/file/file/commit/40bade80cbe2af1d0b2cd0420cebd5d5905a2382
2014-06-10 14:22:04 +02:00
Remi Collet 2b33a41162 NEWS 2014-06-10 14:16:00 +02:00
Remi Collet 5c9f967999 Fixed Bug #67411 fileinfo: cdf_check_stream_offset insufficient boundary check
Upstream:
https://github.com/file/file/commit/36fadd29849b8087af9f4586f89dbf74ea45be67
2014-06-10 14:13:14 +02:00
Remi Collet d02aa44090 NEWS 2014-06-10 14:04:27 +02:00
Remi Collet e77659a8c8 Fixed Bug #67410 fileinfo: mconvert incorrect handling of truncated pascal string size
Upstream
https://github.com/file/file/commit/27a14bc7ba285a0a5ebfdb55e54001aa11932b08
2014-06-10 14:02:36 +02:00
Remi Collet 949cab09f2 NEWS 2014-06-10 10:31:17 +02:00
Remi Collet 58c6a08e00 Fixed bug #67406 built-in web-server segfaults on startup
Reproduce on aarch64.

From select man page:
  "select() may update the timeout argument to indicate how much time was left."
So "const" is not ok.
2014-06-10 10:28:34 +02:00
Stanislav Malyshev 62857998c5 Fixed bug #67399 (putenv with empty variable may lead to crash) 2014-06-08 23:09:09 -07:00
Matteo Beccati 5c8c57aa6c Fixed DOM tests when using libxml2 versions patched against CVE-2014-0191
DOMDocument::substituteEntities needs to be set to true in order for
external entities to be parsed.
2014-06-09 07:05:23 +02:00
Stanislav Malyshev 9b5d56fd61 add news 2014-06-08 19:44:27 -07:00
Boro Sitnikovski aebb23e4db Bug 49898
__getCookies() method implementation
2014-06-08 19:36:18 -07:00
Stanislav Malyshev e43270cb2a fix order 2014-06-08 19:03:50 -07:00
Levi Morrison e030efa4f6 Fix bug 666222
This also adds some smaller, isolated tests related to bug 66622.

Conflicts:
	Zend/zend_vm_def.h
	Zend/zend_vm_execute.h
2014-06-08 18:59:23 -07:00
Jefersson Nathan 33926b19d0 Fixed identation on file 2014-06-08 14:30:01 -07:00
Jefersson Nathan e51eaaf665 Fix align indentation 2014-06-08 14:28:51 -07:00
Paul Oehler 76a7fd893b Added support for parsing ssl certificates using GeneralizedTime format.
fix bug #65698
fix bug #66636
2014-06-08 14:17:58 -07:00
Jeff Welch 5fd7c2b01d Remove superfluous echos. 2014-06-08 13:50:22 -07:00
Remi Collet 811f35d0ed NEWS 2014-06-06 14:17:54 +02:00
Remi Collet 91bcadd85e Fix bug #67390 insecure temporary file use in the configure script 2014-06-06 14:16:04 +02:00
Remi Collet 56c9e22c1f drop exec perm on doc files 2014-06-05 17:45:22 +02:00
Remi Collet 127651e9ae fix test for 5.4/5.5 2014-06-05 17:33:40 +02:00
Remi Collet 15d8c80ead add test for previous fix 2014-06-05 14:00:00 +02:00
Remi Collet 3f47368738 NEWS 2014-06-05 13:45:25 +02:00
Remi Collet 1fe9f1e4f5 Fix regression introduce in fix for bug #67118
The fix was correct but break some code (at least in Horde)
This is a temporary workaround to fix regressioni in 5.4, 5.5 and 5.6

This make php_date_initialize more consistent
- on success return 1 + time initiliazed
- on failure return 0 + time = zero
  which is check by DATE_CHECK_INITIALIZED by later method call

Will restore consistency with other date classes in master.
2014-06-05 13:39:46 +02:00
Stanislav Malyshev e06c4f7fe5 update NEWS 2014-06-04 01:09:37 -07:00
Anatol Belski 20568e5028 Fixed regression introduced by patch for bug #67072
This applies to 5.4 and 5.5 only as a legacy fix.
2014-06-03 20:43:58 +02:00
Remi Collet 0817a2c767 (re)add cve number in NEWS, from 5.4.29 2014-06-03 11:28:07 +02:00
Remi Collet 21986f98db NEWS 2014-06-03 11:08:46 +02:00
Remi Collet 4fcb9a9d1b Fix bug #67326 fileinfo: cdf_read_short_sector insufficient boundary check
Upstream fix https://github.com/file/file/commit/6d209c1c489457397a5763bca4b28e43aac90391.patch
Only revelant part applied
2014-06-03 11:05:00 +02:00
Xinchen Hui 38be99b739 Fixed bug #67359 (Segfault in recursiveDirectoryIterator) 2014-06-01 19:41:01 +08:00
Adam Harvey b5d9983ff4 Check for zero-length keys in spl_array_skip_protected and don't skip them.
Fixes bug #67360 (Missing element after ArrayObject::getIterator).
2014-05-29 17:49:32 +00:00
Anatol Belski d2765e4b8c updated libmagic.patch for 5.4+ 2014-05-27 22:36:12 +02:00
Stanislav Malyshev 76b06780d5 update NEWS 2014-05-27 11:28:53 -07:00
Stanislav Malyshev 091b7642c2 Fix bug #67249: printf out-of-bounds read 2014-05-27 11:28:22 -07:00
Matteo Beccati 92d54f81d6 Escape non-printable characters in the junit XML output
XML doesn't allow most of the characters < 0x20 and binary output
breaks XML parsers. Such characters are not allowed as entities
either, so the generated entities are escaped in order to be printed
as text.
2014-05-27 12:03:38 +02:00
Matteo Beccati 1696166466 Fixed broken XML junit output due to escaping of CDATA sections
I've removed CDATA and used htmlspecialchars as the output might not be UTF-8 safe, as pointed out by ircmaxell in 26b37f1792
2014-05-27 11:04:48 +02:00
Anatol Belski d184f07b3c backport this piece from 5.6, related to the #66307 fix 2014-05-26 18:05:13 -07:00
Anatol Belski 15ee33eb21 Fixed bug #66307 Fileinfo crashes with powerpoint files 2014-05-26 18:04:27 -07:00
Stanislav Malyshev 4005f06df6 Fix bug #67328 (fileinfo: numerous file_printf calls resulting in performance degradation)
Upstream patch: https://github.com/file/file/commit/b8acc83781d5a24cc5101e525d15efe0482c280d
2014-05-26 18:01:17 -07:00
Stanislav Malyshev 57225f09ed Fix bug #67327: fileinfo: CDF infinite loop in nelements DoS
Upstream fix: https://github.com/file/file/commit/f97486ef5dc3e8735440edc4fc8808c63e1a3ef0
2014-05-26 17:45:14 -07:00
Matteo Beccati f9357b44f3 Fix broken Junit output with --disable-cgi 2014-05-25 00:07:52 +02:00
Adam Harvey 319611ffbd Fix broken test caused by fdb2709. 2014-05-23 15:07:19 +00:00
Adam Harvey 5d1bfd6fbf Fix run-tests.php with Valgrind >= 3.10.0.
The version test that we had in run-tests.php assumed that the major and minor
version numbers were always single digits. This removes that assumption and
also uses version_compare() for the comparison instead of naively converting it
to an integer.
2014-05-22 22:37:08 +00:00
Adam Harvey fdb2709dd2 Add microseconds to the serialised form of DateTime objects.
Fixes bug #67308 (Serialize of DateTime truncates fractions of second).
2014-05-21 14:55:52 -05:00
Matteo Beccati 00a22d4d06 Improved test for bug #62479 2014-05-21 18:58:14 +02:00
Stanislav Malyshev fa6aaf8c03 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  fix typo in ODBC code
  Fix bug #67060: use default mode of 660

Conflicts:
	ext/odbc/php_odbc.c
2014-05-18 23:43:59 -07:00
Stanislav Malyshev adc070ca99 fix typo in ODBC code 2014-05-18 23:42:30 -07:00
Stanislav Malyshev b1c944dfd2 5.4.30 next 2014-05-13 22:20:15 -07:00
Stanislav Malyshev ffd74a0a29 update NEWS 2014-05-13 17:07:35 -07:00
Stanislav Malyshev dc92e81922 Merge branch 'bug67251' into PHP-5.4
* bug67251:
  Fix bug #67251 - date_parse_from_format out-of-bounds read

Conflicts:
	ext/date/lib/parse_date.c
2014-05-13 16:52:45 -07:00
Stanislav Malyshev 0094fd0969 Merge branch 'bug67252' into PHP-5.4
* bug67252:
  fix bug #67253: timelib_meridian_with_check out-of-bounds read
  Fix bug #67252: convert_uudecode out-of-bounds read
2014-05-13 16:47:27 -07:00
Stanislav Malyshev 9103c9eb4f Merge branch 'bug67250' into PHP-5.4
* bug67250:
  Fix bug #67250 (iptcparse out-of-bounds read)
2014-05-13 16:43:10 -07:00
Derick Rethans 3e276d6728 - Updated to version 2014.3 (2014c) 2014-05-13 16:36:58 +01:00
Stanislav Malyshev 6ef8e0f088 fix test - output can be chunked 2014-05-12 10:54:16 -07:00
Stanislav Malyshev 8a22540a95 Fix bug #67060: use default mode of 660 2014-05-11 23:32:35 -07:00
Stanislav Malyshev 466b8aa444 fix bug #67253: timelib_meridian_with_check out-of-bounds read 2014-05-11 21:09:11 -07:00
Stanislav Malyshev 1e2818b143 Fix bug #67252: convert_uudecode out-of-bounds read 2014-05-11 20:29:27 -07:00
Stanislav Malyshev 0a80849250 Fix bug #67251 - date_parse_from_format out-of-bounds read 2014-05-11 19:34:21 -07:00
Stanislav Malyshev 3e9cb6a4a5 Fix bug #67250 (iptcparse out-of-bounds read) 2014-05-11 19:09:19 -07:00
Stanislav Malyshev 2b475eebbe Fix bug #67247 spl_fixedarray_resize integer overflow 2014-05-11 17:54:27 -07:00
Stanislav Malyshev 14dd6c2d54 fix news 2014-05-11 17:43:28 -07:00
Bob Weinand 62b2eb666d Updated NEWS 2014-05-11 15:13:40 +02:00
Bob Weinand 5bf6a093ad Fix Linux specific fail in error traces (cherry-picked and fix for bug #67245)
Linux apparently does not like memcpy in overlapping regions...
2014-05-11 15:11:03 +02:00
Felipe Pena fb3b8de98d - Fixed off-by-one in phar_build (patch by crrodriguez at opensuse dot org) 2014-05-11 09:45:17 -03:00
Felipe Pena c575ab0c88 - Move checking 2014-05-10 11:55:42 -03:00
Felipe Pena 345f6d90d5 - Fixed missing NULL check in SimpleXMLElement::xpath() 2014-05-10 11:53:40 -03:00
Felipe Pena 5bd443a452 - Fixed missing NULL check 2014-05-10 11:39:08 -03:00
Stanislav Malyshev 4392339c3e oops, 5.4 and 5.5 use malloc in TSRM 2014-05-08 01:59:39 -07:00
Stanislav Malyshev 0cc18fdfba Fix memory leak in TSRM 2014-05-08 01:00:34 -07:00
Dmitry Stogov 8517001b25 Fixed test (it requires ext/hash) 2014-05-07 00:52:49 +02:00
Dmitry Stogov f880013c4d Fixed tests (they might fail from time to time because of session GC) 2014-05-07 00:37:56 +02:00
Adam Harvey f7cb87f333 Fix author name on the #63228 patch. 2014-05-02 10:23:09 -07:00
Adam Harvey 941c39bd06 Use the right path for the suggested PHP invocation in ext_skel.
Fixes bug #67160 (ext_skel outputs incorrect information).
2014-05-01 11:22:20 -07:00
Ferenc Kovacs 1c13ad7c0e add missing NEWS entry to the correct release where it was added 2014-05-01 10:50:08 +02:00
Stanislav Malyshev 35ceea928b Fix bug #67060: use default mode of 660 2014-04-29 09:14:11 -07:00
Anatol Belski 2d625b5f81 Fixed bug #66431 Special Character via COM Interface (CP_UTF8) 2014-04-29 13:40:44 +02:00
Popa Adrian Marius bb422cb60e Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Cleanup ZEND_MODULE_API_NO => 20050922
2014-04-28 12:13:11 +03:00
Popa Adrian Marius dbcd6304bb Cleanup ZEND_MODULE_API_NO => 20050922 2014-04-28 12:12:52 +03:00
Anatol Belski d3dcd61623 fixed test 2014-04-25 17:39:53 +02:00
Anatol Belski c1aa9baf29 Fixed bug #67118 DateTime constructor crash with invalid data 2014-04-25 17:23:26 +02:00
Stanislav Malyshev 03c703b8bd add a test case previously broken by a bad fix 2014-04-24 23:58:38 -07:00
Stanislav Malyshev a328803803 Revert "Fixed bug #64604"
This reverts commit b05c088a3a.
Breaks parsing urls where query has : in it, like: /foo/bar?baz=goo:boo
2014-04-24 23:50:45 -07:00
Anatol Belski 03be983398 fix dll export 2014-04-24 10:51:42 +02:00
Jakub Zelenka 61499bf282 Fix accepting ill-formed UTF-8 characters
Conflicts:
	ext/phar/phar_path_check.c
2014-04-22 16:55:58 -07:00
Danack ea4cee93c8 Allow valid multi-byte utf-8 characters to be allowed as file names in phar archives. 2014-04-20 17:19:20 -07:00
Rouven Weßling 68283c9f4a Fix a compiler warning in php_rand.h 2014-04-20 16:35:36 -07:00
Julio Pintos 49341e992a Fix #66908: php-fpm reload leaks epoll_create() file descriptor
This patch fixes descriptor leak which could lead to DoS once Max open files is reached
2014-04-20 16:21:49 -07:00
Boro Sitnikovski a18cec1b86 Fix bug #65701: Do not use cache for file file copy 2014-04-20 15:22:44 -07:00
Anatol Belski 53c68811ba UPGRADING note about bug #67072 2014-04-18 15:43:05 +02:00
Anatol Belski c2acdbdd3d Improved the fix for bug #67072, thanks Nikita 2014-04-18 15:13:32 +02:00
Levi Morrison 6e1e98d7b8 These links to ~helly don't work anymore. 2014-04-17 17:20:24 +02:00
Anatol Belski 5328d42899 Fixed bug #67072 Echoing unserialized "SplFileObject" crash
The actual issue lays in the unserializer code which doesn't honor
the unserialize callback. By contrast, the serialize callback is
respected. This leads to the situation that even if a class has
disabled the serialization explicitly, user could still construct
a vulnerable string which would result bad things when trying
to unserialize.

This conserns also the classes implementing Serializable as well
as some core classes disabling serialize/unserialize callbacks
explicitly (PDO, SimpleXML, SplFileInfo and co). As of now, the
flow is first to call the unserialize callback (if available),
then call __wakeup. If the unserialize callback returns with no
success, no object is instantiated. This makes the scheme used
by internal classes effective, to disable unserialize just assign
zend_class_unserialize_deny as callback.
2014-04-17 10:48:14 +02:00
Anatol Belski 7a5f1663c6 correct the bug #67081 fix 2014-04-16 15:06:57 +02:00
Anatol Belski 5224614f23 Fixed bug #67081 DOMDocumentType->internalSubset returns entire DOCTYPE tag, not only the subset 2014-04-16 14:13:45 +02:00
Stanislav Malyshev 1d34d82231 5.4.29 is next 2014-04-15 16:51:38 -07:00
270 changed files with 18933 additions and 14949 deletions

No files matched your search

+4
View File
@@ -22,6 +22,10 @@ sapi/nsapi/nsapi.c ident
sapi/continuity/capi.c ident
Zend/RFCs/002.txt ident
Zend/RFCs/003.txt ident
ext/exif/exif.c ident
ext/ldap/ldap.c ident
ext/pdo_pgsql/pdo_pgsql.c ident
ext/tidy/tidy.c ident
NEWS merge=NEWS
/ext/bz2/tests/with_strings.phpt -crlf
/ext/dom/tests/bug40836.phpt -crlf
+196 -4
View File
@@ -1,19 +1,208 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 2014, PHP 5.4.28
07 Aug 2014, PHP 5.4.32
- Core:
. Fixed bug #67717 (segfault in dns_get_record). (CVE-2014-3597) (Remi)
- COM:
. Fixed missing type checks in com_event_sink. (Yussuf Khalil, Stas)
- Fileinfo:
. Fixed bug #67705 (extensive backtracking in rule regular expression).
(CVE-2014-3538) (Remi)
. Fixed bug #67716 (Segfault in cdf.c). (CVE-2014-3587) (Remi)
- GD:
. Fixed bug #66901 (php-gd 'c_color' NULL pointer dereference).
(CVE-2014-2497) (Remi)
. Fixed bug #67730 (Null byte injection possible with imagexxx functions).
(CVE-2014-5120) (Ryan Mauger)
- Milter:
. Fixed bug #67715 (php-milter does not build and crashes randomly). (Mike)
- OpenSSL:
. Fixed missing type checks in OpenSSL options (Yussuf Khalil, Stas).
- Readline:
. Fixed bug #55496 (Interactive mode doesn't force a newline before the
prompt). (Bob, Johannes)
. Fixed bug #67496 (Save command history when exiting interactive shell
with control-c). (Dmitry Saprykin, Johannes)
- Sessions:
. Fixed missing type checks in php_session_create_id (Yussuf Khalil, Stas).
- SPL:
. Fixed bug #67539 (ArrayIterator use-after-free due to object change during
sorting). (research at insighti dot org, Laruence)
. Fixed bug #67538 (SPL Iterators use-after-free). (CVE-2014-4670) (Laruence)
- Core:
. Fixed bug #67693 (incorrect push to the empty array) (Tjerk)
- ODBC:
. Fixed bug #60616 (odbc_fetch_into returns junk data at end of multi-byte
char fields). (Keyur)
- Zlib:
. Fixed bug #67724 (chained zlib filters silently fail with large amounts of
data). (Mike)
24 Jul 2014, PHP 5.4.31
- Core:
. Fixed bug #67428 (header('Location: foo') will override a 308-399 response
code). (Adam)
. Fixed bug #67436 (Autoloader isn't called if two method definitions don't
match). (Bob)
. Fixed bug #67091 (make install fails to install libphp5.so on FreeBSD 10.0).
(Ferenc)
. Fixed bug #67151 (strtr with empty array crashes). (Nikita)
. Fixed bug #67407 (Windows 8.1/Server 2012 R2 reported as Windows 8/Server
2012). (Christian Wenz)
. Implemented FR #34407 (ucwords and Title Case). (Tjerk)
- CLI server:
. Implemented FR #67429 (CLI server is missing some new HTTP response codes).
(Adam)
. Fixed bug #66830 (Empty header causes PHP built-in web server to hang).
(Adam)
- FPM:
. Fixed bug #67530 (error_log=syslog ignored). (Remi)
. Fixed bug #67531 (syslog cannot be set in pool configuration). (Remi)
- Intl:
. Fixed bug #67052 (NumberFormatter::parse() resets LC_NUMERIC setting).
(Stas)
- pgsql:
. Fixed bug #67550 (Error in code "form" instead of "from", pgsql.c, line 756),
which affected builds against libpq < 7.3. (Adam)
- Phar:
. Fixed bug #67587 (Redirection loop on nginx with FPM). (Christian Weiske)
- Streams:
. Fixed bug #67430 (http:// wrapper doesn't follow 308 redirects). (Adam)
- Session:
. Fixed bug #66827 (Session raises E_NOTICE when session name variable is array).
(Yasuo)
26 Jun 2014, PHP 5.4.30
- Core:
. Fixed BC break introduced by patch for bug #67072. (Anatol, Stas)
. Fixed bug #66622 (Closures do not correctly capture the late bound class
(static::) in some cases). (Levi Morrison)
. Fixed bug #67390 (insecure temporary file use in the configure script).
(Remi) (CVE-2014-3981)
. Fixed bug #67399 (putenv with empty variable may lead to crash). (Stas)
. Fixed bug #67498 (phpinfo() Type Confusion Information Leak Vulnerability).
(Stefan Esser)
- CLI server:
. Fixed Bug #67406 (built-in web-server segfaults on startup). (Remi)
- Date:
. Fixed bug #67308 (Serialize of DateTime truncates fractions of second).
(Adam)
. Fixed regression in fix for bug #67118 (constructor can't be called twice).
(Remi)
- Fileinfo:
. Fixed bug #67326 (fileinfo: cdf_read_short_sector insufficient boundary
check). (CVE-2014-0207)
. Fixed bug #67410 (fileinfo: mconvert incorrect handling of truncated pascal
string size). (CVE-2014-3478) (Francisco Alonso, Jan Kaluza, Remi)
. Fixed bug #67411 (fileinfo: cdf_check_stream_offset insufficient boundary
check). (CVE-2014-3479) (Francisco Alonso, Jan Kaluza, Remi)
. Fixed bug #67412 (fileinfo: cdf_count_chain insufficient boundary check).
(CVE-2014-3480) (Francisco Alonso, Jan Kaluza, Remi)
. Fixed bug #67413 (fileinfo: cdf_read_property_info insufficient boundary
check). (CVE-2014-3487) (Francisco Alonso, Jan Kaluza, Remi)
- Intl:
. Fixed bug #67349 (Locale::parseLocale Double Free). (Stas)
. Fixed bug #67397 (Buffer overflow in locale_get_display_name and
uloc_getDisplayName (libicu 4.8.1)). (Stas)
- Network:
. Fixed bug #67432 (Fix potential segfault in dns_get_record()).
(CVE-2014-4049). (Sara)
- OpenSSL:
. Fixed bug #65698 (certificates validity parsing does not work past 2050).
(Paul Oehler)
. Fixed bug #66636 (openssl_x509_parse warning with V_ASN1_GENERALIZEDTIME).
(Paul Oehler)
- SOAP:
. Implemented FR #49898 (Add SoapClient::__getCookies()). (Boro Sitnikovski)
- SPL:
. Fixed bug #66127 (Segmentation fault with ArrayObject unset). (Stas)
. Fixed bug #67359 (Segfault in recursiveDirectoryIterator). (Laruence)
. Fixed bug #67360 (Missing element after ArrayObject::getIterator). (Adam)
. Fixed bug #67492 (unserialize() SPL ArrayObject / SPLObjectStorage Type
Confusion) (CVE-2014-3515). (Stefan Esser)
29 May 2014, PHP 5.4.29
- COM:
. Fixed bug #66431 (Special Character via COM Interface (CP_UTF8)). (Anatol)
- Core:
. Fixed bug #65701 (copy() doesn't work when destination filename is created
by tempnam()). (Boro Sitnikovski)
. Fixed bug #67072 (Echoing unserialized "SplFileObject" crash). (Anatol)
. Fixed bug #67245 (usage of memcpy() with overlapping src and dst in
zend_exceptions.c). (Bob)
. Fixed bug #67247 (spl_fixedarray_resize integer overflow). (Stas)
. Fixed bug #67249 (printf out-of-bounds read). (Stas)
. Fixed bug #67250 (iptcparse out-of-bounds read). (Stas)
. Fixed bug #67252 (convert_uudecode out-of-bounds read). (Stas)
- Date:
. Fixed bug #67118 (DateTime constructor crash with invalid data). (Anatol)
. Fixed bug #67251 (date_parse_from_format out-of-bounds read). (Stas)
. Fixed bug #67253 (timelib_meridian_with_check out-of-bounds read). (Stas)
- DOM:
. Fixed bug #67081 (DOMDocumentType->internalSubset returns entire DOCTYPE tag,
not only the subset). (Anatol)
- Fileinfo:
. Fixed bug #66307 (Fileinfo crashes with powerpoint files). (Anatol)
. Fixed bug #67327 (fileinfo: CDF infinite loop in nelements DoS).
(CVE-2014-0238)
. Fixed bug #67328 (fileinfo: fileinfo: numerous file_printf calls resulting in
performance degradation). (CVE-2014-0237)
- FPM:
. Fixed bug #66908 (php-fpm reload leaks epoll_create() file descriptor).
(Julio Pintos)
- Phar:
. Fix bug #64498 ($phar->buildFromDirectory can't compress file with an accent
in its name). (PR #588)
01 May 2014, PHP 5.4.28
- Core:
. Fixed bug #61019 (Out of memory on command stream_get_contents). (Mike)
. Fixed bug #64330 (stream_socket_server() creates wrong Abstract Namespace
UNIX sockets). (Mike)
. Fixed bug #64604 (parse_url is inconsistent with specified port).
(Ingo Walz)
. Fixed bug #66171 (Symlinks and session handler allow open_basedir bypass).
(Jann Horn, Stas)
. Fixed bug #66182 (exit in stream filter produces segfault). (Mike)
. Fixed bug #66736 (fpassthru broken). (Mike)
. Fixed bug #67024 (getimagesize should recognize BMP files with negative
height). (Gabor Buella)
. Fixed bug #67033 (Remove reference to Windows 95). (Anatol)
- cURL:
. Fixed bug #66562 (curl_exec returns differently than curl_multi_getcontent).
@@ -32,6 +221,8 @@ PHP NEWS
- FPM:
. Fixed bug #66482 (unknown entry 'priority' in php-fpm.conf).
. Fixed bug #67060 (sapi/fpm: possible privilege escalation due to insecure
default configuration) (CVE-2014-0185). (Stas)
- JSON:
. Fixed bug #66021 (Blank line inside empty array/object when
@@ -694,7 +885,8 @@ PHP NEWS
. Fixed bug #63999 (php with fpm fails to build on Solaris 10 or 11). (Adam)
- Litespeed:
. Fixed bug #63228 (-Werror=format-security error in lsapi code). (George)
. Fixed bug #63228 (-Werror=format-security error in lsapi code).
(Elan Ruusamäe, George)
- ext/sqlite3:
. Fixed bug #63921 (sqlite3::bindvalue and relative PHP functions aren't
Executable → Regular
View File
File mode changed.
Executable → Regular
+45 -1
View File
@@ -10,6 +10,7 @@ PHP 5.4 UPGRADE NOTES
2. Changes to reserved words and classes
3. Changes to engine behavior
4. Changes to existing functions
a. unserialize() change
5. Changes to existing classes
6. Changes to existing methods
7. Deprecated Functionality
@@ -311,7 +312,7 @@ PHP 5.4 UPGRADE NOTES
to limit the amount of stack frames returned.
- Fixed crypt_blowfish handling of 8-bit characters. crypt() in Blowfish mode
now supports hashes marked $2a$, $2x$, $2y$ and $2z$.
now supports hashes marked $2a$, $2x$ and $2y$.
- mbstring now supports following encodings: Shift_JIS/UTF-8 Emoji,
JIS X0213:2004 (Shift_JIS-2004, EUC-JP-2004, ISO-2022-JP-2004),
@@ -350,6 +351,47 @@ PHP 5.4 UPGRADE NOTES
- Since 5.4.7, ctor is always called when new user stream wrapper object is created.
Before, it was called only when stream_open was called.
4a. unserialize() change
------------------------
- Starting PHP 5.4.29, the bug fix for bug #67072 introduces a change to
unserialize() function, detailed below:
If the string looking like 'O:..:"ClassName":...' is unserialized, and
the class named is an internal class that declares custom unserializer
function, or extends such class, unserialize would fail.
Using O: for user classes not extending internal classes (including
those implementing Serializable) is still supported in 5.4, though
it is deprecated and may not be supported in 5.6 for classes that do not
originally serialize to O:. Same for using O: for internal classes
implementing Serializable (like ArrayObject) and classes that extend
them.
The reason for that is that O: format is meant to be used with classes
that do not define custom handlers, and was never intended for the use
with classes that do. When used with the class that relies on custom
unserializer, it can leave the object of such internal class in an
inconsistent state which has been observed to result in crashes and may
also lead to memory corruption and ultimately even arbitrary code
execution. This was never the intended use of unserializer, and mere
possibility of doing this constitutes a bug, since the data passed to
unserialize() is not a valid serialization of any object. Since there
are many applications applying unserialize() to untrusted data, this
presents a potential security vulnerability. Thus, keeping such bug in
the code base was considered too dangerous.
We are aware that some applications use O: format as a way to
instantiate classes. This was never the intended usage of serializer,
and ReflectionClass methods such as newInstance or
newInstanceWithoutConstructor can be used for that. We're working on
providing more comprehensive solution for such use cases in PHP 5.6 and
welcome the ideas in this area.
We note also that using unserialize() on any data that is not the result
of serialize() call continues to be an unsupported scenario and should
not be relied on to produce any specific result.
==============================
5. Changes to existing classes
==============================
@@ -370,6 +412,8 @@ PHP 5.4 UPGRADE NOTES
- Added iterator support in MySQLi. mysqli_result implements Traversable.
- Since 5.4.30, SOAPClient has __getCookies() method.
==============================
6. Changes to existing methods
==============================
+15
View File
@@ -12,6 +12,7 @@ UPGRADE NOTES - PHP X.Y
g. leak_variable
h. API Signature changes
i. new TSRM function expand_filepath_with_mode
j. unserialization of manipulated object strings
2. Build system changes
a. Unix build system changes
@@ -189,6 +190,20 @@ it increments the refcounts of those objects instead.
PHPAPI char *expand_filepath_with_mode(const char *filepath, char *real_path, const char *relative_to, size_t relative_to_len, int realpath_mode TSRMLS_DC);
expand_filepath_with_mode lets define how realpath will behave, using one of the existing mode: CWD_EXPAND , CWD_FILEPATH or CWD_REALPATH.
j.
Strings requiring unserialization of objects are now explicitly checked
whether the object they contain implements the Serializable interface.
This solves the situation where manipulated strings could be passed for
objects using Serializable to disallow serialization. An object
implementing Serializable will always start with "C:" in the serialized
string, all other objects are represented with starting "O:". Objects
implementing Serializable to disable serialization using
zend_class_unserialize_deny and zend_class_serialize_deny, when
instantiated from the serializer with a manipulated "O:" string at the
start, will most likely be defectively initialized. This is now
fixed at the appropriate place by checking for the presence of the
serialize callback in the class entry.
========================
2. Build system changes
========================
+10
View File
@@ -0,0 +1,10 @@
<?php
class a {
public function test($arg = c::TESTCONSTANT) {
echo __METHOD__ . "($arg)\n";
}
static public function staticTest() {
}
}
+8
View File
@@ -0,0 +1,8 @@
<?php
class b extends a {
public function test() {
echo __METHOD__ . "()\n";
parent::test();
}
}
+26
View File
@@ -0,0 +1,26 @@
--TEST--
bug67436: Autoloader isn't called if user defined error handler is present
--INI--
error_reporting=
--FILE--
<?php
spl_autoload_register(function($classname) {
if (in_array($classname, array('a','b','c'))) {
require_once ($classname . '.php');
}
});
set_error_handler(function ($errno, $errstr, $errfile, $errline) {
}, error_reporting());
a::staticTest();
$b = new b();
$b->test();
--EXPECT--
b::test()
a::test(c::TESTCONSTANT)
@@ -0,0 +1,24 @@
--TEST--
bug67436: E_STRICT instead of custom error handler
--INI--
error_reporting=-1
--FILE--
<?php
spl_autoload_register(function($classname) {
if (in_array($classname, array('a','b','c'))) {
require_once ($classname . '.php');
}
});
a::staticTest();
$b = new b();
$b->test();
--EXPECTF--
Strict Standards: Declaration of b::test() should be compatible with a::test($arg = c::TESTCONSTANT) in %s/bug67436/b.php on line %d
b::test()
a::test(c::TESTCONSTANT)
+5
View File
@@ -0,0 +1,5 @@
<?php
class c {
const TESTCONSTANT = "c::TESTCONSTANT";
}
+37
View File
@@ -0,0 +1,37 @@
--TEST--
Bug 66622: Closures do not correctly capture the late bound class (static::) in some cases
--FILE--
<?php
class A {
static function name() { return 'A'; }
function foo() {
$fn = function() { return static::name(); };
echo static::name() . ' vs ' . $fn() . "\n";
}
function bar() {
$fn = static function() { return static::name(); };
echo static::name() . ' vs ' . $fn() . "\n";
}
static function baz() {
$fn = function() { return static::name(); };
echo static::name() . ' vs ' . $fn() . "\n";
}
}
class B extends A {
static function name() { return 'B'; }
}
function test() {
(new B)->foo();
(new B)->bar();
(new B)->baz();
B::baz();
}
test();
--EXPECT--
B vs B
B vs B
B vs B
B vs B
+16 -16
View File
@@ -245,16 +245,16 @@ static const zend_function_entry builtin_functions[] = { /* {{{ */
ZEND_FE(func_num_args, arginfo_zend__void)
ZEND_FE(func_get_arg, arginfo_func_get_arg)
ZEND_FE(func_get_args, arginfo_zend__void)
ZEND_FE(strlen, arginfo_strlen)
ZEND_FE(strcmp, arginfo_strcmp)
ZEND_FE(strncmp, arginfo_strncmp)
ZEND_FE(strcasecmp, arginfo_strcmp)
ZEND_FE(strlen, arginfo_strlen)
ZEND_FE(strcmp, arginfo_strcmp)
ZEND_FE(strncmp, arginfo_strncmp)
ZEND_FE(strcasecmp, arginfo_strcmp)
ZEND_FE(strncasecmp, arginfo_strncmp)
ZEND_FE(each, arginfo_each)
ZEND_FE(each, arginfo_each)
ZEND_FE(error_reporting, arginfo_error_reporting)
ZEND_FE(define, arginfo_define)
ZEND_FE(defined, arginfo_defined)
ZEND_FE(get_class, arginfo_get_class)
ZEND_FE(define, arginfo_define)
ZEND_FE(defined, arginfo_defined)
ZEND_FE(get_class, arginfo_get_class)
ZEND_FE(get_called_class, arginfo_zend__void)
ZEND_FE(get_parent_class, arginfo_get_class)
ZEND_FE(method_exists, arginfo_method_exists)
@@ -274,13 +274,13 @@ static const zend_function_entry builtin_functions[] = { /* {{{ */
ZEND_FE(get_included_files, arginfo_zend__void)
ZEND_FALIAS(get_required_files, get_included_files, arginfo_zend__void)
ZEND_FE(is_subclass_of, arginfo_is_subclass_of)
ZEND_FE(is_a, arginfo_is_subclass_of)
ZEND_FE(is_a, arginfo_is_subclass_of)
ZEND_FE(get_class_vars, arginfo_get_class_vars)
ZEND_FE(get_object_vars, arginfo_get_object_vars)
ZEND_FE(get_class_methods, arginfo_get_class_methods)
ZEND_FE(trigger_error, arginfo_trigger_error)
ZEND_FALIAS(user_error, trigger_error, arginfo_trigger_error)
ZEND_FE(set_error_handler, arginfo_set_error_handler)
ZEND_FE(set_error_handler, arginfo_set_error_handler)
ZEND_FE(restore_error_handler, arginfo_zend__void)
ZEND_FE(set_exception_handler, arginfo_set_exception_handler)
ZEND_FE(restore_exception_handler, arginfo_zend__void)
@@ -288,14 +288,14 @@ static const zend_function_entry builtin_functions[] = { /* {{{ */
ZEND_FE(get_declared_traits, arginfo_zend__void)
ZEND_FE(get_declared_interfaces, arginfo_zend__void)
ZEND_FE(get_defined_functions, arginfo_zend__void)
ZEND_FE(get_defined_vars, arginfo_zend__void)
ZEND_FE(create_function, arginfo_create_function)
ZEND_FE(get_resource_type, arginfo_get_resource_type)
ZEND_FE(get_defined_vars, arginfo_zend__void)
ZEND_FE(create_function, arginfo_create_function)
ZEND_FE(get_resource_type, arginfo_get_resource_type)
ZEND_FE(get_loaded_extensions, arginfo_get_loaded_extensions)
ZEND_FE(extension_loaded, arginfo_extension_loaded)
ZEND_FE(extension_loaded, arginfo_extension_loaded)
ZEND_FE(get_extension_funcs, arginfo_extension_loaded)
ZEND_FE(get_defined_constants, arginfo_get_defined_constants)
ZEND_FE(debug_backtrace, arginfo_debug_backtrace)
ZEND_FE(debug_backtrace, arginfo_debug_backtrace)
ZEND_FE(debug_print_backtrace, arginfo_debug_print_backtrace)
#if ZEND_DEBUG
ZEND_FE(zend_test_func, NULL)
@@ -305,7 +305,7 @@ static const zend_function_entry builtin_functions[] = { /* {{{ */
#endif
ZEND_FE(gc_collect_cycles, arginfo_zend__void)
ZEND_FE(gc_enabled, arginfo_zend__void)
ZEND_FE(gc_enable, arginfo_zend__void)
ZEND_FE(gc_enable, arginfo_zend__void)
ZEND_FE(gc_disable, arginfo_zend__void)
ZEND_FE_END
};
+1 -3
View File
@@ -487,6 +487,7 @@ ZEND_API void zend_create_closure(zval *res, zend_function *func, zend_class_ent
}
}
closure->this_ptr = NULL;
/* Invariants:
* If the closure is unscoped, it has no bound object.
* The the closure is scoped, it's either static or it's bound */
@@ -498,10 +499,7 @@ ZEND_API void zend_create_closure(zval *res, zend_function *func, zend_class_ent
Z_ADDREF_P(this_ptr);
} else {
closure->func.common.fn_flags |= ZEND_ACC_STATIC;
closure->this_ptr = NULL;
}
} else {
closure->this_ptr = NULL;
}
}
/* }}} */
+6 -3
View File
@@ -3150,8 +3150,11 @@ static char * zend_get_function_declaration(zend_function *fptr TSRMLS_DC) /* {{
*zv = *precv->op2.zv;
zval_copy_ctor(zv);
INIT_PZVAL(zv);
zval_update_constant_ex(&zv, (void*)1, fptr->common.scope TSRMLS_CC);
if (Z_TYPE_P(zv) == IS_BOOL) {
if ((Z_TYPE_P(zv) & IS_CONSTANT_TYPE_MASK) == IS_CONSTANT) {
REALLOC_BUF_IF_EXCEED(buf, offset, length, Z_STRLEN_P(zv));
memcpy(offset, Z_STRVAL_P(zv), Z_STRLEN_P(zv));
offset += Z_STRLEN_P(zv);
} else if (Z_TYPE_P(zv) == IS_BOOL) {
if (Z_LVAL_P(zv)) {
memcpy(offset, "true", 4);
offset += 4;
@@ -3173,7 +3176,7 @@ static char * zend_get_function_declaration(zend_function *fptr TSRMLS_DC) /* {{
*(offset++) = '.';
}
*(offset++) = '\'';
} else if (Z_TYPE_P(zv) == IS_ARRAY) {
} else if (Z_TYPE_P(zv) == IS_ARRAY || (Z_TYPE_P(zv) & IS_CONSTANT_TYPE_MASK) == IS_CONSTANT_ARRAY) {
memcpy(offset, "Array", 5);
offset += 5;
} else {
+1 -1
View File
@@ -363,7 +363,7 @@ ZEND_METHOD(error_exception, getSeverity)
#define TRACE_ARG_APPEND(vallen) \
*str = (char*)erealloc(*str, *len + 1 + vallen); \
memcpy((*str) + *len - l_added + 1 + vallen, (*str) + *len - l_added + 1, l_added);
memmove((*str) + *len - l_added + 1 + vallen, (*str) + *len - l_added + 1, l_added);
/* }}} */
+8 -1
View File
@@ -5161,6 +5161,7 @@ ZEND_VM_HANDLER(153, ZEND_DECLARE_LAMBDA_FUNCTION, CONST, UNUSED)
{
USE_OPLINE
zend_function *op_array;
int closure_is_static, closure_is_being_defined_inside_static_context;
SAVE_OPLINE();
@@ -5169,7 +5170,13 @@ ZEND_VM_HANDLER(153, ZEND_DECLARE_LAMBDA_FUNCTION, CONST, UNUSED)
zend_error_noreturn(E_ERROR, "Base lambda function for closure not found");
}
zend_create_closure(&EX_T(opline->result.var).tmp_var, op_array, EG(scope), EG(This) TSRMLS_CC);
closure_is_static = op_array->common.fn_flags & ZEND_ACC_STATIC;
closure_is_being_defined_inside_static_context = EX(prev_execute_data) && EX(prev_execute_data)->function_state.function->common.fn_flags & ZEND_ACC_STATIC;
if (closure_is_static || closure_is_being_defined_inside_static_context) {
zend_create_closure(&EX_T(opline->result.var).tmp_var, (zend_function *) op_array, EG(called_scope), NULL TSRMLS_CC);
} else {
zend_create_closure(&EX_T(opline->result.var).tmp_var, (zend_function *) op_array, EG(scope), EG(This) TSRMLS_CC);
}
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
+8 -1
View File
@@ -5847,6 +5847,7 @@ static int ZEND_FASTCALL ZEND_DECLARE_LAMBDA_FUNCTION_SPEC_CONST_UNUSED_HANDLER
{
USE_OPLINE
zend_function *op_array;
int closure_is_static, closure_is_being_defined_inside_static_context;
SAVE_OPLINE();
@@ -5855,7 +5856,13 @@ static int ZEND_FASTCALL ZEND_DECLARE_LAMBDA_FUNCTION_SPEC_CONST_UNUSED_HANDLER
zend_error_noreturn(E_ERROR, "Base lambda function for closure not found");
}
zend_create_closure(&EX_T(opline->result.var).tmp_var, op_array, EG(scope), EG(This) TSRMLS_CC);
closure_is_static = op_array->common.fn_flags & ZEND_ACC_STATIC;
closure_is_being_defined_inside_static_context = EX(prev_execute_data) && EX(prev_execute_data)->function_state.function->common.fn_flags & ZEND_ACC_STATIC;
if (closure_is_static || closure_is_being_defined_inside_static_context) {
zend_create_closure(&EX_T(opline->result.var).tmp_var, (zend_function *) op_array, EG(called_scope), NULL TSRMLS_CC);
} else {
zend_create_closure(&EX_T(opline->result.var).tmp_var, (zend_function *) op_array, EG(scope), EG(This) TSRMLS_CC);
}
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
+1 -1
View File
@@ -1210,7 +1210,7 @@ function gen_vm($def, $skel) {
fputs($f,"#define $op $code\n");
}
fputs($f, "\n#endif");
fputs($f, "\n#endif\n");
fclose($f);
echo "zend_vm_opcodes.h generated successfully.\n";
+1 -1
View File
@@ -165,4 +165,4 @@ ZEND_API const char *zend_get_opcode_name(zend_uchar opcode);
#define ZEND_QM_ASSIGN_VAR 157
#define ZEND_JMP_SET_VAR 158
#endif
#endif
+1 -1
View File
@@ -1711,7 +1711,7 @@ int main(int argc, char *argv[])
{
FILE *fp;
long position;
char *filename = "/tmp/phpglibccheck";
char *filename = tmpnam(NULL);
fp = fopen(filename, "w");
if (fp == NULL) {
-8
View File
@@ -1532,10 +1532,6 @@ dgux*)
shlibpath_var=LD_LIBRARY_PATH
;;
freebsd1*)
dynamic_linker=no
;;
freebsd* | dragonfly*)
# DragonFly does not have aout. When/if they implement a new
# versioning mechanism, adjust this.
@@ -5842,10 +5838,6 @@ _LT_EOF
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
;;
freebsd1*)
_LT_AC_TAGVAR(ld_shlibs, $1)=no
;;
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
# support. Future versions do this automatically, but an explicit c++rt0.o
# does not break anything, and helps significantly (at the cost of a little
+2 -2
View File
@@ -119,8 +119,8 @@ int zend_sprintf(char *buffer, const char *format, ...);
PHP_MAJOR_VERSION=5
PHP_MINOR_VERSION=4
PHP_RELEASE_VERSION=28
PHP_EXTRA_VERSION="-dev"
PHP_RELEASE_VERSION=32
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`
+6
View File
@@ -229,6 +229,9 @@ PHP_BZ2_API php_stream *_php_stream_bz2open(php_stream_wrapper *wrapper,
#endif
if (php_check_open_basedir(path_copy TSRMLS_CC)) {
#ifdef VIRTUAL_DIR
free(path_copy);
#endif
return NULL;
}
@@ -238,6 +241,9 @@ PHP_BZ2_API php_stream *_php_stream_bz2open(php_stream_wrapper *wrapper,
if (opened_path && bz_file) {
*opened_path = estrdup(path_copy);
}
#ifdef VIRTUAL_DIR
free(path_copy);
#endif
path_copy = NULL;
if (bz_file == NULL) {
+2 -2
View File
@@ -698,9 +698,9 @@ PHP_FUNCTION(com_event_sink)
/* 0 => typelibname, 1 => dispname */
zval **tmp;
if (zend_hash_index_find(Z_ARRVAL_P(sink), 0, (void**)&tmp) == SUCCESS)
if (zend_hash_index_find(Z_ARRVAL_P(sink), 0, (void**)&tmp) == SUCCESS && Z_TYPE_PP(tmp) == IS_STRING)
typelibname = Z_STRVAL_PP(tmp);
if (zend_hash_index_find(Z_ARRVAL_P(sink), 1, (void**)&tmp) == SUCCESS)
if (zend_hash_index_find(Z_ARRVAL_P(sink), 1, (void**)&tmp) == SUCCESS && Z_TYPE_PP(tmp) == IS_STRING)
dispname = Z_STRVAL_PP(tmp);
} else if (sink != NULL) {
convert_to_string(sink);
+6
View File
@@ -46,7 +46,13 @@ PHP_COM_DOTNET_API OLECHAR *php_com_string_to_olestring(char *string, uint strin
if (string_len > 0) {
olestring = (OLECHAR*)safe_emalloc(string_len, sizeof(OLECHAR), 0);
/* XXX if that's a real multibyte string, olestring is obviously allocated excessively.
This should be fixed by reallocating the olestring, but as emalloc is used, that doesn't
matter much. */
ok = MultiByteToWideChar(codepage, flags, string, string_len, olestring, string_len);
if (ok > 0 && ok < string_len) {
olestring[ok] = '\0';
}
} else {
ok = FALSE;
olestring = (OLECHAR*)emalloc(sizeof(OLECHAR));
+5 -1
View File
@@ -154,7 +154,11 @@ PHP_COM_DOTNET_API void php_com_variant_from_zval(VARIANT *v, zval *z, int codep
case IS_STRING:
V_VT(v) = VT_BSTR;
olestring = php_com_string_to_olestring(Z_STRVAL_P(z), Z_STRLEN_P(z), codepage TSRMLS_CC);
V_BSTR(v) = SysAllocStringByteLen((char*)olestring, Z_STRLEN_P(z) * sizeof(OLECHAR));
if (CP_UTF8 == codepage) {
V_BSTR(v) = SysAllocStringByteLen((char*)olestring, wcslen(olestring) * sizeof(OLECHAR));
} else {
V_BSTR(v) = SysAllocStringByteLen((char*)olestring, Z_STRLEN_P(z) * sizeof(OLECHAR));
}
efree(olestring);
break;
+42
View File
@@ -0,0 +1,42 @@
--TEST--
Bug #66431 Special Character via COM Interface (CP_UTF8), Scripting.FileSystemObject
--SKIPIF--
<?php
if (!extension_loaded("com_dotnet")){ echo "skip COM/.Net support not present"; }
?>
--FILE--
<?php
$text= "Xin chào cộng đồng PHP";
$fpath = str_replace("/", "\\", dirname(__FILE__) . "/bug66431.txt");
$fso = new COM("Scripting.FileSystemObject");
$fh = $fso->OpenTextFile($fpath, 2, true);
$fh->Write($text);
$fh->Close();
$check_text = file_get_contents($fpath);
$result = ($check_text == $text);
var_dump($result);
if (!$result) {
echo "Expected: '$check_text'\n";
echo "Have: '$text'\n";
}
?>
===DONE===
--CLEAN--
<?php
$fpath = str_replace("/", "\\", dirname(__FILE__) . "/bug66431.txt");
if (file_exists($fpath)) {
unlink($fpath);
}
?>
--EXPECT--
bool(true)
===DONE===
+60
View File
@@ -0,0 +1,60 @@
--TEST--
Bug #66431 Special Character via COM Interface (CP_UTF8), Application.Word
--SKIPIF--
<?php
if (!extension_loaded("com_dotnet")){ echo "skip COM/.Net support not present"; }
try {
new COM("word.application", NULL, CP_UTF8);
} catch (Exception $e) {
die('skip ' . $e->getMessage();
}
?>
--FILE--
<?php
$text= "Xin chào cộng đồng PHP";
$fpath = str_replace("/", "\\", dirname(__FILE__) . "/bug66431.docx");
com_load_typelib('Word.Application');
$Wrd = new COM("word.application", NULL, CP_UTF8);
$Wrd->Documents->Add();
$Wrd->Selection->TypeText($text);
$Wrd->ActiveDocument->SaveAs($fpath);
$Wrd->ActiveDocument->Close(false);
$Wrd->Application->Quit();
unset($Wrd);
$Wrd = new COM("word.application", NULL, CP_UTF8);
$Wrd->Documents->Open($fpath, NULL, false);
$check_text = $Wrd->ActiveDocument->Range($Wrd->ActiveDocument->Sentences(1)->Start, $Wrd->ActiveDocument->Sentences(1)->End)->Text;
$Wrd->ActiveDocument->Close(false);
$Wrd->Application->Quit();
unset($Wrd);
/* trim the returned text as we'll get windows eol from a word doc. */
$result = (trim($check_text) == $text);
var_dump($result);
if (!$result) {
echo "Expected: '$check_text'\n";
echo "Have: '$text'\n";
}
?>
===DONE===
--CLEAN--
<?php
$fpath = str_replace("/", "\\", dirname(__FILE__) . "/bug66431.docx");
if (file_exists($fpath)) {
unlink($fpath);
}
?>
--EXPECT--
bool(true)
===DONE===
+5 -3
View File
@@ -23,16 +23,18 @@ if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) exit("skip PHP_CURL_HTTP_R
$url = "{$host}/get.php?test=get";
$ch = curl_init();
$alldata = '';
ob_start(); // start output buffering
curl_setopt($ch, CURLOPT_URL, $url); //set the url we want to use
curl_setopt($ch, CURLOPT_WRITEFUNCTION, function ($ch, $data) {
echo 'Data: '.$data;
$GLOBALS['alldata'] .= $data;
return strlen ($data);
});
curl_exec($ch);
curl_close($ch);
ob_end_flush();
echo "Data: $alldata";
?>
===DONE===
--EXPECTF--
+12564 -12559
View File
File diff suppressed because it is too large. Load diff
+11 -4
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2013 The PHP Group |
| Copyright (c) 1997-2014 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -401,9 +401,12 @@ static timelib_sll timelib_meridian_with_check(char **ptr, timelib_sll h)
{
timelib_sll retval = 0;
while (!strchr("AaPp", **ptr)) {
while (**ptr && !strchr("AaPp", **ptr)) {
++*ptr;
}
if(!**ptr) {
return TIMELIB_UNSET;
}
if (**ptr == 'a' || **ptr == 'A') {
if (h == 12) {
retval = -12;
@@ -963,8 +966,8 @@ mssqltime = hour12 ":" minutelz ":" secondlz [:.] [0-9]+ meridian;
isoweekday = year4 "-"? "W" weekofyear "-"? [0-7];
isoweek = year4 "-"? "W" weekofyear;
exif = year4 ":" monthlz ":" daylz " " hour24lz ":" minutelz ":" secondlz;
firstdayof = 'first day of'?;
lastdayof = 'last day of'?;
firstdayof = 'first day of';
lastdayof = 'last day of';
backof = 'back of ' hour24 space? meridian?;
frontof = 'front of ' hour24 space? meridian?;
@@ -2131,6 +2134,10 @@ timelib_time *timelib_parse_from_format(char *format, char *string, int len, tim
break;
case '\\': /* escaped char */
if(!fptr[1]) {
add_pbf_error(s, "Escaped character expected", string, begin);
break;
}
fptr++;
if (*ptr == *fptr) {
++ptr;
+1 -1
View File
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2013 The PHP Group |
| Copyright (c) 1997-2014 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
+671 -635
View File
File diff suppressed because it is too large. Load diff
+7 -1
View File
@@ -50,7 +50,11 @@ static inline long long php_date_llabs( long long i ) { return i >= 0 ? i : -i;
int st = snprintf(s, len, "%lld", i); \
s[st] = '\0'; \
} while (0);
#ifdef HAVE_ATOLL
# define DATE_A64I(i, s) i = atoll(s)
#else
# define DATE_A64I(i, s) i = strtoll(s, NULL, 10)
#endif
#endif
/* {{{ arginfo */
@@ -2121,7 +2125,7 @@ static HashTable *date_object_get_properties(zval *object TSRMLS_DC)
/* first we add the date and time in ISO format */
MAKE_STD_ZVAL(zv);
ZVAL_STRING(zv, date_format("Y-m-d H:i:s", 12, dateobj->time, 1), 0);
ZVAL_STRING(zv, date_format("Y-m-d H:i:s.u", 14, dateobj->time, 1), 0);
zend_hash_update(props, "date", 5, &zv, sizeof(zv), NULL);
/* then we add the timezone name (or similar) */
@@ -2441,6 +2445,8 @@ PHPAPI int php_date_initialize(php_date_obj *dateobj, /*const*/ char *time_str,
err->error_messages[0].position, err->error_messages[0].character, err->error_messages[0].message);
}
if (err && err->error_count) {
timelib_time_dtor(dateobj->time);
dateobj->time = 0;
return 0;
}
+3 -3
View File
@@ -21,7 +21,7 @@ echo "Done\n";
--EXPECTF--
object(DateTime)#1 (3) {
["date"]=>
string(19) "2006-01-23 00:00:00"
string(26) "2006-01-23 00:00:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -34,7 +34,7 @@ bool(false)
string(19) "2006/01/23 00:00:00"
object(DateTime)#1 (3) {
["date"]=>
string(19) "2006-01-30 00:00:00"
string(26) "2006-01-30 00:00:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -43,7 +43,7 @@ object(DateTime)#1 (3) {
string(19) "2006/01/30 00:00:00"
object(DateTime)#1 (3) {
["date"]=>
string(19) "2007-12-10 00:00:00"
string(26) "2007-12-10 00:00:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
+3 -3
View File
@@ -21,7 +21,7 @@ echo "Done\n";
--EXPECTF--
object(DateTime)#%d (3) {
["date"]=>
string(19) "2006-12-12 00:00:00"
string(26) "2006-12-12 00:00:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -38,7 +38,7 @@ bool(false)
string(19) "2006.12.12 00:00:00"
object(DateTime)#1 (3) {
["date"]=>
string(19) "2006-02-15 00:00:00"
string(26) "2006-02-15 00:00:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -47,7 +47,7 @@ object(DateTime)#1 (3) {
string(19) "2006.02.15 00:00:00"
object(DateTime)#1 (3) {
["date"]=>
string(19) "2008-01-29 00:00:00"
string(26) "2008-01-29 00:00:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
+1 -1
View File
@@ -20,7 +20,7 @@ echo "Done\n";
--EXPECTF--
object(DateTime)#%d (3) {
["date"]=>
string(19) "2006-12-12 00:00:00"
string(26) "2006-12-12 00:00:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
+4 -4
View File
@@ -37,7 +37,7 @@ object(DateTimeExt1)#%d (5) {
["property2"]=>
string(5) "Hello"
["date"]=>
string(19) "2009-02-03 12:34:41"
string(26) "2009-02-03 12:34:41.000000"
["timezone_type"]=>
int(2)
["timezone"]=>
@@ -49,7 +49,7 @@ object(DateTimeExt1)#%d (5) {
["property2"]=>
string(5) "Hello"
["date"]=>
string(19) "2009-02-03 12:34:41"
string(26) "2009-02-03 12:34:41.000000"
["timezone_type"]=>
int(2)
["timezone"]=>
@@ -65,7 +65,7 @@ object(DateTimeExt2)#%d (7) {
["property2"]=>
string(5) "Hello"
["date"]=>
string(19) "2009-02-03 12:34:41"
string(26) "2009-02-03 12:34:41.000000"
["timezone_type"]=>
int(2)
["timezone"]=>
@@ -81,7 +81,7 @@ object(DateTimeExt2)#%d (7) {
["property2"]=>
string(5) "Hello"
["date"]=>
string(19) "2009-02-03 12:34:41"
string(26) "2009-02-03 12:34:41.000000"
["timezone_type"]=>
int(2)
["timezone"]=>
+5 -5
View File
@@ -32,7 +32,7 @@ var_dump($d2_clone);
-- Create a DateTime object --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-02-03 12:34:41"
string(26) "2009-02-03 12:34:41.000000"
["timezone_type"]=>
int(2)
["timezone"]=>
@@ -42,7 +42,7 @@ object(DateTime)#%d (3) {
-- Add some properties --
object(DateTime)#%d (5) {
["date"]=>
string(19) "2009-02-03 12:34:41"
string(26) "2009-02-03 12:34:41.000000"
["timezone_type"]=>
int(2)
["timezone"]=>
@@ -56,7 +56,7 @@ object(DateTime)#%d (5) {
-- clone it --
object(DateTime)#%d (5) {
["date"]=>
string(19) "2009-02-03 12:34:41"
string(26) "2009-02-03 12:34:41.000000"
["timezone_type"]=>
int(2)
["timezone"]=>
@@ -70,7 +70,7 @@ object(DateTime)#%d (5) {
-- Add some more properties --
object(DateTime)#%d (7) {
["date"]=>
string(19) "2009-02-03 12:34:41"
string(26) "2009-02-03 12:34:41.000000"
["timezone_type"]=>
int(2)
["timezone"]=>
@@ -88,7 +88,7 @@ object(DateTime)#%d (7) {
-- clone it --
object(DateTime)#%d (7) {
["date"]=>
string(19) "2009-02-03 12:34:41"
string(26) "2009-02-03 12:34:41.000000"
["timezone_type"]=>
int(2)
["timezone"]=>
@@ -41,7 +41,7 @@ object(DateTime)#%d (3) {
}
object(DateTime)#%d (3) {
["date"]=>
string(19) "2005-07-14 22:30:41"
string(26) "2005-07-14 22:30:41.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -49,7 +49,7 @@ object(DateTime)#%d (3) {
}
object(DateTime)#%d (3) {
["date"]=>
string(19) "2005-07-14 22:30:41"
string(26) "2005-07-14 22:30:41.000000"
["timezone_type"]=>
int(2)
["timezone"]=>
@@ -142,7 +142,7 @@ FAILED: DateTime::__construct(): Failed to parse time string (-12345) at positio
-- float 10.5 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "%s"
string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -150,7 +150,7 @@ object(DateTime)#%d (3) {
}
object(DateTime)#%d (3) {
["date"]=>
string(19) "%s"
string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -164,7 +164,7 @@ FAILED: DateTime::__construct(): Failed to parse time string (-10.5) at position
-- float .5 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "%s"
string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -172,7 +172,7 @@ object(DateTime)#%d (3) {
}
object(DateTime)#%d (3) {
["date"]=>
string(19) "%s"
string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -198,7 +198,7 @@ FAILED: DateTime::__construct() expects parameter 1 to be string, array given
-- uppercase NULL --
object(DateTime)#%d (3) {
["date"]=>
string(19) "%s"
string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -206,7 +206,7 @@ object(DateTime)#%d (3) {
}
object(DateTime)#%d (3) {
["date"]=>
string(19) "%s"
string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -216,7 +216,7 @@ object(DateTime)#%d (3) {
-- lowercase null --
object(DateTime)#%d (3) {
["date"]=>
string(19) "%s"
string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -224,7 +224,7 @@ object(DateTime)#%d (3) {
}
object(DateTime)#%d (3) {
["date"]=>
string(19) "%s"
string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -238,7 +238,7 @@ FAILED: DateTime::__construct(): Failed to parse time string (1) at position 0 (
-- lowercase false --
object(DateTime)#%d (3) {
["date"]=>
string(19) "%s"
string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -246,7 +246,7 @@ object(DateTime)#%d (3) {
}
object(DateTime)#%d (3) {
["date"]=>
string(19) "%s"
string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -260,7 +260,7 @@ FAILED: DateTime::__construct(): Failed to parse time string (1) at position 0 (
-- uppercase FALSE --
object(DateTime)#%d (3) {
["date"]=>
string(19) "%s"
string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -268,7 +268,7 @@ object(DateTime)#%d (3) {
}
object(DateTime)#%d (3) {
["date"]=>
string(19) "%s"
string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -278,7 +278,7 @@ object(DateTime)#%d (3) {
-- empty string DQ --
object(DateTime)#%d (3) {
["date"]=>
string(19) "%s"
string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -286,7 +286,7 @@ object(DateTime)#%d (3) {
}
object(DateTime)#%d (3) {
["date"]=>
string(19) "%s"
string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -296,7 +296,7 @@ object(DateTime)#%d (3) {
-- empty string SQ --
object(DateTime)#%d (3) {
["date"]=>
string(19) "%s"
string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -304,7 +304,7 @@ object(DateTime)#%d (3) {
}
object(DateTime)#%d (3) {
["date"]=>
string(19) "%s"
string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -338,7 +338,7 @@ FAILED: DateTime::__construct() expects parameter 1 to be string, object given
-- undefined var --
object(DateTime)#%d (3) {
["date"]=>
string(19) "%s"
string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -346,7 +346,7 @@ object(DateTime)#%d (3) {
}
object(DateTime)#%d (3) {
["date"]=>
string(19) "%s"
string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -356,7 +356,7 @@ object(DateTime)#%d (3) {
-- unset var --
object(DateTime)#%d (3) {
["date"]=>
string(19) "%s"
string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -364,7 +364,7 @@ object(DateTime)#%d (3) {
}
object(DateTime)#%d (3) {
["date"]=>
string(19) "%s"
string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -153,7 +153,7 @@ FAILED: DateTime::__construct() expects parameter 2 to be DateTimeZone, array gi
-- uppercase NULL --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2005-07-14 22:30:41"
string(26) "2005-07-14 22:30:41.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -163,7 +163,7 @@ object(DateTime)#%d (3) {
-- lowercase null --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2005-07-14 22:30:41"
string(26) "2005-07-14 22:30:41.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -209,7 +209,7 @@ FAILED: DateTime::__construct() expects parameter 2 to be DateTimeZone, object g
-- undefined var --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2005-07-14 22:30:41"
string(26) "2005-07-14 22:30:41.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -219,7 +219,7 @@ object(DateTime)#%d (3) {
-- unset var --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2005-07-14 22:30:41"
string(26) "2005-07-14 22:30:41.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -133,7 +133,7 @@ bool(false)
-- float 10.5 --
object(DateTime)#3 (3) {
["date"]=>
string(19) "2009-01-31 10:05:00"
string(26) "2009-01-31 10:05:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -148,7 +148,7 @@ bool(false)
-- float .5 --
object(DateTime)#3 (3) {
["date"]=>
string(19) "2009-01-31 00:05:00"
string(26) "2009-01-31 00:05:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
+4 -4
View File
@@ -20,20 +20,20 @@ var_dump( $date2->format( "F j, Y, g:i a") );
--EXPECTF--
object(DateTime)#%d (3) {
["date"]=>
string(19) "2005-07-14 22:30:41"
string(26) "2005-07-14 22:30:41.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
string(118) "O:8:"DateTime":3:{s:4:"date";s:19:"2005-07-14 22:30:41";s:13:"timezone_type";i:3;s:8:"timezone";s:13:"Europe/London";}"
string(125) "O:8:"DateTime":3:{s:4:"date";s:26:"2005-07-14 22:30:41.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:13:"Europe/London";}"
object(DateTime)#%d (3) {
["date"]=>
string(19) "2005-07-14 22:30:41"
string(26) "2005-07-14 22:30:41.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
string(23) "July 14, 2005, 10:30 pm"
===DONE===
===DONE===
+16 -16
View File
@@ -115,7 +115,7 @@ fclose( $file_handle );
-- int 0 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "0000-07-02 08:34:10"
string(26) "0000-07-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -125,7 +125,7 @@ object(DateTime)#%d (3) {
-- int 1 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "0001-07-02 08:34:10"
string(26) "0001-07-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -135,7 +135,7 @@ object(DateTime)#%d (3) {
-- int 12345 --
object(DateTime)#%d (3) {
["date"]=>
string(20) "12345-07-02 08:34:10"
string(27) "12345-07-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -145,7 +145,7 @@ object(DateTime)#%d (3) {
-- int -12345 --
object(DateTime)#%d (3) {
["date"]=>
string(21) "-12345-07-02 08:34:10"
string(28) "-12345-07-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -155,7 +155,7 @@ object(DateTime)#%d (3) {
-- float 10.5 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "0010-07-02 08:34:10"
string(26) "0010-07-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -165,7 +165,7 @@ object(DateTime)#%d (3) {
-- float -10.5 --
object(DateTime)#%d (3) {
["date"]=>
string(20) "-0010-07-02 08:34:10"
string(27) "-0010-07-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -175,7 +175,7 @@ object(DateTime)#%d (3) {
-- float .5 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "0000-07-02 08:34:10"
string(26) "0000-07-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -205,7 +205,7 @@ bool(false)
-- uppercase NULL --
object(DateTime)#%d (3) {
["date"]=>
string(19) "0000-07-02 08:34:10"
string(26) "0000-07-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -215,7 +215,7 @@ object(DateTime)#%d (3) {
-- lowercase null --
object(DateTime)#%d (3) {
["date"]=>
string(19) "0000-07-02 08:34:10"
string(26) "0000-07-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -225,7 +225,7 @@ object(DateTime)#%d (3) {
-- lowercase true --
object(DateTime)#%d (3) {
["date"]=>
string(19) "0001-07-02 08:34:10"
string(26) "0001-07-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -235,7 +235,7 @@ object(DateTime)#%d (3) {
-- lowercase false --
object(DateTime)#%d (3) {
["date"]=>
string(19) "0000-07-02 08:34:10"
string(26) "0000-07-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -245,7 +245,7 @@ object(DateTime)#%d (3) {
-- uppercase TRUE --
object(DateTime)#%d (3) {
["date"]=>
string(19) "0001-07-02 08:34:10"
string(26) "0001-07-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -255,7 +255,7 @@ object(DateTime)#%d (3) {
-- uppercase FALSE --
object(DateTime)#%d (3) {
["date"]=>
string(19) "0000-07-02 08:34:10"
string(26) "0000-07-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -305,7 +305,7 @@ bool(false)
-- undefined var --
object(DateTime)#%d (3) {
["date"]=>
string(19) "0000-07-02 08:34:10"
string(26) "0000-07-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -315,7 +315,7 @@ object(DateTime)#%d (3) {
-- unset var --
object(DateTime)#%d (3) {
["date"]=>
string(19) "0000-07-02 08:34:10"
string(26) "0000-07-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -326,4 +326,4 @@ object(DateTime)#%d (3) {
Warning: DateTime::setDate() expects parameter 1 to be long, resource given in %s on line %d
bool(false)
===DONE===
===DONE===
+15 -15
View File
@@ -115,7 +115,7 @@ fclose( $file_handle );
-- int 0 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1962-12-02 08:34:10"
string(26) "1962-12-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -125,7 +125,7 @@ object(DateTime)#%d (3) {
-- int 1 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1963-01-02 08:34:10"
string(26) "1963-01-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -135,7 +135,7 @@ object(DateTime)#%d (3) {
-- int 12345 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2991-09-02 08:34:10"
string(26) "2991-09-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -145,7 +145,7 @@ object(DateTime)#%d (3) {
-- int -12345 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "0934-03-02 08:34:10"
string(26) "0934-03-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -155,7 +155,7 @@ object(DateTime)#%d (3) {
-- float 10.5 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1963-10-02 08:34:10"
string(26) "1963-10-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -165,7 +165,7 @@ object(DateTime)#%d (3) {
-- float -10.5 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1962-02-02 08:34:10"
string(26) "1962-02-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -175,7 +175,7 @@ object(DateTime)#%d (3) {
-- float .5 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1962-12-02 08:34:10"
string(26) "1962-12-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -205,7 +205,7 @@ bool(false)
-- uppercase NULL --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1962-12-02 08:34:10"
string(26) "1962-12-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -215,7 +215,7 @@ object(DateTime)#%d (3) {
-- lowercase null --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1962-12-02 08:34:10"
string(26) "1962-12-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -225,7 +225,7 @@ object(DateTime)#%d (3) {
-- lowercase true --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1963-01-02 08:34:10"
string(26) "1963-01-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -235,7 +235,7 @@ object(DateTime)#%d (3) {
-- lowercase false --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1962-12-02 08:34:10"
string(26) "1962-12-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -245,7 +245,7 @@ object(DateTime)#%d (3) {
-- uppercase TRUE --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1963-01-02 08:34:10"
string(26) "1963-01-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -255,7 +255,7 @@ object(DateTime)#%d (3) {
-- uppercase FALSE --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1962-12-02 08:34:10"
string(26) "1962-12-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -305,7 +305,7 @@ bool(false)
-- undefined var --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1962-12-02 08:34:10"
string(26) "1962-12-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -315,7 +315,7 @@ object(DateTime)#%d (3) {
-- unset var --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1962-12-02 08:34:10"
string(26) "1962-12-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
+15 -15
View File
@@ -115,7 +115,7 @@ fclose( $file_handle );
-- int 0 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1963-06-30 08:34:10"
string(26) "1963-06-30 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -125,7 +125,7 @@ object(DateTime)#%d (3) {
-- int 1 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1963-07-01 08:34:10"
string(26) "1963-07-01 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -135,7 +135,7 @@ object(DateTime)#%d (3) {
-- int 12345 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1997-04-17 08:34:10"
string(26) "1997-04-17 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -145,7 +145,7 @@ object(DateTime)#%d (3) {
-- int -12345 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1929-09-11 08:34:10"
string(26) "1929-09-11 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -155,7 +155,7 @@ object(DateTime)#%d (3) {
-- float 10.5 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1963-07-10 08:34:10"
string(26) "1963-07-10 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -165,7 +165,7 @@ object(DateTime)#%d (3) {
-- float -10.5 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1963-06-20 08:34:10"
string(26) "1963-06-20 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -175,7 +175,7 @@ object(DateTime)#%d (3) {
-- float .5 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1963-06-30 08:34:10"
string(26) "1963-06-30 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -205,7 +205,7 @@ bool(false)
-- uppercase NULL --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1963-06-30 08:34:10"
string(26) "1963-06-30 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -215,7 +215,7 @@ object(DateTime)#%d (3) {
-- lowercase null --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1963-06-30 08:34:10"
string(26) "1963-06-30 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -225,7 +225,7 @@ object(DateTime)#%d (3) {
-- lowercase true --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1963-07-01 08:34:10"
string(26) "1963-07-01 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -235,7 +235,7 @@ object(DateTime)#%d (3) {
-- lowercase false --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1963-06-30 08:34:10"
string(26) "1963-06-30 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -245,7 +245,7 @@ object(DateTime)#%d (3) {
-- uppercase TRUE --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1963-07-01 08:34:10"
string(26) "1963-07-01 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -255,7 +255,7 @@ object(DateTime)#%d (3) {
-- uppercase FALSE --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1963-06-30 08:34:10"
string(26) "1963-06-30 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -305,7 +305,7 @@ bool(false)
-- undefined var --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1963-06-30 08:34:10"
string(26) "1963-06-30 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -315,7 +315,7 @@ object(DateTime)#%d (3) {
-- unset var --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1963-06-30 08:34:10"
string(26) "1963-06-30 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -115,7 +115,7 @@ fclose( $file_handle );
-- int 0 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "0000-02-15 08:34:10"
string(26) "0000-02-15 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -125,7 +125,7 @@ object(DateTime)#%d (3) {
-- int 1 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "0001-02-13 08:34:10"
string(26) "0001-02-13 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -135,7 +135,7 @@ object(DateTime)#%d (3) {
-- int 12345 --
object(DateTime)#%d (3) {
["date"]=>
string(20) "12345-02-13 08:34:10"
string(27) "12345-02-13 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -145,7 +145,7 @@ object(DateTime)#%d (3) {
-- int -12345 --
object(DateTime)#%d (3) {
["date"]=>
string(21) "-12345-02-15 08:34:10"
string(28) "-12345-02-15 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -155,7 +155,7 @@ object(DateTime)#%d (3) {
-- float 10.5 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "0010-02-16 08:34:10"
string(26) "0010-02-16 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -165,7 +165,7 @@ object(DateTime)#%d (3) {
-- float -10.5 --
object(DateTime)#%d (3) {
["date"]=>
string(20) "-0010-02-19 08:34:10"
string(27) "-0010-02-19 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -175,7 +175,7 @@ object(DateTime)#%d (3) {
-- float .5 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "0000-02-15 08:34:10"
string(26) "0000-02-15 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -205,7 +205,7 @@ bool(false)
-- uppercase NULL --
object(DateTime)#%d (3) {
["date"]=>
string(19) "0000-02-15 08:34:10"
string(26) "0000-02-15 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -215,7 +215,7 @@ object(DateTime)#%d (3) {
-- lowercase null --
object(DateTime)#%d (3) {
["date"]=>
string(19) "0000-02-15 08:34:10"
string(26) "0000-02-15 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -225,7 +225,7 @@ object(DateTime)#%d (3) {
-- lowercase true --
object(DateTime)#%d (3) {
["date"]=>
string(19) "0001-02-13 08:34:10"
string(26) "0001-02-13 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -235,7 +235,7 @@ object(DateTime)#%d (3) {
-- lowercase false --
object(DateTime)#%d (3) {
["date"]=>
string(19) "0000-02-15 08:34:10"
string(26) "0000-02-15 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -245,7 +245,7 @@ object(DateTime)#%d (3) {
-- uppercase TRUE --
object(DateTime)#%d (3) {
["date"]=>
string(19) "0001-02-13 08:34:10"
string(26) "0001-02-13 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -255,7 +255,7 @@ object(DateTime)#%d (3) {
-- uppercase FALSE --
object(DateTime)#%d (3) {
["date"]=>
string(19) "0000-02-15 08:34:10"
string(26) "0000-02-15 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -305,7 +305,7 @@ bool(false)
-- undefined var --
object(DateTime)#%d (3) {
["date"]=>
string(19) "0000-02-15 08:34:10"
string(26) "0000-02-15 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -315,7 +315,7 @@ object(DateTime)#%d (3) {
-- unset var --
object(DateTime)#%d (3) {
["date"]=>
string(19) "0000-02-15 08:34:10"
string(26) "0000-02-15 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -115,7 +115,7 @@ fclose( $file_handle );
-- int 0 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1962-12-25 08:34:10"
string(26) "1962-12-25 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -125,7 +125,7 @@ object(DateTime)#%d (3) {
-- int 1 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1963-01-01 08:34:10"
string(26) "1963-01-01 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -135,7 +135,7 @@ object(DateTime)#%d (3) {
-- int 12345 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2199-07-30 08:34:10"
string(26) "2199-07-30 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -145,7 +145,7 @@ object(DateTime)#%d (3) {
-- int -12345 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1726-05-21 08:34:10"
string(26) "1726-05-21 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -155,7 +155,7 @@ object(DateTime)#%d (3) {
-- float 10.5 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1963-03-05 08:34:10"
string(26) "1963-03-05 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -165,7 +165,7 @@ object(DateTime)#%d (3) {
-- float -10.5 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1962-10-16 08:34:10"
string(26) "1962-10-16 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -175,7 +175,7 @@ object(DateTime)#%d (3) {
-- float .5 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1962-12-25 08:34:10"
string(26) "1962-12-25 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -205,7 +205,7 @@ bool(false)
-- uppercase NULL --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1962-12-25 08:34:10"
string(26) "1962-12-25 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -215,7 +215,7 @@ object(DateTime)#%d (3) {
-- lowercase null --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1962-12-25 08:34:10"
string(26) "1962-12-25 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -225,7 +225,7 @@ object(DateTime)#%d (3) {
-- lowercase true --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1963-01-01 08:34:10"
string(26) "1963-01-01 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -235,7 +235,7 @@ object(DateTime)#%d (3) {
-- lowercase false --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1962-12-25 08:34:10"
string(26) "1962-12-25 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -245,7 +245,7 @@ object(DateTime)#%d (3) {
-- uppercase TRUE --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1963-01-01 08:34:10"
string(26) "1963-01-01 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -255,7 +255,7 @@ object(DateTime)#%d (3) {
-- uppercase FALSE --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1962-12-25 08:34:10"
string(26) "1962-12-25 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -305,7 +305,7 @@ bool(false)
-- undefined var --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1962-12-25 08:34:10"
string(26) "1962-12-25 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -315,7 +315,7 @@ object(DateTime)#%d (3) {
-- unset var --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1962-12-25 08:34:10"
string(26) "1962-12-25 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -115,7 +115,7 @@ fclose( $file_handle );
-- int 0 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1963-02-10 08:34:10"
string(26) "1963-02-10 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -125,7 +125,7 @@ object(DateTime)#%d (3) {
-- int 1 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1963-02-11 08:34:10"
string(26) "1963-02-11 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -135,7 +135,7 @@ object(DateTime)#%d (3) {
-- int 12345 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1996-11-28 08:34:10"
string(26) "1996-11-28 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -145,7 +145,7 @@ object(DateTime)#%d (3) {
-- int -12345 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1929-04-24 08:34:10"
string(26) "1929-04-24 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -155,7 +155,7 @@ object(DateTime)#%d (3) {
-- float 10.5 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1963-02-20 08:34:10"
string(26) "1963-02-20 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -165,7 +165,7 @@ object(DateTime)#%d (3) {
-- float -10.5 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1963-01-31 08:34:10"
string(26) "1963-01-31 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -175,7 +175,7 @@ object(DateTime)#%d (3) {
-- float .5 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1963-02-10 08:34:10"
string(26) "1963-02-10 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -205,7 +205,7 @@ bool(false)
-- uppercase NULL --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1963-02-10 08:34:10"
string(26) "1963-02-10 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -215,7 +215,7 @@ object(DateTime)#%d (3) {
-- lowercase null --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1963-02-10 08:34:10"
string(26) "1963-02-10 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -225,7 +225,7 @@ object(DateTime)#%d (3) {
-- lowercase true --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1963-02-11 08:34:10"
string(26) "1963-02-11 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -235,7 +235,7 @@ object(DateTime)#%d (3) {
-- lowercase false --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1963-02-10 08:34:10"
string(26) "1963-02-10 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -245,7 +245,7 @@ object(DateTime)#%d (3) {
-- uppercase TRUE --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1963-02-11 08:34:10"
string(26) "1963-02-11 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -255,7 +255,7 @@ object(DateTime)#%d (3) {
-- uppercase FALSE --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1963-02-10 08:34:10"
string(26) "1963-02-10 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -305,7 +305,7 @@ bool(false)
-- undefined var --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1963-02-10 08:34:10"
string(26) "1963-02-10 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -315,7 +315,7 @@ object(DateTime)#%d (3) {
-- unset var --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1963-02-10 08:34:10"
string(26) "1963-02-10 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
+15 -15
View File
@@ -115,7 +115,7 @@ fclose( $file_handle );
-- int 0 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 00:13:45"
string(26) "2009-01-31 00:13:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -125,7 +125,7 @@ object(DateTime)#%d (3) {
-- int 1 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 01:13:45"
string(26) "2009-01-31 01:13:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -135,7 +135,7 @@ object(DateTime)#%d (3) {
-- int 12345 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2010-06-29 09:13:45"
string(26) "2010-06-29 09:13:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -145,7 +145,7 @@ object(DateTime)#%d (3) {
-- int -12345 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-30 15:13:45"
string(26) "2009-01-30 15:13:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -155,7 +155,7 @@ object(DateTime)#%d (3) {
-- float 10.5 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-30 10:13:45"
string(26) "2009-01-30 10:13:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -165,7 +165,7 @@ object(DateTime)#%d (3) {
-- float -10.5 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-29 14:13:45"
string(26) "2009-01-29 14:13:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -175,7 +175,7 @@ object(DateTime)#%d (3) {
-- float .5 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-29 00:13:45"
string(26) "2009-01-29 00:13:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -205,7 +205,7 @@ bool(false)
-- uppercase NULL --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-29 00:13:45"
string(26) "2009-01-29 00:13:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -215,7 +215,7 @@ object(DateTime)#%d (3) {
-- lowercase null --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-29 00:13:45"
string(26) "2009-01-29 00:13:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -225,7 +225,7 @@ object(DateTime)#%d (3) {
-- lowercase true --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-29 01:13:45"
string(26) "2009-01-29 01:13:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -235,7 +235,7 @@ object(DateTime)#%d (3) {
-- lowercase false --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-29 00:13:45"
string(26) "2009-01-29 00:13:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -245,7 +245,7 @@ object(DateTime)#%d (3) {
-- uppercase TRUE --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-29 01:13:45"
string(26) "2009-01-29 01:13:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -255,7 +255,7 @@ object(DateTime)#%d (3) {
-- uppercase FALSE --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-29 00:13:45"
string(26) "2009-01-29 00:13:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -305,7 +305,7 @@ bool(false)
-- undefined var --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-29 00:13:45"
string(26) "2009-01-29 00:13:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -315,7 +315,7 @@ object(DateTime)#%d (3) {
-- unset var --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-29 00:13:45"
string(26) "2009-01-29 00:13:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
+15 -15
View File
@@ -115,7 +115,7 @@ fclose( $file_handle );
-- int 0 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 10:00:45"
string(26) "2009-01-31 10:00:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -125,7 +125,7 @@ object(DateTime)#%d (3) {
-- int 1 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 10:01:45"
string(26) "2009-01-31 10:01:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -135,7 +135,7 @@ object(DateTime)#%d (3) {
-- int 12345 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-02-08 23:45:45"
string(26) "2009-02-08 23:45:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -145,7 +145,7 @@ object(DateTime)#%d (3) {
-- int -12345 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-30 20:15:45"
string(26) "2009-01-30 20:15:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -155,7 +155,7 @@ object(DateTime)#%d (3) {
-- float 10.5 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-30 10:10:45"
string(26) "2009-01-30 10:10:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -165,7 +165,7 @@ object(DateTime)#%d (3) {
-- float -10.5 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-30 09:50:45"
string(26) "2009-01-30 09:50:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -175,7 +175,7 @@ object(DateTime)#%d (3) {
-- float .5 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-30 10:00:45"
string(26) "2009-01-30 10:00:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -205,7 +205,7 @@ bool(false)
-- uppercase NULL --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-30 10:00:45"
string(26) "2009-01-30 10:00:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -215,7 +215,7 @@ object(DateTime)#%d (3) {
-- lowercase null --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-30 10:00:45"
string(26) "2009-01-30 10:00:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -225,7 +225,7 @@ object(DateTime)#%d (3) {
-- lowercase true --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-30 10:01:45"
string(26) "2009-01-30 10:01:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -235,7 +235,7 @@ object(DateTime)#%d (3) {
-- lowercase false --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-30 10:00:45"
string(26) "2009-01-30 10:00:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -245,7 +245,7 @@ object(DateTime)#%d (3) {
-- uppercase TRUE --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-30 10:01:45"
string(26) "2009-01-30 10:01:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -255,7 +255,7 @@ object(DateTime)#%d (3) {
-- uppercase FALSE --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-30 10:00:45"
string(26) "2009-01-30 10:00:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -305,7 +305,7 @@ bool(false)
-- undefined var --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-30 10:00:45"
string(26) "2009-01-30 10:00:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -315,7 +315,7 @@ object(DateTime)#%d (3) {
-- unset var --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-30 10:00:45"
string(26) "2009-01-30 10:00:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
+15 -15
View File
@@ -115,7 +115,7 @@ fclose( $file_handle );
-- int 0 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 10:13:00"
string(26) "2009-01-31 10:13:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -125,7 +125,7 @@ object(DateTime)#%d (3) {
-- int 1 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 10:13:01"
string(26) "2009-01-31 10:13:01.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -135,7 +135,7 @@ object(DateTime)#%d (3) {
-- int 12345 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 13:38:45"
string(26) "2009-01-31 13:38:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -145,7 +145,7 @@ object(DateTime)#%d (3) {
-- int -12345 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 06:47:15"
string(26) "2009-01-31 06:47:15.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -155,7 +155,7 @@ object(DateTime)#%d (3) {
-- float 10.5 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 10:13:10"
string(26) "2009-01-31 10:13:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -165,7 +165,7 @@ object(DateTime)#%d (3) {
-- float -10.5 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 10:12:50"
string(26) "2009-01-31 10:12:50.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -175,7 +175,7 @@ object(DateTime)#%d (3) {
-- float .5 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 10:13:00"
string(26) "2009-01-31 10:13:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -205,7 +205,7 @@ bool(false)
-- uppercase NULL --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 10:13:00"
string(26) "2009-01-31 10:13:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -215,7 +215,7 @@ object(DateTime)#%d (3) {
-- lowercase null --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 10:13:00"
string(26) "2009-01-31 10:13:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -225,7 +225,7 @@ object(DateTime)#%d (3) {
-- lowercase true --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 10:13:01"
string(26) "2009-01-31 10:13:01.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -235,7 +235,7 @@ object(DateTime)#%d (3) {
-- lowercase false --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 10:13:00"
string(26) "2009-01-31 10:13:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -245,7 +245,7 @@ object(DateTime)#%d (3) {
-- uppercase TRUE --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 10:13:01"
string(26) "2009-01-31 10:13:01.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -255,7 +255,7 @@ object(DateTime)#%d (3) {
-- uppercase FALSE --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 10:13:00"
string(26) "2009-01-31 10:13:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -305,7 +305,7 @@ bool(false)
-- undefined var --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 10:13:00"
string(26) "2009-01-31 10:13:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -315,7 +315,7 @@ object(DateTime)#%d (3) {
-- unset var --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 10:13:00"
string(26) "2009-01-31 10:13:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
+1 -1
View File
@@ -46,7 +46,7 @@ array(12) {
int(-62169984000)
object(DateTime)#1 (3) {
["date"]=>
string(20) "-0001-11-30 00:00:00"
string(27) "-0001-11-30 00:00:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
+1 -1
View File
@@ -46,7 +46,7 @@ array(12) {
bool(false)
object(DateTime)#1 (3) {
["date"]=>
string(20) "-0001-11-30 00:00:00"
string(20) "-0001-11-30 00:00:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
+2 -2
View File
@@ -16,7 +16,7 @@ echo $d->format( 'U' ), "\n\n";
--EXPECT--
object(DateTime)#1 (3) {
["date"]=>
string(19) "1955-05-23 00:00:00"
string(26) "1955-05-23 00:00:00.000000"
["timezone_type"]=>
int(1)
["timezone"]=>
@@ -27,7 +27,7 @@ object(DateTime)#1 (3) {
object(DateTime)#1 (3) {
["date"]=>
string(19) "1955-05-22 23:00:00"
string(26) "1955-05-22 23:00:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
+4 -4
View File
@@ -46,7 +46,7 @@ string(6) "Y-m-d+"
string(19) "2001-11-29 13:20:01"
object(DateTime)#2 (3) {
["date"]=>
string(19) "2001-11-29 %d:%d:%d"
string(26) "2001-11-29 %d:%d:%d.%d"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -72,7 +72,7 @@ string(7) "Y-m-d +"
string(19) "2001-11-29 13:20:01"
object(DateTime)#3 (3) {
["date"]=>
string(19) "2001-11-29 %d:%d:%d"
string(26) "2001-11-29 %d:%d:%d.%d"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -98,7 +98,7 @@ string(6) "Y-m-d+"
string(10) "2001-11-29"
object(DateTime)#2 (3) {
["date"]=>
string(19) "2001-11-29 %d:%d:%d"
string(26) "2001-11-29 %d:%d:%d.%d"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -141,7 +141,7 @@ string(7) "Y-m-d +"
string(11) "2001-11-29 "
object(DateTime)#2 (3) {
["date"]=>
string(19) "2001-11-29 %d:%d:%d"
string(26) "2001-11-29 %d:%d:%d.%d"
["timezone_type"]=>
int(3)
["timezone"]=>
+2 -2
View File
@@ -117,7 +117,7 @@ object(DatePeriod)#6 (6) {
["start"]=>
object(DateTime)#4 (3) {
["date"]=>
string(19) "2003-01-02 08:00:00"
string(26) "2003-01-02 08:00:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -201,7 +201,7 @@ object(DatePeriod)#9 (6) {
["start"]=>
object(DateTime)#6 (3) {
["date"]=>
string(19) "2003-01-02 08:00:00"
string(26) "2003-01-02 08:00:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
+4 -4
View File
@@ -33,7 +33,7 @@ object(DatePeriod)#1 (6) {
["start"]=>
object(DateTime)#2 (3) {
["date"]=>
string(19) "2010-01-01 00:00:00"
string(26) "2010-01-01 00:00:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -42,7 +42,7 @@ object(DatePeriod)#1 (6) {
["current"]=>
object(DateTime)#4 (3) {
["date"]=>
string(19) "2010-01-04 00:00:00"
string(26) "2010-01-04 00:00:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -92,7 +92,7 @@ object(DatePeriod)#5 (6) {
["start"]=>
object(DateTime)#10 (3) {
["date"]=>
string(19) "2010-01-01 00:00:00"
string(26) "2010-01-01 00:00:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -101,7 +101,7 @@ object(DatePeriod)#5 (6) {
["current"]=>
object(DateTime)#7 (3) {
["date"]=>
string(19) "2010-01-04 00:00:00"
string(26) "2010-01-04 00:00:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
+1 -1
View File
@@ -10,7 +10,7 @@ print_r($date);
--EXPECTF--
DateTime Object
(
[date] => 2041-01-21 15:24:52
[date] => 2041-01-21 15:24:52.000000
[timezone_type] => 2
[timezone] => GMT
)
+2 -2
View File
@@ -12,7 +12,7 @@ var_dump($dt);
--EXPECT--
object(DateTime)#1 (3) {
["date"]=>
string(19) "2011-02-02 00:00:00"
string(26) "2011-02-02 00:00:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -20,7 +20,7 @@ object(DateTime)#1 (3) {
}
object(DateTime)#2 (3) {
["date"]=>
string(19) "1970-01-01 00:00:00"
string(26) "1970-01-01 00:00:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
+3 -3
View File
@@ -19,7 +19,7 @@ var_dump($dt);
--EXPECT--
object(DateTime)#2 (3) {
["date"]=>
string(19) "2011-01-01 00:00:00"
string(26) "2011-01-01 00:00:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -27,7 +27,7 @@ object(DateTime)#2 (3) {
}
object(DateTime)#2 (3) {
["date"]=>
string(19) "2011-01-02 00:00:00"
string(26) "2011-01-02 00:00:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -35,7 +35,7 @@ object(DateTime)#2 (3) {
}
object(DateTime)#3 (3) {
["date"]=>
string(19) "2010-12-31 00:00:00"
string(26) "2010-12-31 00:00:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
+1 -1
View File
@@ -14,7 +14,7 @@ var_dump($t);
string(10) "1278455908"
object(DateTime)#1 (3) {
["date"]=>
string(19) "2010-07-06 18:38:28"
string(26) "2010-07-06 18:38:28.000000"
["timezone_type"]=>
int(2)
["timezone"]=>
+27
View File
@@ -0,0 +1,27 @@
--TEST--
Bug #67118 crashes in DateTime when this used after failed __construct
--INI--
date.timezone=Europe/Berlin
--FILE--
<?php
class mydt extends datetime
{
public function __construct($time = 'now', $tz = NULL, $format = NULL)
{
if (!empty($tz) && !is_object($tz)) {
$tz = new DateTimeZone($tz);
}
try {
@parent::__construct($time, $tz);
} catch (Exception $e) {
echo "Bad date" . $this->format("Y") . "\n";
}
}
};
new mydt("Funktionsansvarig rådgivning och juridik", "UTC");
?>
--EXPECTF--
Warning: DateTime::format(): The DateTime object has not been correctly initialized by its constructor in %sbug67118.php on line %d
Bad date
+35
View File
@@ -0,0 +1,35 @@
--TEST--
Regression introduce in fix for Bug #67118
--INI--
date.timezone=Europe/Paris
--FILE--
<?php
class Foo extends DateTime {
public function __construct($time = null) {
$tz = new DateTimeZone('UTC');
try {
echo "First try\n";
parent::__construct($time, $tz);
return;
} catch (Exception $e) {
echo "Second try\n";
parent::__construct($time.'C', $tz);
}
}
}
$date = '12 Sep 2007 15:49:12 UT';
var_dump(new Foo($date));
?>
Done
--EXPECTF--
First try
Second try
object(Foo)#1 (3) {
["date"]=>
string(%d) "2007-09-12 15:49:%s"
["timezone_type"]=>
int(3)
["timezone"]=>
string(3) "UTC"
}
Done
+38
View File
@@ -0,0 +1,38 @@
--TEST--
Bug #67251 (date_parse_from_format out-of-bounds read)
--INI--
date.timezone=Europe/Berlin
--FILE--
<?php
var_dump(date_parse_from_format("\\","AAAABBBB"));
--EXPECT--
array(12) {
["year"]=>
bool(false)
["month"]=>
bool(false)
["day"]=>
bool(false)
["hour"]=>
bool(false)
["minute"]=>
bool(false)
["second"]=>
bool(false)
["fraction"]=>
bool(false)
["warning_count"]=>
int(0)
["warnings"]=>
array(0) {
}
["error_count"]=>
int(2)
["errors"]=>
array(1) {
[0]=>
string(13) "Trailing data"
}
["is_localtime"]=>
bool(false)
}
+44
View File
@@ -0,0 +1,44 @@
--TEST--
Bug #67253 (timelib_meridian_with_check out-of-bounds read)
--INI--
date.timezone=Europe/Berlin
--FILE--
<?php
$z = '';
var_dump(date_parse_from_format("aHa0", "0=G{$z}9UCNnF"));
--EXPECT--
array(12) {
["year"]=>
bool(false)
["month"]=>
bool(false)
["day"]=>
bool(false)
["hour"]=>
int(0)
["minute"]=>
int(0)
["second"]=>
int(0)
["fraction"]=>
bool(false)
["warning_count"]=>
int(0)
["warnings"]=>
array(0) {
}
["error_count"]=>
int(3)
["errors"]=>
array(3) {
[0]=>
string(51) "Meridian can only come after an hour has been found"
[1]=>
string(29) "A meridian could not be found"
[9]=>
string(12) "Data missing"
}
["is_localtime"]=>
bool(false)
}
+28
View File
@@ -0,0 +1,28 @@
--TEST--
Bug #67308 (Serialize of DateTime truncates fractions of second)
--INI--
date.timezone=America/Vancouver
--FILE--
<?php
// Ensure we can still unserialize the old style.
var_dump(unserialize('O:8:"DateTime":3:{s:4:"date";s:19:"2005-07-14 22:30:41";s:13:"timezone_type";i:3;s:8:"timezone";s:13:"Europe/London";}'));
// New style.
var_dump(unserialize('O:8:"DateTime":3:{s:4:"date";s:26:"2005-07-14 22:30:41.123456";s:13:"timezone_type";i:3;s:8:"timezone";s:13:"Europe/London";}'));
--EXPECTF--
object(DateTime)#%d (3) {
["date"]=>
string(26) "2005-07-14 22:30:41.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
object(DateTime)#%d (3) {
["date"]=>
string(26) "2005-07-14 22:30:41.123456"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
+5 -5
View File
@@ -46,7 +46,7 @@ Array
==
DateTime Object
(
[date] => 2004-06-08 00:00:00
[date] => 2004-06-08 00:00:00.000000
[timezone_type] => 3
[timezone] => UTC
)
@@ -67,7 +67,7 @@ Array
==
DateTime Object
(
[date] => 2004-06-08 00:00:00
[date] => 2004-06-08 00:00:00.000000
[timezone_type] => 3
[timezone] => UTC
)
@@ -88,7 +88,7 @@ Array
==
DateTime Object
(
[date] => 2004-06-08 00:00:00
[date] => 2004-06-08 00:00:00.000000
[timezone_type] => 3
[timezone] => UTC
)
@@ -109,7 +109,7 @@ Array
==
DateTime Object
(
[date] => 2004-06-08 00:00:00
[date] => 2004-06-08 00:00:00.000000
[timezone_type] => 3
[timezone] => UTC
)
@@ -129,7 +129,7 @@ Array
==
DateTime Object
(
[date] => 2004-06-08 00:00:00
[date] => 2004-06-08 00:00:00.000000
[timezone_type] => 3
[timezone] => UTC
)
+5 -5
View File
@@ -25,7 +25,7 @@ var_dump( date_create("2005-07-14 22:30:41 GMT") );
*** Testing date_create() : basic functionality ***
object(DateTime)#%d (3) {
["date"]=>
string(19) "%s"
string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -33,7 +33,7 @@ object(DateTime)#%d (3) {
}
object(DateTime)#%d (3) {
["date"]=>
string(19) "%s"
string(26) "%s"
["timezone_type"]=>
int(2)
["timezone"]=>
@@ -41,7 +41,7 @@ object(DateTime)#%d (3) {
}
object(DateTime)#%d (3) {
["date"]=>
string(19) "2005-07-14 22:30:41"
string(26) "2005-07-14 22:30:41.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -49,10 +49,10 @@ object(DateTime)#%d (3) {
}
object(DateTime)#%d (3) {
["date"]=>
string(19) "2005-07-14 22:30:41"
string(26) "2005-07-14 22:30:41.000000"
["timezone_type"]=>
int(2)
["timezone"]=>
string(3) "GMT"
}
===DONE===
===DONE===
+20 -20
View File
@@ -130,7 +130,7 @@ bool(false)
-- float 10.5 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "%s"
string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -138,7 +138,7 @@ object(DateTime)#%d (3) {
}
object(DateTime)#%d (3) {
["date"]=>
string(19) "%s"
string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -152,7 +152,7 @@ bool(false)
-- float .5 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "%s"
string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -160,7 +160,7 @@ object(DateTime)#%d (3) {
}
object(DateTime)#%d (3) {
["date"]=>
string(19) "%s"
string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -202,7 +202,7 @@ bool(false)
-- uppercase NULL --
object(DateTime)#%d (3) {
["date"]=>
string(19) "%s"
string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -210,7 +210,7 @@ object(DateTime)#%d (3) {
}
object(DateTime)#%d (3) {
["date"]=>
string(19) "%s"
string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -220,7 +220,7 @@ object(DateTime)#%d (3) {
-- lowercase null --
object(DateTime)#%d (3) {
["date"]=>
string(19) "%s"
string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -228,7 +228,7 @@ object(DateTime)#%d (3) {
}
object(DateTime)#%d (3) {
["date"]=>
string(19) "%s"
string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -242,7 +242,7 @@ bool(false)
-- lowercase false --
object(DateTime)#%d (3) {
["date"]=>
string(19) "%s"
string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -250,7 +250,7 @@ object(DateTime)#%d (3) {
}
object(DateTime)#%d (3) {
["date"]=>
string(19) "%s"
string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -264,7 +264,7 @@ bool(false)
-- uppercase FALSE --
object(DateTime)#%d (3) {
["date"]=>
string(19) "%s"
string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -272,7 +272,7 @@ object(DateTime)#%d (3) {
}
object(DateTime)#%d (3) {
["date"]=>
string(19) "%s"
string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -282,7 +282,7 @@ object(DateTime)#%d (3) {
-- empty string DQ --
object(DateTime)#%d (3) {
["date"]=>
string(19) "%s"
string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -290,7 +290,7 @@ object(DateTime)#%d (3) {
}
object(DateTime)#%d (3) {
["date"]=>
string(19) "%s"
string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -300,7 +300,7 @@ object(DateTime)#%d (3) {
-- empty string SQ --
object(DateTime)#%d (3) {
["date"]=>
string(19) "%s"
string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -308,7 +308,7 @@ object(DateTime)#%d (3) {
}
object(DateTime)#%d (3) {
["date"]=>
string(19) "%s"
string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -346,7 +346,7 @@ bool(false)
-- undefined var --
object(DateTime)#%d (3) {
["date"]=>
string(19) "%s"
string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -354,7 +354,7 @@ object(DateTime)#%d (3) {
}
object(DateTime)#%d (3) {
["date"]=>
string(19) "%s"
string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -364,7 +364,7 @@ object(DateTime)#%d (3) {
-- unset var --
object(DateTime)#%d (3) {
["date"]=>
string(19) "%s"
string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -372,7 +372,7 @@ object(DateTime)#%d (3) {
}
object(DateTime)#%d (3) {
["date"]=>
string(19) "%s"
string(26) "%s"
["timezone_type"]=>
int(3)
["timezone"]=>
+4 -4
View File
@@ -168,7 +168,7 @@ bool(false)
-- uppercase NULL --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2005-07-14 22:30:41"
string(26) "2005-07-14 22:30:41.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -178,7 +178,7 @@ object(DateTime)#%d (3) {
-- lowercase null --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2005-07-14 22:30:41"
string(26) "2005-07-14 22:30:41.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -248,7 +248,7 @@ bool(false)
-- undefined var --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2005-07-14 22:30:41"
string(26) "2005-07-14 22:30:41.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -258,7 +258,7 @@ object(DateTime)#%d (3) {
-- unset var --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2005-07-14 22:30:41"
string(26) "2005-07-14 22:30:41.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
+7 -7
View File
@@ -125,7 +125,7 @@ object(DateTime)#%d (3) {
-- int 1 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "0001-07-02 08:34:10"
string(26) "0001-07-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -135,7 +135,7 @@ object(DateTime)#%d (3) {
-- int 12345 --
object(DateTime)#%d (3) {
["date"]=>
string(20) "12345-07-02 08:34:10"
string(27) "12345-07-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -145,7 +145,7 @@ object(DateTime)#%d (3) {
-- int -12345 --
object(DateTime)#%d (3) {
["date"]=>
string(21) "-12345-07-02 08:34:10"
string(28) "-12345-07-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -155,7 +155,7 @@ object(DateTime)#%d (3) {
-- float 10.5 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "0010-07-02 08:34:10"
string(26) "0010-07-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -165,7 +165,7 @@ object(DateTime)#%d (3) {
-- float -10.5 --
object(DateTime)#%d (3) {
["date"]=>
string(20) "-0010-07-02 08:34:10"
string(27) "-0010-07-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -225,7 +225,7 @@ object(DateTime)#%d (3) {
-- lowercase true --
object(DateTime)#%d (3) {
["date"]=>
string(19) "0001-07-02 08:34:10"
string(26) "0001-07-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -245,7 +245,7 @@ object(DateTime)#%d (3) {
-- uppercase TRUE --
object(DateTime)#%d (3) {
["date"]=>
string(19) "0001-07-02 08:34:10"
string(26) "0001-07-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
+15 -15
View File
@@ -115,7 +115,7 @@ fclose( $file_handle );
-- int 0 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1962-12-02 08:34:10"
string(26) "1962-12-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -125,7 +125,7 @@ object(DateTime)#%d (3) {
-- int 1 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1963-01-02 08:34:10"
string(26) "1963-01-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -135,7 +135,7 @@ object(DateTime)#%d (3) {
-- int 12345 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2991-09-02 08:34:10"
string(26) "2991-09-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -145,7 +145,7 @@ object(DateTime)#%d (3) {
-- int -12345 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "0934-03-02 08:34:10"
string(26) "0934-03-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -155,7 +155,7 @@ object(DateTime)#%d (3) {
-- float 10.5 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1963-10-02 08:34:10"
string(26) "1963-10-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -165,7 +165,7 @@ object(DateTime)#%d (3) {
-- float -10.5 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1962-02-02 08:34:10"
string(26) "1962-02-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -175,7 +175,7 @@ object(DateTime)#%d (3) {
-- float .5 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1962-12-02 08:34:10"
string(26) "1962-12-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -205,7 +205,7 @@ bool(false)
-- uppercase NULL --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1962-12-02 08:34:10"
string(26) "1962-12-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -215,7 +215,7 @@ object(DateTime)#%d (3) {
-- lowercase null --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1962-12-02 08:34:10"
string(26) "1962-12-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -225,7 +225,7 @@ object(DateTime)#%d (3) {
-- lowercase true --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1963-01-02 08:34:10"
string(26) "1963-01-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -235,7 +235,7 @@ object(DateTime)#%d (3) {
-- lowercase false --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1962-12-02 08:34:10"
string(26) "1962-12-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -245,7 +245,7 @@ object(DateTime)#%d (3) {
-- uppercase TRUE --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1963-01-02 08:34:10"
string(26) "1963-01-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -255,7 +255,7 @@ object(DateTime)#%d (3) {
-- uppercase FALSE --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1962-12-02 08:34:10"
string(26) "1962-12-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -305,7 +305,7 @@ bool(false)
-- undefined var --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1962-12-02 08:34:10"
string(26) "1962-12-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -315,7 +315,7 @@ object(DateTime)#%d (3) {
-- unset var --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1962-12-02 08:34:10"
string(26) "1962-12-02 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
+15 -15
View File
@@ -115,7 +115,7 @@ fclose( $file_handle );
-- int 0 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1963-06-30 08:34:10"
string(26) "1963-06-30 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -125,7 +125,7 @@ object(DateTime)#%d (3) {
-- int 1 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1963-07-01 08:34:10"
string(26) "1963-07-01 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -135,7 +135,7 @@ object(DateTime)#%d (3) {
-- int 12345 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1997-04-17 08:34:10"
string(26) "1997-04-17 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -145,7 +145,7 @@ object(DateTime)#%d (3) {
-- int -12345 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1929-09-11 08:34:10"
string(26) "1929-09-11 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -155,7 +155,7 @@ object(DateTime)#%d (3) {
-- float 10.5 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1963-07-10 08:34:10"
string(26) "1963-07-10 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -165,7 +165,7 @@ object(DateTime)#%d (3) {
-- float -10.5 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1963-06-20 08:34:10"
string(26) "1963-06-20 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -175,7 +175,7 @@ object(DateTime)#%d (3) {
-- float .5 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1963-06-30 08:34:10"
string(26) "1963-06-30 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -205,7 +205,7 @@ bool(false)
-- uppercase NULL --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1963-06-30 08:34:10"
string(26) "1963-06-30 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -215,7 +215,7 @@ object(DateTime)#%d (3) {
-- lowercase null --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1963-06-30 08:34:10"
string(26) "1963-06-30 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -225,7 +225,7 @@ object(DateTime)#%d (3) {
-- lowercase true --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1963-07-01 08:34:10"
string(26) "1963-07-01 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -235,7 +235,7 @@ object(DateTime)#%d (3) {
-- lowercase false --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1963-06-30 08:34:10"
string(26) "1963-06-30 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -245,7 +245,7 @@ object(DateTime)#%d (3) {
-- uppercase TRUE --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1963-07-01 08:34:10"
string(26) "1963-07-01 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -255,7 +255,7 @@ object(DateTime)#%d (3) {
-- uppercase FALSE --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1963-06-30 08:34:10"
string(26) "1963-06-30 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -305,7 +305,7 @@ bool(false)
-- undefined var --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1963-06-30 08:34:10"
string(26) "1963-06-30 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -315,7 +315,7 @@ object(DateTime)#%d (3) {
-- unset var --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1963-06-30 08:34:10"
string(26) "1963-06-30 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
+2 -2
View File
@@ -14,7 +14,7 @@ var_dump($int);
--EXPECT--
object(DateTime)#1 (3) {
["date"]=>
string(19) "2010-10-04 02:18:48"
string(26) "2010-10-04 02:18:48.000000"
["timezone_type"]=>
int(2)
["timezone"]=>
@@ -22,7 +22,7 @@ object(DateTime)#1 (3) {
}
object(DateTime)#2 (3) {
["date"]=>
string(19) "2010-11-06 18:38:28"
string(26) "2010-11-06 18:38:28.000000"
["timezone_type"]=>
int(2)
["timezone"]=>
+15 -15
View File
@@ -115,7 +115,7 @@ fclose( $file_handle );
-- int 0 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "0000-02-15 08:34:10"
string(26) "0000-02-15 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -125,7 +125,7 @@ object(DateTime)#%d (3) {
-- int 1 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "0001-02-13 08:34:10"
string(26) "0001-02-13 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -135,7 +135,7 @@ object(DateTime)#%d (3) {
-- int 12345 --
object(DateTime)#%d (3) {
["date"]=>
string(20) "12345-02-13 08:34:10"
string(27) "12345-02-13 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -145,7 +145,7 @@ object(DateTime)#%d (3) {
-- int -12345 --
object(DateTime)#%d (3) {
["date"]=>
string(21) "-12345-02-15 08:34:10"
string(28) "-12345-02-15 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -155,7 +155,7 @@ object(DateTime)#%d (3) {
-- float 10.5 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "0010-02-16 08:34:10"
string(26) "0010-02-16 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -165,7 +165,7 @@ object(DateTime)#%d (3) {
-- float -10.5 --
object(DateTime)#%d (3) {
["date"]=>
string(20) "-0010-02-19 08:34:10"
string(27) "-0010-02-19 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -175,7 +175,7 @@ object(DateTime)#%d (3) {
-- float .5 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "0000-02-15 08:34:10"
string(26) "0000-02-15 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -205,7 +205,7 @@ bool(false)
-- uppercase NULL --
object(DateTime)#%d (3) {
["date"]=>
string(19) "0000-02-15 08:34:10"
string(26) "0000-02-15 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -215,7 +215,7 @@ object(DateTime)#%d (3) {
-- lowercase null --
object(DateTime)#%d (3) {
["date"]=>
string(19) "0000-02-15 08:34:10"
string(26) "0000-02-15 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -225,7 +225,7 @@ object(DateTime)#%d (3) {
-- lowercase true --
object(DateTime)#%d (3) {
["date"]=>
string(19) "0001-02-13 08:34:10"
string(26) "0001-02-13 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -235,7 +235,7 @@ object(DateTime)#%d (3) {
-- lowercase false --
object(DateTime)#%d (3) {
["date"]=>
string(19) "0000-02-15 08:34:10"
string(26) "0000-02-15 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -245,7 +245,7 @@ object(DateTime)#%d (3) {
-- uppercase TRUE --
object(DateTime)#%d (3) {
["date"]=>
string(19) "0001-02-13 08:34:10"
string(26) "0001-02-13 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -255,7 +255,7 @@ object(DateTime)#%d (3) {
-- uppercase FALSE --
object(DateTime)#%d (3) {
["date"]=>
string(19) "0000-02-15 08:34:10"
string(26) "0000-02-15 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -305,7 +305,7 @@ bool(false)
-- undefined var --
object(DateTime)#%d (3) {
["date"]=>
string(19) "0000-02-15 08:34:10"
string(26) "0000-02-15 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -315,7 +315,7 @@ object(DateTime)#%d (3) {
-- unset var --
object(DateTime)#%d (3) {
["date"]=>
string(19) "0000-02-15 08:34:10"
string(26) "0000-02-15 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
+15 -15
View File
@@ -115,7 +115,7 @@ fclose( $file_handle );
-- int 0 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1962-12-25 08:34:10"
string(26) "1962-12-25 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -125,7 +125,7 @@ object(DateTime)#%d (3) {
-- int 1 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1963-01-01 08:34:10"
string(26) "1963-01-01 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -135,7 +135,7 @@ object(DateTime)#%d (3) {
-- int 12345 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2199-07-30 08:34:10"
string(26) "2199-07-30 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -145,7 +145,7 @@ object(DateTime)#%d (3) {
-- int -12345 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1726-05-21 08:34:10"
string(26) "1726-05-21 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -155,7 +155,7 @@ object(DateTime)#%d (3) {
-- float 10.5 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1963-03-05 08:34:10"
string(26) "1963-03-05 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -165,7 +165,7 @@ object(DateTime)#%d (3) {
-- float -10.5 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1962-10-16 08:34:10"
string(26) "1962-10-16 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -175,7 +175,7 @@ object(DateTime)#%d (3) {
-- float .5 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1962-12-25 08:34:10"
string(26) "1962-12-25 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -205,7 +205,7 @@ bool(false)
-- uppercase NULL --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1962-12-25 08:34:10"
string(26) "1962-12-25 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -215,7 +215,7 @@ object(DateTime)#%d (3) {
-- lowercase null --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1962-12-25 08:34:10"
string(26) "1962-12-25 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -225,7 +225,7 @@ object(DateTime)#%d (3) {
-- lowercase true --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1963-01-01 08:34:10"
string(26) "1963-01-01 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -235,7 +235,7 @@ object(DateTime)#%d (3) {
-- lowercase false --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1962-12-25 08:34:10"
string(26) "1962-12-25 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -245,7 +245,7 @@ object(DateTime)#%d (3) {
-- uppercase TRUE --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1963-01-01 08:34:10"
string(26) "1963-01-01 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -255,7 +255,7 @@ object(DateTime)#%d (3) {
-- uppercase FALSE --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1962-12-25 08:34:10"
string(26) "1962-12-25 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -305,7 +305,7 @@ bool(false)
-- undefined var --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1962-12-25 08:34:10"
string(26) "1962-12-25 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -315,7 +315,7 @@ object(DateTime)#%d (3) {
-- unset var --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1962-12-25 08:34:10"
string(26) "1962-12-25 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
+15 -15
View File
@@ -115,7 +115,7 @@ fclose( $file_handle );
-- int 0 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1963-02-10 08:34:10"
string(26) "1963-02-10 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -125,7 +125,7 @@ object(DateTime)#%d (3) {
-- int 1 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1963-02-11 08:34:10"
string(26) "1963-02-11 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -135,7 +135,7 @@ object(DateTime)#%d (3) {
-- int 12345 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1996-11-28 08:34:10"
string(26) "1996-11-28 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -145,7 +145,7 @@ object(DateTime)#%d (3) {
-- int -12345 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1929-04-24 08:34:10"
string(26) "1929-04-24 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -155,7 +155,7 @@ object(DateTime)#%d (3) {
-- float 10.5 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1963-02-20 08:34:10"
string(26) "1963-02-20 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -165,7 +165,7 @@ object(DateTime)#%d (3) {
-- float -10.5 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1963-01-31 08:34:10"
string(26) "1963-01-31 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -175,7 +175,7 @@ object(DateTime)#%d (3) {
-- float .5 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1963-02-10 08:34:10"
string(26) "1963-02-10 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -205,7 +205,7 @@ bool(false)
-- uppercase NULL --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1963-02-10 08:34:10"
string(26) "1963-02-10 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -215,7 +215,7 @@ object(DateTime)#%d (3) {
-- lowercase null --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1963-02-10 08:34:10"
string(26) "1963-02-10 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -225,7 +225,7 @@ object(DateTime)#%d (3) {
-- lowercase true --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1963-02-11 08:34:10"
string(26) "1963-02-11 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -235,7 +235,7 @@ object(DateTime)#%d (3) {
-- lowercase false --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1963-02-10 08:34:10"
string(26) "1963-02-10 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -245,7 +245,7 @@ object(DateTime)#%d (3) {
-- uppercase TRUE --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1963-02-11 08:34:10"
string(26) "1963-02-11 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -255,7 +255,7 @@ object(DateTime)#%d (3) {
-- uppercase FALSE --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1963-02-10 08:34:10"
string(26) "1963-02-10 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -305,7 +305,7 @@ bool(false)
-- undefined var --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1963-02-10 08:34:10"
string(26) "1963-02-10 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -315,7 +315,7 @@ object(DateTime)#%d (3) {
-- unset var --
object(DateTime)#%d (3) {
["date"]=>
string(19) "1963-02-10 08:34:10"
string(26) "1963-02-10 08:34:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
+2 -2
View File
@@ -133,7 +133,7 @@ bool(false)
-- float 10.5 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 10:05:00"
string(26) "2009-01-31 10:05:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -148,7 +148,7 @@ bool(false)
-- float .5 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 00:05:00"
string(26) "2009-01-31 00:05:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
+15 -15
View File
@@ -115,7 +115,7 @@ fclose( $file_handle );
-- int 0 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 00:13:45"
string(26) "2009-01-31 00:13:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -125,7 +125,7 @@ object(DateTime)#%d (3) {
-- int 1 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 01:13:45"
string(26) "2009-01-31 01:13:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -135,7 +135,7 @@ object(DateTime)#%d (3) {
-- int 12345 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2010-06-29 09:13:45"
string(26) "2010-06-29 09:13:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -145,7 +145,7 @@ object(DateTime)#%d (3) {
-- int -12345 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-30 15:13:45"
string(26) "2009-01-30 15:13:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -155,7 +155,7 @@ object(DateTime)#%d (3) {
-- float 10.5 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-30 10:13:45"
string(26) "2009-01-30 10:13:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -165,7 +165,7 @@ object(DateTime)#%d (3) {
-- float -10.5 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-29 14:13:45"
string(26) "2009-01-29 14:13:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -175,7 +175,7 @@ object(DateTime)#%d (3) {
-- float .5 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-29 00:13:45"
string(26) "2009-01-29 00:13:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -205,7 +205,7 @@ bool(false)
-- uppercase NULL --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-29 00:13:45"
string(26) "2009-01-29 00:13:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -215,7 +215,7 @@ object(DateTime)#%d (3) {
-- lowercase null --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-29 00:13:45"
string(26) "2009-01-29 00:13:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -225,7 +225,7 @@ object(DateTime)#%d (3) {
-- lowercase true --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-29 01:13:45"
string(26) "2009-01-29 01:13:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -235,7 +235,7 @@ object(DateTime)#%d (3) {
-- lowercase false --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-29 00:13:45"
string(26) "2009-01-29 00:13:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -245,7 +245,7 @@ object(DateTime)#%d (3) {
-- uppercase TRUE --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-29 01:13:45"
string(26) "2009-01-29 01:13:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -255,7 +255,7 @@ object(DateTime)#%d (3) {
-- uppercase FALSE --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-29 00:13:45"
string(26) "2009-01-29 00:13:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -305,7 +305,7 @@ bool(false)
-- undefined var --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-29 00:13:45"
string(26) "2009-01-29 00:13:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -315,7 +315,7 @@ object(DateTime)#%d (3) {
-- unset var --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-29 00:13:45"
string(26) "2009-01-29 00:13:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
+16 -16
View File
@@ -115,7 +115,7 @@ fclose( $file_handle );
-- int 0 --
object(DateTime)#3 (3) {
["date"]=>
string(19) "2009-01-31 10:00:45"
string(26) "2009-01-31 10:00:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -125,7 +125,7 @@ object(DateTime)#3 (3) {
-- int 1 --
object(DateTime)#3 (3) {
["date"]=>
string(19) "2009-01-31 10:01:45"
string(26) "2009-01-31 10:01:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -135,7 +135,7 @@ object(DateTime)#3 (3) {
-- int 12345 --
object(DateTime)#3 (3) {
["date"]=>
string(19) "2009-02-08 23:45:45"
string(26) "2009-02-08 23:45:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -145,7 +145,7 @@ object(DateTime)#3 (3) {
-- int -12345 --
object(DateTime)#3 (3) {
["date"]=>
string(19) "2009-01-30 20:15:45"
string(26) "2009-01-30 20:15:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -155,7 +155,7 @@ object(DateTime)#3 (3) {
-- float 10.5 --
object(DateTime)#3 (3) {
["date"]=>
string(19) "2009-01-30 10:10:45"
string(26) "2009-01-30 10:10:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -165,7 +165,7 @@ object(DateTime)#3 (3) {
-- float -10.5 --
object(DateTime)#3 (3) {
["date"]=>
string(19) "2009-01-30 09:50:45"
string(26) "2009-01-30 09:50:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -175,7 +175,7 @@ object(DateTime)#3 (3) {
-- float .5 --
object(DateTime)#3 (3) {
["date"]=>
string(19) "2009-01-30 10:00:45"
string(26) "2009-01-30 10:00:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -205,7 +205,7 @@ bool(false)
-- uppercase NULL --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-30 10:00:45"
string(26) "2009-01-30 10:00:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -215,7 +215,7 @@ object(DateTime)#%d (3) {
-- lowercase null --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-30 10:00:45"
string(26) "2009-01-30 10:00:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -225,7 +225,7 @@ object(DateTime)#%d (3) {
-- lowercase true --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-30 10:01:45"
string(26) "2009-01-30 10:01:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -235,7 +235,7 @@ object(DateTime)#%d (3) {
-- lowercase false --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-30 10:00:45"
string(26) "2009-01-30 10:00:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -245,7 +245,7 @@ object(DateTime)#%d (3) {
-- uppercase TRUE --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-30 10:01:45"
string(26) "2009-01-30 10:01:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -255,7 +255,7 @@ object(DateTime)#%d (3) {
-- uppercase FALSE --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-30 10:00:45"
string(26) "2009-01-30 10:00:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -305,7 +305,7 @@ bool(false)
-- undefined var --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-30 10:00:45"
string(26) "2009-01-30 10:00:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -315,7 +315,7 @@ object(DateTime)#%d (3) {
-- unset var --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-30 10:00:45"
string(26) "2009-01-30 10:00:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -326,4 +326,4 @@ object(DateTime)#%d (3) {
Warning: date_time_set() expects parameter 3 to be long, resource given in %s on line %d
bool(false)
===DONE===
===DONE===
+15 -15
View File
@@ -115,7 +115,7 @@ fclose( $file_handle );
-- int 0 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 10:13:00"
string(26) "2009-01-31 10:13:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -125,7 +125,7 @@ object(DateTime)#%d (3) {
-- int 1 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 10:13:01"
string(26) "2009-01-31 10:13:01.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -135,7 +135,7 @@ object(DateTime)#%d (3) {
-- int 12345 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 13:38:45"
string(26) "2009-01-31 13:38:45.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -145,7 +145,7 @@ object(DateTime)#%d (3) {
-- int -12345 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 06:47:15"
string(26) "2009-01-31 06:47:15.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -155,7 +155,7 @@ object(DateTime)#%d (3) {
-- float 10.5 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 10:13:10"
string(26) "2009-01-31 10:13:10.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -165,7 +165,7 @@ object(DateTime)#%d (3) {
-- float -10.5 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 10:12:50"
string(26) "2009-01-31 10:12:50.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -175,7 +175,7 @@ object(DateTime)#%d (3) {
-- float .5 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 10:13:00"
string(26) "2009-01-31 10:13:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -205,7 +205,7 @@ bool(false)
-- uppercase NULL --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 10:13:00"
string(26) "2009-01-31 10:13:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -215,7 +215,7 @@ object(DateTime)#%d (3) {
-- lowercase null --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 10:13:00"
string(26) "2009-01-31 10:13:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -225,7 +225,7 @@ object(DateTime)#%d (3) {
-- lowercase true --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 10:13:01"
string(26) "2009-01-31 10:13:01.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -235,7 +235,7 @@ object(DateTime)#%d (3) {
-- lowercase false --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 10:13:00"
string(26) "2009-01-31 10:13:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -245,7 +245,7 @@ object(DateTime)#%d (3) {
-- uppercase TRUE --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 10:13:01"
string(26) "2009-01-31 10:13:01.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -255,7 +255,7 @@ object(DateTime)#%d (3) {
-- uppercase FALSE --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 10:13:00"
string(26) "2009-01-31 10:13:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -305,7 +305,7 @@ bool(false)
-- undefined var --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 10:13:00"
string(26) "2009-01-31 10:13:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
@@ -315,7 +315,7 @@ object(DateTime)#%d (3) {
-- unset var --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 10:13:00"
string(26) "2009-01-31 10:13:00.000000"
["timezone_type"]=>
int(3)
["timezone"]=>
+11 -11
View File
@@ -25,7 +25,7 @@ string(13) "Y-m-d\TH:i:sP"
string(25) "2008-07-08T22:14:12+02:00"
object(DateTime)#2 (3) {
["date"]=>
string(19) "2008-07-08 22:14:12"
string(26) "2008-07-08 22:14:12.000000"
["timezone_type"]=>
int(1)
["timezone"]=>
@@ -36,7 +36,7 @@ string(16) "l, d-M-Y H:i:s T"
string(38) "Tuesday, 08-Jul-2008 22:14:12 GMT+0200"
object(DateTime)#1 (3) {
["date"]=>
string(19) "2008-07-08 22:14:12"
string(26) "2008-07-08 22:14:12.000000"
["timezone_type"]=>
int(1)
["timezone"]=>
@@ -47,7 +47,7 @@ string(13) "Y-m-d\TH:i:sO"
string(24) "2008-07-08T22:14:12+0200"
object(DateTime)#3 (3) {
["date"]=>
string(19) "2008-07-08 22:14:12"
string(26) "2008-07-08 22:14:12.000000"
["timezone_type"]=>
int(1)
["timezone"]=>
@@ -58,7 +58,7 @@ string(16) "D, d M y H:i:s O"
string(29) "Tue, 08 Jul 08 22:14:12 +0200"
object(DateTime)#2 (3) {
["date"]=>
string(19) "2008-07-08 22:14:12"
string(26) "2008-07-08 22:14:12.000000"
["timezone_type"]=>
int(1)
["timezone"]=>
@@ -69,7 +69,7 @@ string(16) "l, d-M-y H:i:s T"
string(36) "Tuesday, 08-Jul-08 22:14:12 GMT+0200"
object(DateTime)#1 (3) {
["date"]=>
string(19) "2008-07-08 22:14:12"
string(26) "2008-07-08 22:14:12.000000"
["timezone_type"]=>
int(1)
["timezone"]=>
@@ -80,7 +80,7 @@ string(16) "D, d M y H:i:s O"
string(29) "Tue, 08 Jul 08 22:14:12 +0200"
object(DateTime)#3 (3) {
["date"]=>
string(19) "2008-07-08 22:14:12"
string(26) "2008-07-08 22:14:12.000000"
["timezone_type"]=>
int(1)
["timezone"]=>
@@ -91,7 +91,7 @@ string(16) "D, d M Y H:i:s O"
string(31) "Tue, 08 Jul 2008 22:14:12 +0200"
object(DateTime)#2 (3) {
["date"]=>
string(19) "2008-07-08 22:14:12"
string(26) "2008-07-08 22:14:12.000000"
["timezone_type"]=>
int(1)
["timezone"]=>
@@ -102,7 +102,7 @@ string(16) "D, d M Y H:i:s O"
string(31) "Tue, 08 Jul 2008 22:14:12 +0200"
object(DateTime)#1 (3) {
["date"]=>
string(19) "2008-07-08 22:14:12"
string(26) "2008-07-08 22:14:12.000000"
["timezone_type"]=>
int(1)
["timezone"]=>
@@ -113,7 +113,7 @@ string(13) "Y-m-d\TH:i:sP"
string(25) "2008-07-08T22:14:12+02:00"
object(DateTime)#3 (3) {
["date"]=>
string(19) "2008-07-08 22:14:12"
string(26) "2008-07-08 22:14:12.000000"
["timezone_type"]=>
int(1)
["timezone"]=>
@@ -124,7 +124,7 @@ string(16) "D, d M Y H:i:s O"
string(31) "Tue, 08 Jul 2008 22:14:12 +0200"
object(DateTime)#2 (3) {
["date"]=>
string(19) "2008-07-08 22:14:12"
string(26) "2008-07-08 22:14:12.000000"
["timezone_type"]=>
int(1)
["timezone"]=>
@@ -135,7 +135,7 @@ string(13) "Y-m-d\TH:i:sP"
string(25) "2008-07-08T22:14:12+02:00"
object(DateTime)#1 (3) {
["date"]=>
string(19) "2008-07-08 22:14:12"
string(26) "2008-07-08 22:14:12.000000"
["timezone_type"]=>
int(1)
["timezone"]=>
+25 -11
View File
@@ -188,8 +188,7 @@ int dom_documenttype_internal_subset_read(dom_object *obj, zval **retval TSRMLS_
{
xmlDtdPtr dtdptr;
xmlDtd *intsubset;
xmlOutputBuffer *buff = NULL;
xmlDtdPtr intsubset;
dtdptr = (xmlDtdPtr) dom_object_get_node(obj);
@@ -200,22 +199,37 @@ int dom_documenttype_internal_subset_read(dom_object *obj, zval **retval TSRMLS_
ALLOC_ZVAL(*retval);
if (dtdptr->doc != NULL && ((intsubset = dtdptr->doc->intSubset) != NULL)) {
buff = xmlAllocOutputBuffer(NULL);
if (buff != NULL) {
xmlNodeDumpOutput (buff, NULL, (xmlNodePtr) intsubset, 0, 0, NULL);
xmlOutputBufferFlush(buff);
if (dtdptr->doc != NULL && ((intsubset = xmlGetIntSubset(dtdptr->doc)) != NULL) && intsubset->children != NULL) {
smart_str ret_buf = {0};
xmlNodePtr cur = intsubset->children;
while (cur != NULL) {
xmlOutputBuffer *buff = xmlAllocOutputBuffer(NULL);
if (buff != NULL) {
xmlNodeDumpOutput (buff, NULL, cur, 0, 0, NULL);
xmlOutputBufferFlush(buff);
#ifdef LIBXML2_NEW_BUFFER
ZVAL_STRINGL(*retval, xmlOutputBufferGetContent(buff), xmlOutputBufferGetSize(buff), 1);
smart_str_appendl(&ret_buf, xmlOutputBufferGetContent(buff), xmlOutputBufferGetSize(buff));
#else
ZVAL_STRINGL(*retval, buff->buffer->content, buff->buffer->use, 1);
smart_str_appendl(&ret_buf, buff->buffer->content, buff->buffer->use);
#endif
(void)xmlOutputBufferClose(buff);
(void)xmlOutputBufferClose(buff);
}
cur = cur->next;
}
if (ret_buf.len) {
ZVAL_STRINGL(*retval, ret_buf.c, ret_buf.len, 1);
smart_str_free(&ret_buf);
return SUCCESS;
}
}
ZVAL_EMPTY_STRING(*retval);
ZVAL_NULL(*retval);
return SUCCESS;
+2 -2
View File
@@ -43,6 +43,6 @@ print 'notation: '.$notation->nodeName."\n";
publicId: -//OASIS//DTD DocBook XML//EN
systemId: docbookx.dtd
name: chapter
internalSubset: <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML//EN" "docbookx.dtd">
internalSubset:
entity: logo
notation: gif
notation: gif
@@ -12,6 +12,7 @@ require_once dirname(__FILE__) .'/skipif.inc';
// reusing existing xml: http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/dom.xml?view=co&content-type=text%2Fplain
// reusing existing dtd: http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/dom.ent?view=co&content-type=text%2Fplain
$dom = new DOMDocument('1.0');
$dom->substituteEntities = true;
$dom->load(dirname(__FILE__).'/dom.xml');
var_dump($dom->validate());
?>
+47
View File
@@ -0,0 +1,47 @@
--TEST--
Bug #67081 DOMDocumentType->internalSubset returns entire DOCTYPE tag, not only the subset
--SKIPIF--
<?php
require_once('skipif.inc');
?>
--FILE--
<?php
$domDocument = new DOMDocument();
$domDocument->substituteEntities = true;
$domDocument->load(dirname(__FILE__) . DIRECTORY_SEPARATOR . "bug67081_0.xml");
var_dump($domDocument->doctype->internalSubset);
$domDocument = new DOMDocument();
$domDocument->substituteEntities = true;
$domDocument->load(dirname(__FILE__) . DIRECTORY_SEPARATOR . "bug67081_1.xml");
var_dump($domDocument->doctype->internalSubset);
$domDocument = new DOMDocument();
$domDocument->substituteEntities = true;
$domDocument->load(dirname(__FILE__) . DIRECTORY_SEPARATOR . "bug67081_2.xml");
var_dump($domDocument->doctype->internalSubset);
$domDocument = new DOMDocument();
$domDocument->substituteEntities = true;
$domDocument->load(dirname(__FILE__) . DIRECTORY_SEPARATOR . "dom.xml");
var_dump($domDocument->doctype->internalSubset);
?>
===DONE===
--EXPECT--
string(19) "<!ELEMENT a EMPTY>
"
string(38) "<!ELEMENT a EMPTY>
<!ELEMENT b EMPTY>
"
NULL
string(277) "<!ENTITY % incent SYSTEM "dom.ent">
<!ENTITY amp "&#38;#38;">
<!ENTITY gt "&#62;">
<!ENTITY % coreattrs "title CDATA #IMPLIED">
<!ENTITY % attrs "%coreattrs;">
<!ATTLIST foo bar CDATA #IMPLIED>
<!ELEMENT foo (#PCDATA)>
<!ELEMENT root (foo)+>
<!ATTLIST th title CDATA #IMPLIED>
"
===DONE===
+6
View File
@@ -0,0 +1,6 @@
<?xml version="1.0"?>
<!DOCTYPE a [
<!ELEMENT a EMPTY>
]>
<a></a>
+7
View File
@@ -0,0 +1,7 @@
<?xml version="1.0"?>
<!DOCTYPE a [
<!ELEMENT a EMPTY>
<!ELEMENT b EMPTY>
]>
<a></a>
+5
View File
@@ -0,0 +1,5 @@
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<a></a>
+1 -1
View File
@@ -18,7 +18,7 @@ exif.encode_unicode=ISO-8859-1
test4.jpg is a 1*1 image that contains Exif tags written by WindowsXP
*/
$image = exif_read_data(dirname(__FILE__).'/test4.jpg','',true,false);
echo var_dump($image['WINXP']);
var_dump($image['WINXP']);
?>
--EXPECT--
array(5) {
+1 -1
View File
@@ -288,7 +288,7 @@ To use your new extension, you will have to execute the following steps:
3. $ ./buildconf
4. $ ./configure --[with|enable]-$extname
5. $ make
6. $ ./php -f ext/$extname/$extname.php
6. $ ./sapi/cli/php -f ext/$extname/$extname.php
7. $ vi ext/$extname/$extname.c
8. $ make
+1 -1
View File
@@ -115198,7 +115198,7 @@ const unsigned char php_magic_database[2606480] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x40, 0x00, 0x3D, 0x1B, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x5E, 0x5C, 0x73, 0x7B, 0x30, 0x2C, 0x31, 0x30, 0x30, 0x7D, 0x42, 0x45, 0x47, 0x49, 0x4E, 0x5C,
0x73, 0x7B, 0x30, 0x2C, 0x31, 0x30, 0x30, 0x7D, 0x5B, 0x7B, 0x5D, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+234 -76
View File
@@ -1,6 +1,6 @@
diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
--- libmagic.orig/apprentice.c Thu Mar 21 18:45:14 2013
+++ libmagic/apprentice.c Fri May 3 15:19:35 2013
+++ libmagic/apprentice.c Mon Apr 14 23:42:51 2014
@@ -29,6 +29,8 @@
* apprentice - make one pass through /etc/magic, learning its secrets.
*/
@@ -180,7 +180,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
return NULL;
}
@@ -499,22 +492,24 @@
@@ -499,22 +492,26 @@
{
if (map == NULL)
return;
@@ -194,12 +194,14 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
- free(map->p);
- free(map);
+ if (map->p != php_magic_database) {
+ int j;
+ for (j = 0; j < MAGIC_SETS; j++) {
+ if (map->magic[j])
+ efree(map->magic[j]);
+ }
+ if (map->p != NULL) {
+ if (map->p == NULL) {
+ int j;
+ for (j = 0; j < MAGIC_SETS; j++) {
+ if (map->magic[j]) {
+ efree(map->magic[j]);
+ }
+ }
+ } else {
+ efree(map->p);
+ }
+ }
@@ -215,7 +217,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
return NULL;
}
mlist->next = mlist->prev = mlist;
@@ -533,10 +528,10 @@
@@ -533,10 +530,10 @@
struct mlist *next = ml->next;
if (ml->map)
apprentice_unmap(ml->map);
@@ -228,7 +230,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
}
/* const char *fn: list of magic files and directories */
@@ -546,13 +541,28 @@
@@ -546,13 +543,28 @@
char *p, *mfn;
int file_err, errs = -1;
size_t i;
@@ -259,7 +261,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
file_oomem(ms, strlen(fn));
return -1;
}
@@ -567,7 +577,7 @@
@@ -567,7 +579,7 @@
mlist_free(ms->mlist[i]);
while (i != 0);
}
@@ -268,7 +270,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
return -1;
}
}
@@ -584,7 +594,7 @@
@@ -584,7 +596,7 @@
fn = p;
}
@@ -277,7 +279,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
if (errs == -1) {
for (i = 0; i < MAGIC_SETS; i++) {
@@ -904,7 +914,7 @@
@@ -904,7 +916,7 @@
maxmagic[i] += ALLOC_INCR;
if ((mp = CAST(struct magic_entry *,
@@ -286,7 +288,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
NULL) {
file_oomem(ms, sizeof(*mp) * maxmagic[i]);
return -1;
@@ -925,13 +935,24 @@
@@ -925,13 +937,24 @@
load_1(struct magic_set *ms, int action, const char *fn, int *errs,
struct magic_entry **mentry, uint32_t *mentrycount)
{
@@ -315,7 +317,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
if (errno != ENOENT)
file_error(ms, errno, "cannot read magic file `%s'",
fn);
@@ -941,8 +962,7 @@
@@ -941,8 +964,7 @@
memset(&me, 0, sizeof(me));
/* read and parse this file */
@@ -325,7 +327,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
if (len == 0) /* null line, garbage, etc */
continue;
if (line[len - 1] == '\n') {
@@ -994,14 +1014,13 @@
@@ -994,14 +1016,13 @@
goto again;
default:
(*errs)++;
@@ -343,7 +345,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
}
/*
@@ -1080,7 +1099,7 @@
@@ -1080,7 +1101,7 @@
mentrycount += me[i].cont_count;
slen = sizeof(**ma) * mentrycount;
@@ -352,7 +354,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
file_oomem(ms, slen);
return -1;
}
@@ -1102,27 +1121,29 @@
@@ -1102,27 +1123,29 @@
if (me == NULL)
return;
for (i = 0; i < nme; i++)
@@ -389,7 +391,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
file_oomem(ms, sizeof(*map));
return NULL;
}
@@ -1131,23 +1152,37 @@
@@ -1131,23 +1154,37 @@
if (action == FILE_CHECK)
(void)fprintf(stderr, "%s\n", usg_hdr);
@@ -434,7 +436,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
continue;
}
if (files >= maxfiles) {
@@ -1155,24 +1190,23 @@
@@ -1155,24 +1192,23 @@
maxfiles = (maxfiles + 1) * 2;
mlen = maxfiles * sizeof(*filearr);
if ((filearr = CAST(char **,
@@ -465,7 +467,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
} else
load_1(ms, action, fn, &errs, mentry, mentrycount);
if (errs)
@@ -1211,9 +1245,9 @@
@@ -1211,9 +1247,9 @@
if (errs) {
for (j = 0; j < MAGIC_SETS; j++) {
if (map->magic[j])
@@ -477,7 +479,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
return NULL;
}
return map;
@@ -1500,7 +1534,7 @@
@@ -1500,7 +1536,7 @@
if (me->cont_count == me->max_count) {
struct magic *nm;
size_t cnt = me->max_count + ALLOC_CHUNK;
@@ -486,7 +488,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
sizeof(*nm) * cnt))) == NULL) {
file_oomem(ms, sizeof(*nm) * cnt);
return -1;
@@ -1515,7 +1549,7 @@
@@ -1515,7 +1551,7 @@
static const size_t len = sizeof(*m) * ALLOC_CHUNK;
if (me->mp != NULL)
return 1;
@@ -495,7 +497,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
file_oomem(ms, len);
return -1;
}
@@ -1688,7 +1722,7 @@
@@ -1688,7 +1724,7 @@
m->type = get_standard_integer_type(l, &l);
else if (*l == 's' && !isalpha((unsigned char)l[1])) {
m->type = FILE_STRING;
@@ -504,7 +506,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
}
}
}
@@ -1701,6 +1735,10 @@
@@ -1701,6 +1737,10 @@
if (m->type == FILE_INVALID) {
if (ms->flags & MAGIC_CHECK)
file_magwarn(ms, "type `%s' invalid", l);
@@ -515,7 +517,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
return -1;
}
@@ -1709,7 +1747,7 @@
@@ -1709,7 +1749,7 @@
m->mask_op = 0;
if (*l == '~') {
@@ -524,7 +526,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
m->mask_op |= FILE_OPINVERSE;
else if (ms->flags & MAGIC_CHECK)
file_magwarn(ms, "'~' invalid for string types");
@@ -1718,7 +1756,7 @@
@@ -1718,7 +1758,7 @@
m->str_range = 0;
m->str_flags = m->type == FILE_PSTRING ? PSTRING_1_LE : 0;
if ((op = get_op(*l)) != -1) {
@@ -533,7 +535,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
uint64_t val;
++l;
m->mask_op |= op;
@@ -1909,11 +1947,6 @@
@@ -1909,11 +1949,6 @@
if (check_format(ms, m) == -1)
return -1;
}
@@ -545,7 +547,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
m->mimetype[0] = '\0'; /* initialise MIME type to none */
return 0;
}
@@ -2554,59 +2587,80 @@
@@ -2554,59 +2589,80 @@
private struct magic_map *
apprentice_map(struct magic_set *ms, const char *fn)
{
@@ -559,10 +561,10 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
size_t i;
+ php_stream *stream = NULL;
+ php_stream_statbuf st;
+
- fd = -1;
- if ((map = CAST(struct magic_map *, calloc(1, sizeof(*map)))) == NULL) {
+
+ TSRMLS_FETCH();
+
+ if ((map = CAST(struct magic_map *, ecalloc(1, sizeof(*map)))) == NULL) {
@@ -647,7 +649,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
if (*ptr != MAGICNO) {
if (swap4(*ptr) != MAGICNO) {
file_error(ms, 0, "bad magic in `%s'", dbname);
@@ -2620,17 +2674,29 @@
@@ -2620,17 +2676,29 @@
else
version = ptr[1];
if (version != VERSIONNO) {
@@ -685,7 +687,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
}
map->magic[0] = CAST(struct magic *, map->p) + 1;
nentries = 0;
@@ -2643,22 +2709,29 @@
@@ -2643,22 +2711,29 @@
map->magic[i + 1] = map->magic[i] + map->nmagic[i];
nentries += map->nmagic[i];
}
@@ -720,7 +722,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
return NULL;
}
@@ -2679,14 +2752,23 @@
@@ -2679,14 +2754,23 @@
char *dbname;
int rv = -1;
uint32_t i;
@@ -747,7 +749,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
file_error(ms, errno, "cannot open `%s'", dbname);
goto out;
}
@@ -2696,31 +2778,33 @@
@@ -2696,31 +2780,33 @@
goto out;
}
@@ -787,7 +789,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
return rv;
}
@@ -2733,6 +2817,7 @@
@@ -2733,6 +2819,7 @@
{
const char *p, *q;
char *buf;
@@ -795,7 +797,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
if (strip) {
if ((p = strrchr(fn, '/')) != NULL)
@@ -2754,16 +2839,18 @@
@@ -2754,16 +2841,18 @@
q++;
/* Compatibility with old code that looked in .mime */
if (ms->flags & MAGIC_MIME) {
@@ -820,7 +822,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
/* Compatibility with old code that looked in .mime */
if (strstr(p, ".mime") != NULL)
@@ -2853,7 +2940,7 @@
@@ -2853,7 +2942,7 @@
m->offset = swap4((uint32_t)m->offset);
m->in_offset = swap4((uint32_t)m->in_offset);
m->lineno = swap4((uint32_t)m->lineno);
@@ -831,7 +833,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
}
diff -u libmagic.orig/ascmagic.c libmagic/ascmagic.c
--- libmagic.orig/ascmagic.c Wed Oct 31 18:03:01 2012
+++ libmagic/ascmagic.c Tue Feb 18 18:44:17 2014
+++ libmagic/ascmagic.c Mon Apr 14 23:42:51 2014
@@ -139,7 +139,7 @@
/* malloc size is a conservative overestimate; could be
improved, or at least realloced after conversion. */
@@ -870,7 +872,7 @@ diff -u libmagic.orig/ascmagic.c libmagic/ascmagic.c
}
diff -u libmagic.orig/cdf.c libmagic/cdf.c
--- libmagic.orig/cdf.c Thu Mar 21 18:45:14 2013
+++ libmagic/cdf.c Sun Apr 7 22:30:22 2013
+++ libmagic/cdf.c Tue Jul 1 09:00:09 2014
@@ -43,7 +43,17 @@
#include <err.h>
#endif
@@ -889,7 +891,25 @@ diff -u libmagic.orig/cdf.c libmagic/cdf.c
#include <string.h>
#include <time.h>
#include <ctype.h>
@@ -296,7 +306,10 @@
@@ -267,13 +277,15 @@
{
const char *b = (const char *)sst->sst_tab;
const char *e = ((const char *)p) + tail;
+ size_t ss = sst->sst_dirlen < h->h_min_size_standard_stream ?
+ CDF_SHORT_SEC_SIZE(h) : CDF_SEC_SIZE(h);
(void)&line;
- if (e >= b && (size_t)(e - b) <= CDF_SEC_SIZE(h) * sst->sst_len)
+ if (e >= b && (size_t)(e - b) <= ss * sst->sst_len)
return 0;
DPRINTF(("%d: offset begin %p < end %p || %" SIZE_T_FORMAT "u"
" > %" SIZE_T_FORMAT "u [%" SIZE_T_FORMAT "u %"
SIZE_T_FORMAT "u]\n", line, b, e, (size_t)(e - b),
- CDF_SEC_SIZE(h) * sst->sst_len, CDF_SEC_SIZE(h), sst->sst_len));
+ ss * sst->sst_len, ss, sst->sst_len));
errno = EFTYPE;
return -1;
}
@@ -296,7 +308,10 @@
if (info->i_fd == -1)
return -1;
@@ -901,7 +921,110 @@ diff -u libmagic.orig/cdf.c libmagic/cdf.c
return -1;
return (ssize_t)len;
@@ -1132,7 +1145,7 @@
@@ -352,10 +367,10 @@
size_t ss = CDF_SHORT_SEC_SIZE(h);
size_t pos = CDF_SHORT_SEC_POS(h, id);
assert(ss == len);
- if (pos > CDF_SEC_SIZE(h) * sst->sst_len) {
+ if (pos + len > CDF_SEC_SIZE(h) * sst->sst_len) {
DPRINTF(("Out of bounds read %" SIZE_T_FORMAT "u > %"
SIZE_T_FORMAT "u\n",
- pos, CDF_SEC_SIZE(h) * sst->sst_len));
+ pos + len, CDF_SEC_SIZE(h) * sst->sst_len));
return -1;
}
(void)memcpy(((char *)buf) + offs,
@@ -455,7 +470,8 @@
cdf_count_chain(const cdf_sat_t *sat, cdf_secid_t sid, size_t size)
{
size_t i, j;
- cdf_secid_t maxsector = (cdf_secid_t)(sat->sat_len * size);
+ cdf_secid_t maxsector = (cdf_secid_t)((sat->sat_len * size)
+ / sizeof(maxsector));
DPRINTF(("Chain:"));
for (j = i = 0; sid >= 0; i++, j++) {
@@ -465,8 +481,8 @@
errno = EFTYPE;
return (size_t)-1;
}
- if (sid > maxsector) {
- DPRINTF(("Sector %d > %d\n", sid, maxsector));
+ if (sid >= maxsector) {
+ DPRINTF(("Sector %d >= %d\n", sid, maxsector));
errno = EFTYPE;
return (size_t)-1;
}
@@ -796,7 +812,11 @@
if (cdf_check_stream_offset(sst, h, e, 0, __LINE__) == -1)
goto out;
for (i = 0; i < sh.sh_properties; i++) {
- size_t ofs = CDF_GETUINT32(p, (i << 1) + 1);
+ size_t ofs, tail = (i << 1) + 1;
+ if (cdf_check_stream_offset(sst, h, p, tail * sizeof(uint32_t),
+ __LINE__) == -1)
+ goto out;
+ ofs = CDF_GETUINT32(p, tail);
q = (const uint8_t *)(const void *)
((const char *)(const void *)p + ofs
- 2 * sizeof(uint32_t));
@@ -810,6 +830,10 @@
i, inp[i].pi_id, inp[i].pi_type, q - p, offs));
if (inp[i].pi_type & CDF_VECTOR) {
nelements = CDF_GETUINT32(q, 1);
+ if (nelements == 0) {
+ DPRINTF(("CDF_VECTOR with nelements == 0\n"));
+ goto out;
+ }
o = 2;
} else {
nelements = 1;
@@ -884,7 +908,9 @@
}
DPRINTF(("nelements = %" SIZE_T_FORMAT "u\n",
nelements));
- for (j = 0; j < nelements; j++, i++) {
+ for (j = 0; j < nelements && i < sh.sh_properties;
+ j++, i++)
+ {
uint32_t l = CDF_GETUINT32(q, o);
inp[i].pi_str.s_len = l;
inp[i].pi_str.s_buf = (const char *)
@@ -929,7 +955,7 @@
cdf_unpack_summary_info(const cdf_stream_t *sst, const cdf_header_t *h,
cdf_summary_info_header_t *ssi, cdf_property_info_t **info, size_t *count)
{
- size_t i, maxcount;
+ size_t maxcount;
const cdf_summary_info_header_t *si =
CAST(const cdf_summary_info_header_t *, sst->sst_tab);
const cdf_section_declaration_t *sd =
@@ -944,21 +970,13 @@
ssi->si_os = CDF_TOLE2(si->si_os);
ssi->si_class = si->si_class;
cdf_swap_class(&ssi->si_class);
- ssi->si_count = CDF_TOLE2(si->si_count);
+ ssi->si_count = CDF_TOLE4(si->si_count);
*count = 0;
maxcount = 0;
*info = NULL;
- for (i = 0; i < CDF_TOLE4(si->si_count); i++) {
- if (i >= CDF_LOOP_LIMIT) {
- DPRINTF(("Unpack summary info loop limit"));
- errno = EFTYPE;
- return -1;
- }
- if (cdf_read_property_info(sst, h, CDF_TOLE4(sd->sd_offset),
- info, count, &maxcount) == -1) {
+ if (cdf_read_property_info(sst, h, CDF_TOLE4(sd->sd_offset), info,
+ count, &maxcount) == -1)
return -1;
- }
- }
return 0;
}
@@ -1132,7 +1150,7 @@
cdf_directory_t *d;
char name[__arraycount(d->d_name)];
cdf_stream_t scn;
@@ -910,7 +1033,7 @@ diff -u libmagic.orig/cdf.c libmagic/cdf.c
static const char *types[] = { "empty", "user storage",
"user stream", "lockbytes", "property", "root storage" };
@@ -1185,7 +1198,7 @@
@@ -1185,7 +1203,7 @@
cdf_dump_property_info(const cdf_property_info_t *info, size_t count)
{
cdf_timestamp_t tp;
@@ -919,7 +1042,7 @@ diff -u libmagic.orig/cdf.c libmagic/cdf.c
char buf[64];
size_t i, j;
@@ -1229,7 +1242,11 @@
@@ -1229,7 +1247,11 @@
break;
case CDF_FILETIME:
tp = info[i].pi_tp;
@@ -933,7 +1056,7 @@ diff -u libmagic.orig/cdf.c libmagic/cdf.c
} else {
diff -u libmagic.orig/cdf.h libmagic/cdf.h
--- libmagic.orig/cdf.h Wed Oct 31 18:03:01 2012
+++ libmagic/cdf.h Sun Apr 7 22:30:22 2013
+++ libmagic/cdf.h Mon Apr 14 23:32:55 2014
@@ -35,10 +35,12 @@
#ifndef _H_CDF_
#define _H_CDF_
@@ -976,7 +1099,7 @@ diff -u libmagic.orig/cdf.h libmagic/cdf.h
void cdf_unpack_header(cdf_header_t *, char *);
diff -u libmagic.orig/cdf_time.c libmagic/cdf_time.c
--- libmagic.orig/cdf_time.c Wed Oct 31 18:03:01 2012
+++ libmagic/cdf_time.c Sun Apr 7 22:30:22 2013
+++ libmagic/cdf_time.c Mon Apr 14 23:32:55 2014
@@ -96,7 +96,7 @@
}
@@ -1036,7 +1159,7 @@ diff -u libmagic.orig/cdf_time.c libmagic/cdf_time.c
static const char *ref = "Sat Apr 23 01:30:00 1977";
diff -u libmagic.orig/compress.c libmagic/compress.c
--- libmagic.orig/compress.c Sun Jan 6 21:35:43 2013
+++ libmagic/compress.c Sun Apr 7 22:30:22 2013
+++ libmagic/compress.c Mon Apr 14 23:42:51 2014
@@ -32,6 +32,7 @@
* uncompress(method, old, n, newch) - uncompress old into new,
* using method, return sizeof new
@@ -1199,7 +1322,7 @@ diff -u libmagic.orig/compress.c libmagic/compress.c
+#endif /* if PHP_FILEINFO_UNCOMPRESS */
diff -u libmagic.orig/file.h libmagic/file.h
--- libmagic.orig/file.h Mon Feb 18 16:40:59 2013
+++ libmagic/file.h Tue Feb 18 18:44:17 2014
+++ libmagic/file.h Mon Apr 14 23:42:51 2014
@@ -33,11 +33,9 @@
#ifndef __file_h__
#define __file_h__
@@ -1409,7 +1532,7 @@ diff -u libmagic.orig/file.h libmagic/file.h
#endif /* __file_h__ */
diff -u libmagic.orig/fsmagic.c libmagic/fsmagic.c
--- libmagic.orig/fsmagic.c Thu Mar 21 18:45:14 2013
+++ libmagic/fsmagic.c Sun Apr 7 22:30:22 2013
+++ libmagic/fsmagic.c Mon Apr 14 23:42:51 2014
@@ -59,27 +59,21 @@
# define minor(dev) ((dev) & 0xff)
#endif
@@ -1776,7 +1899,7 @@ diff -u libmagic.orig/fsmagic.c libmagic/fsmagic.c
}
diff -u libmagic.orig/funcs.c libmagic/funcs.c
--- libmagic.orig/funcs.c Wed Oct 31 18:03:01 2012
+++ libmagic/funcs.c Tue Feb 18 18:44:17 2014
+++ libmagic/funcs.c Mon Apr 14 23:42:51 2014
@@ -41,52 +41,42 @@
#if defined(HAVE_WCTYPE_H)
#include <wctype.h>
@@ -2070,7 +2193,7 @@ diff -u libmagic.orig/funcs.c libmagic/funcs.c
+
diff -u libmagic.orig/magic.c libmagic/magic.c
--- libmagic.orig/magic.c Fri Jan 11 17:43:09 2013
+++ libmagic/magic.c Fri May 3 15:19:35 2013
+++ libmagic/magic.c Mon Apr 14 23:42:51 2014
@@ -25,11 +25,6 @@
* SUCH DAMAGE.
*/
@@ -2414,7 +2537,7 @@ diff -u libmagic.orig/magic.c libmagic/magic.c
magic_error(struct magic_set *ms)
diff -u libmagic.orig/magic.h libmagic/magic.h
--- libmagic.orig/magic.h Thu Mar 21 18:52:42 2013
+++ libmagic/magic.h Sun Apr 7 22:30:22 2013
+++ libmagic/magic.h Mon Apr 14 23:42:51 2014
@@ -87,6 +87,7 @@
const char *magic_getpath(const char *, int);
@@ -2433,7 +2556,7 @@ diff -u libmagic.orig/magic.h libmagic/magic.h
diff -u libmagic.orig/print.c libmagic/print.c
--- libmagic.orig/print.c Thu Mar 21 18:45:14 2013
+++ libmagic/print.c Mon Dec 16 23:09:24 2013
+++ libmagic/print.c Mon Apr 14 23:42:51 2014
@@ -29,12 +29,17 @@
* print.c - debugging printout routines
*/
@@ -2664,7 +2787,7 @@ diff -u libmagic.orig/print.c libmagic/print.c
}
diff -u libmagic.orig/readcdf.c libmagic/readcdf.c
--- libmagic.orig/readcdf.c Wed Oct 31 18:03:01 2012
+++ libmagic/readcdf.c Sun Apr 7 22:30:22 2013
+++ libmagic/readcdf.c Tue May 27 22:17:37 2014
@@ -30,7 +30,11 @@
#endif
@@ -2677,7 +2800,7 @@ diff -u libmagic.orig/readcdf.c libmagic/readcdf.c
#include <string.h>
#include <time.h>
#include <ctype.h>
@@ -46,7 +50,7 @@
@@ -46,12 +50,14 @@
{
size_t i;
cdf_timestamp_t tp;
@@ -2686,7 +2809,14 @@ diff -u libmagic.orig/readcdf.c libmagic/readcdf.c
char buf[64];
const char *str = NULL;
const char *s;
@@ -125,8 +129,12 @@
int len;
+ memset(&ts, 0, sizeof(ts));
+
for (i = 0; i < count; i++) {
cdf_print_property_name(buf, sizeof(buf), info[i].pi_id);
switch (info[i].pi_type) {
@@ -125,8 +131,12 @@
case CDF_FILETIME:
tp = info[i].pi_tp;
if (tp != 0) {
@@ -2701,18 +2831,24 @@ diff -u libmagic.orig/readcdf.c libmagic/readcdf.c
cdf_print_elapsed_time(tbuf,
sizeof(tbuf), tp);
if (NOTMIME(ms) && file_printf(ms,
@@ -134,7 +142,9 @@
@@ -134,9 +144,13 @@
return -1;
} else {
char *c, *ec;
- cdf_timestamp_to_timespec(&ts, tp);
- c = cdf_ctime(&ts.tv_sec, tbuf);
- if ((ec = strchr(c, '\n')) != NULL)
+ const time_t sec = ts.tv_sec;
+ if (cdf_timestamp_to_timespec(&ts, tp) == -1) {
+ return -1;
+ }
c = cdf_ctime(&ts.tv_sec, tbuf);
if ((ec = strchr(c, '\n')) != NULL)
+ c = cdf_ctime(&sec, tbuf);
+ if (c != NULL &&
+ (ec = strchr(c, '\n')) != NULL)
*ec = '\0';
@@ -314,9 +324,9 @@
if (NOTMIME(ms) && file_printf(ms,
@@ -314,9 +328,9 @@
if (file_printf(ms,
"Composite Document File V2 Document") == -1)
return -1;
@@ -2727,7 +2863,7 @@ diff -u libmagic.orig/readcdf.c libmagic/readcdf.c
return -1;
diff -u libmagic.orig/readelf.c libmagic/readelf.c
--- libmagic.orig/readelf.c Thu Mar 21 18:45:14 2013
+++ libmagic/readelf.c Sun Apr 7 22:30:22 2013
+++ libmagic/readelf.c Mon Apr 14 23:42:51 2014
@@ -48,8 +48,8 @@
private int dophn_exec(struct magic_set *, int, int, int, off_t, int, size_t,
off_t, int *, int);
@@ -2979,7 +3115,7 @@ diff -u libmagic.orig/readelf.c libmagic/readelf.c
if (fstat(fd, &st) == -1) {
diff -u libmagic.orig/readelf.h libmagic/readelf.h
--- libmagic.orig/readelf.h Thu Mar 21 18:45:14 2013
+++ libmagic/readelf.h Wed Mar 28 15:35:26 2012
+++ libmagic/readelf.h Mon Apr 14 23:42:51 2014
@@ -44,9 +44,17 @@
typedef uint32_t Elf32_Word;
typedef uint8_t Elf32_Char;
@@ -3000,7 +3136,7 @@ diff -u libmagic.orig/readelf.h libmagic/readelf.h
typedef uint8_t Elf64_Char;
diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
--- libmagic.orig/softmagic.c Thu Mar 21 18:45:14 2013
+++ libmagic/softmagic.c Mon Mar 10 14:03:18 2014
+++ libmagic/softmagic.c Tue Jul 1 09:00:09 2014
@@ -41,6 +41,11 @@
#include <stdlib.h>
#include <time.h>
@@ -3150,7 +3286,29 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
break; \
} \
@@ -1145,9 +1130,6 @@
@@ -896,10 +881,18 @@
return 1;
}
case FILE_PSTRING: {
- char *ptr1 = p->s, *ptr2 = ptr1 + file_pstring_length_size(m);
+ size_t sz = file_pstring_length_size(m);
+ char *ptr1 = p->s, *ptr2 = ptr1 + sz;
size_t len = file_pstring_get_length(m, ptr1);
- if (len >= sizeof(p->s))
- len = sizeof(p->s) - 1;
+ if (len >= sizeof(p->s)) {
+ /*
+ * The size of the pascal string length (sz)
+ * is 1, 2, or 4. We need at least 1 byte for NUL
+ * termination, but we've already truncated the
+ * string by p->s, so we need to deduct sz.
+ */
+ len = sizeof(p->s) - sz;
+ }
while (len--)
*ptr1++ = *ptr2++;
*ptr1 = '\0';
@@ -1145,9 +1138,6 @@
"nbytes=%zu, count=%u)\n", m->type, m->flag, offset, o,
nbytes, count);
mdebug(offset, (char *)(void *)p, sizeof(union VALUETYPE));
@@ -3160,7 +3318,7 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
}
if (m->flag & INDIR) {
@@ -1191,7 +1173,7 @@
@@ -1191,7 +1181,7 @@
}
switch (cvt_flip(m->in_type, flip)) {
case FILE_BYTE:
@@ -3169,7 +3327,7 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
return 0;
if (off) {
switch (m->in_op & FILE_OPS_MASK) {
@@ -1226,7 +1208,7 @@
@@ -1226,7 +1216,7 @@
offset = ~offset;
break;
case FILE_BESHORT:
@@ -3178,7 +3336,7 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
return 0;
if (off) {
switch (m->in_op & FILE_OPS_MASK) {
@@ -1278,7 +1260,7 @@
@@ -1278,7 +1268,7 @@
offset = ~offset;
break;
case FILE_LESHORT:
@@ -3187,7 +3345,7 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
return 0;
if (off) {
switch (m->in_op & FILE_OPS_MASK) {
@@ -1330,7 +1312,7 @@
@@ -1330,7 +1320,7 @@
offset = ~offset;
break;
case FILE_SHORT:
@@ -3196,7 +3354,7 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
return 0;
if (off) {
switch (m->in_op & FILE_OPS_MASK) {
@@ -1367,7 +1349,7 @@
@@ -1367,7 +1357,7 @@
break;
case FILE_BELONG:
case FILE_BEID3:
@@ -3205,7 +3363,7 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
return 0;
if (off) {
switch (m->in_op & FILE_OPS_MASK) {
@@ -1438,7 +1420,7 @@
@@ -1438,7 +1428,7 @@
break;
case FILE_LELONG:
case FILE_LEID3:
@@ -3214,7 +3372,7 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
return 0;
if (off) {
switch (m->in_op & FILE_OPS_MASK) {
@@ -1508,7 +1490,7 @@
@@ -1508,7 +1498,7 @@
offset = ~offset;
break;
case FILE_MELONG:
@@ -3223,7 +3381,7 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
return 0;
if (off) {
switch (m->in_op & FILE_OPS_MASK) {
@@ -1578,7 +1560,7 @@
@@ -1578,7 +1568,7 @@
offset = ~offset;
break;
case FILE_LONG:
@@ -3232,7 +3390,7 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
return 0;
if (off) {
switch (m->in_op & FILE_OPS_MASK) {
@@ -1644,23 +1626,20 @@
@@ -1644,23 +1634,20 @@
if ((ms->flags & MAGIC_DEBUG) != 0) {
mdebug(offset, (char *)(void *)p,
sizeof(union VALUETYPE));
@@ -3258,7 +3416,7 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
return 0;
break;
@@ -1679,38 +1658,40 @@
@@ -1679,38 +1666,40 @@
case FILE_FLOAT:
case FILE_BEFLOAT:
case FILE_LEFLOAT:
@@ -3305,7 +3463,7 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
if ((ms->flags & MAGIC_DEBUG) != 0)
fprintf(stderr, "indirect @offs=%u[%d]\n", offset, rv);
rbuf = ms->o.buf;
@@ -1718,16 +1699,26 @@
@@ -1718,16 +1707,26 @@
ms->offset = soffset;
if (rv == 1) {
if ((ms->flags & (MAGIC_MIME|MAGIC_APPLE)) == 0 &&
@@ -3336,7 +3494,7 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
return 0;
sbuf = m->value.s;
if (*sbuf == '^') {
@@ -1837,6 +1828,42 @@
@@ -1837,6 +1836,42 @@
return file_strncmp(a, b, len, flags);
}
@@ -3379,7 +3537,7 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
private int
magiccheck(struct magic_set *ms, struct magic *m)
{
@@ -1996,69 +2023,157 @@
@@ -1996,69 +2031,157 @@
break;
}
case FILE_REGEX: {
+27 -22
View File
@@ -277,13 +277,15 @@ cdf_check_stream_offset(const cdf_stream_t *sst, const cdf_header_t *h,
{
const char *b = (const char *)sst->sst_tab;
const char *e = ((const char *)p) + tail;
size_t ss = sst->sst_dirlen < h->h_min_size_standard_stream ?
CDF_SHORT_SEC_SIZE(h) : CDF_SEC_SIZE(h);
(void)&line;
if (e >= b && (size_t)(e - b) <= CDF_SEC_SIZE(h) * sst->sst_len)
if (e >= b && (size_t)(e - b) <= ss * sst->sst_len)
return 0;
DPRINTF(("%d: offset begin %p < end %p || %" SIZE_T_FORMAT "u"
" > %" SIZE_T_FORMAT "u [%" SIZE_T_FORMAT "u %"
SIZE_T_FORMAT "u]\n", line, b, e, (size_t)(e - b),
CDF_SEC_SIZE(h) * sst->sst_len, CDF_SEC_SIZE(h), sst->sst_len));
ss * sst->sst_len, ss, sst->sst_len));
errno = EFTYPE;
return -1;
}
@@ -365,10 +367,10 @@ cdf_read_short_sector(const cdf_stream_t *sst, void *buf, size_t offs,
size_t ss = CDF_SHORT_SEC_SIZE(h);
size_t pos = CDF_SHORT_SEC_POS(h, id);
assert(ss == len);
if (pos > CDF_SEC_SIZE(h) * sst->sst_len) {
if (pos + len > CDF_SEC_SIZE(h) * sst->sst_len) {
DPRINTF(("Out of bounds read %" SIZE_T_FORMAT "u > %"
SIZE_T_FORMAT "u\n",
pos, CDF_SEC_SIZE(h) * sst->sst_len));
pos + len, CDF_SEC_SIZE(h) * sst->sst_len));
return -1;
}
(void)memcpy(((char *)buf) + offs,
@@ -468,7 +470,8 @@ size_t
cdf_count_chain(const cdf_sat_t *sat, cdf_secid_t sid, size_t size)
{
size_t i, j;
cdf_secid_t maxsector = (cdf_secid_t)(sat->sat_len * size);
cdf_secid_t maxsector = (cdf_secid_t)((sat->sat_len * size)
/ sizeof(maxsector));
DPRINTF(("Chain:"));
for (j = i = 0; sid >= 0; i++, j++) {
@@ -478,8 +481,8 @@ cdf_count_chain(const cdf_sat_t *sat, cdf_secid_t sid, size_t size)
errno = EFTYPE;
return (size_t)-1;
}
if (sid > maxsector) {
DPRINTF(("Sector %d > %d\n", sid, maxsector));
if (sid >= maxsector) {
DPRINTF(("Sector %d >= %d\n", sid, maxsector));
errno = EFTYPE;
return (size_t)-1;
}
@@ -809,11 +812,15 @@ cdf_read_property_info(const cdf_stream_t *sst, const cdf_header_t *h,
if (cdf_check_stream_offset(sst, h, e, 0, __LINE__) == -1)
goto out;
for (i = 0; i < sh.sh_properties; i++) {
size_t ofs = CDF_GETUINT32(p, (i << 1) + 1);
size_t ofs, tail = (i << 1) + 1;
if (cdf_check_stream_offset(sst, h, p, tail * sizeof(uint32_t),
__LINE__) == -1)
goto out;
ofs = CDF_GETUINT32(p, tail);
q = (const uint8_t *)(const void *)
((const char *)(const void *)p + ofs
- 2 * sizeof(uint32_t));
if (q > e) {
if (q < p || q > e) {
DPRINTF(("Ran of the end %p > %p\n", q, e));
goto out;
}
@@ -823,6 +830,10 @@ cdf_read_property_info(const cdf_stream_t *sst, const cdf_header_t *h,
i, inp[i].pi_id, inp[i].pi_type, q - p, offs));
if (inp[i].pi_type & CDF_VECTOR) {
nelements = CDF_GETUINT32(q, 1);
if (nelements == 0) {
DPRINTF(("CDF_VECTOR with nelements == 0\n"));
goto out;
}
o = 2;
} else {
nelements = 1;
@@ -897,7 +908,9 @@ cdf_read_property_info(const cdf_stream_t *sst, const cdf_header_t *h,
}
DPRINTF(("nelements = %" SIZE_T_FORMAT "u\n",
nelements));
for (j = 0; j < nelements; j++, i++) {
for (j = 0; j < nelements && i < sh.sh_properties;
j++, i++)
{
uint32_t l = CDF_GETUINT32(q, o);
inp[i].pi_str.s_len = l;
inp[i].pi_str.s_buf = (const char *)
@@ -942,7 +955,7 @@ int
cdf_unpack_summary_info(const cdf_stream_t *sst, const cdf_header_t *h,
cdf_summary_info_header_t *ssi, cdf_property_info_t **info, size_t *count)
{
size_t i, maxcount;
size_t maxcount;
const cdf_summary_info_header_t *si =
CAST(const cdf_summary_info_header_t *, sst->sst_tab);
const cdf_section_declaration_t *sd =
@@ -957,21 +970,13 @@ cdf_unpack_summary_info(const cdf_stream_t *sst, const cdf_header_t *h,
ssi->si_os = CDF_TOLE2(si->si_os);
ssi->si_class = si->si_class;
cdf_swap_class(&ssi->si_class);
ssi->si_count = CDF_TOLE2(si->si_count);
ssi->si_count = CDF_TOLE4(si->si_count);
*count = 0;
maxcount = 0;
*info = NULL;
for (i = 0; i < CDF_TOLE4(si->si_count); i++) {
if (i >= CDF_LOOP_LIMIT) {
DPRINTF(("Unpack summary info loop limit"));
errno = EFTYPE;
if (cdf_read_property_info(sst, h, CDF_TOLE4(sd->sd_offset), info,
count, &maxcount) == -1)
return -1;
}
if (cdf_read_property_info(sst, h, CDF_TOLE4(sd->sd_offset),
info, count, &maxcount) == -1) {
return -1;
}
}
return 0;
}
+6 -2
View File
@@ -56,6 +56,8 @@ cdf_file_property_info(struct magic_set *ms, const cdf_property_info_t *info,
const char *s;
int len;
memset(&ts, 0, sizeof(ts));
for (i = 0; i < count; i++) {
cdf_print_property_name(buf, sizeof(buf), info[i].pi_id);
switch (info[i].pi_type) {
@@ -142,11 +144,13 @@ cdf_file_property_info(struct magic_set *ms, const cdf_property_info_t *info,
return -1;
} else {
char *c, *ec;
const time_t sec = ts.tv_sec;
if (cdf_timestamp_to_timespec(&ts, tp) == -1) {
return -1;
}
c = cdf_ctime(&ts.tv_sec, tbuf);
if ((ec = strchr(c, '\n')) != NULL)
c = cdf_ctime(&sec, tbuf);
if (c != NULL &&
(ec = strchr(c, '\n')) != NULL)
*ec = '\0';
if (NOTMIME(ms) && file_printf(ms,
+29 -14
View File
@@ -58,7 +58,7 @@ private int32_t mprint(struct magic_set *, struct magic *);
private int32_t moffset(struct magic_set *, struct magic *);
private void mdebug(uint32_t, const char *, size_t);
private int mcopy(struct magic_set *, union VALUETYPE *, int, int,
const unsigned char *, uint32_t, size_t, size_t);
const unsigned char *, uint32_t, size_t, struct magic *);
private int mconvert(struct magic_set *, struct magic *, int);
private int print_sep(struct magic_set *, int);
private int handle_annotation(struct magic_set *, struct magic *);
@@ -881,10 +881,18 @@ mconvert(struct magic_set *ms, struct magic *m, int flip)
return 1;
}
case FILE_PSTRING: {
char *ptr1 = p->s, *ptr2 = ptr1 + file_pstring_length_size(m);
size_t sz = file_pstring_length_size(m);
char *ptr1 = p->s, *ptr2 = ptr1 + sz;
size_t len = file_pstring_get_length(m, ptr1);
if (len >= sizeof(p->s))
len = sizeof(p->s) - 1;
if (len >= sizeof(p->s)) {
/*
* The size of the pascal string length (sz)
* is 1, 2, or 4. We need at least 1 byte for NUL
* termination, but we've already truncated the
* string by p->s, so we need to deduct sz.
*/
len = sizeof(p->s) - sz;
}
while (len--)
*ptr1++ = *ptr2++;
*ptr1 = '\0';
@@ -995,7 +1003,7 @@ mdebug(uint32_t offset, const char *str, size_t len)
private int
mcopy(struct magic_set *ms, union VALUETYPE *p, int type, int indir,
const unsigned char *s, uint32_t offset, size_t nbytes, size_t linecnt)
const unsigned char *s, uint32_t offset, size_t nbytes, struct magic *m)
{
/*
* Note: FILE_SEARCH and FILE_REGEX do not actually copy
@@ -1015,15 +1023,24 @@ mcopy(struct magic_set *ms, union VALUETYPE *p, int type, int indir,
const char *last; /* end of search region */
const char *buf; /* start of search region */
const char *end;
size_t lines;
size_t lines, linecnt, bytecnt;
linecnt = m->str_range;
bytecnt = linecnt * 80;
if (bytecnt == 0) {
bytecnt = 8192;
}
if (bytecnt > nbytes) {
bytecnt = nbytes;
}
if (s == NULL) {
ms->search.s_len = 0;
ms->search.s = NULL;
return 0;
}
buf = RCAST(const char *, s) + offset;
end = last = RCAST(const char *, s) + nbytes;
end = last = RCAST(const char *, s) + bytecnt;
/* mget() guarantees buf <= last */
for (lines = linecnt, b = buf; lines && b < end &&
((b = CAST(const char *,
@@ -1036,7 +1053,7 @@ mcopy(struct magic_set *ms, union VALUETYPE *p, int type, int indir,
b++;
}
if (lines)
last = RCAST(const char *, s) + nbytes;
last = RCAST(const char *, s) + bytecnt;
ms->search.s = buf;
ms->search.s_len = last - buf;
@@ -1110,7 +1127,6 @@ mget(struct magic_set *ms, const unsigned char *s, struct magic *m,
int *need_separator, int *returnval)
{
uint32_t soffset, offset = ms->offset;
uint32_t count = m->str_range;
int rv, oneed_separator;
char *sbuf, *rbuf;
union VALUETYPE *p = &ms->ms_value;
@@ -1122,13 +1138,12 @@ mget(struct magic_set *ms, const unsigned char *s, struct magic *m,
}
if (mcopy(ms, p, m->type, m->flag & INDIR, s, (uint32_t)(offset + o),
(uint32_t)nbytes, count) == -1)
(uint32_t)nbytes, m) == -1)
return -1;
if ((ms->flags & MAGIC_DEBUG) != 0) {
fprintf(stderr, "mget(type=%d, flag=%x, offset=%u, o=%zu, "
"nbytes=%zu, count=%u)\n", m->type, m->flag, offset, o,
nbytes, count);
"nbytes=%zu)\n", m->type, m->flag, offset, o, nbytes);
mdebug(offset, (char *)(void *)p, sizeof(union VALUETYPE));
}
@@ -1619,7 +1634,7 @@ mget(struct magic_set *ms, const unsigned char *s, struct magic *m,
if ((ms->flags & MAGIC_DEBUG) != 0)
fprintf(stderr, "indirect +offs=%u\n", offset);
}
if (mcopy(ms, p, m->type, 0, s, offset, nbytes, count) == -1)
if (mcopy(ms, p, m->type, 0, s, offset, nbytes, m) == -1)
return -1;
ms->offset = offset;
@@ -2049,7 +2064,7 @@ magiccheck(struct magic_set *ms, struct magic *m)
zval *retval;
zval *subpats;
char *haystack;
MAKE_STD_ZVAL(retval);
ALLOC_INIT_ZVAL(subpats);
+53 -9
View File
@@ -1,4 +1,4 @@
Patches applied to file sources tree before generating magic.mgc
Patches applied to file 5.14 sources tree before generating magic.mgc
and before running create_data_file.php to create data_file.c.
@@ -17,14 +17,6 @@ diff --git a/magic/Magdir/commands b/magic/Magdir/commands
index 67c3eee..4a7d8dd 100644
--- a/magic/Magdir/commands
+++ b/magic/Magdir/commands
@@ -1,6 +1,6 @@
#------------------------------------------------------------------------------
-# $File: commands,v 1.44 2013/02/05 15:20:47 christos Exp $
+# $File: commands,v 1.45 2013/02/06 14:18:52 christos Exp $
# commands: file(1) magic for various shells and interpreters
#
#0 string/w : shell archive or script for antique kernel text
@@ -49,7 +49,7 @@
!:mime text/x-awk
0 string/wt #!\ /usr/bin/awk awk script text executable
@@ -36,4 +28,56 @@ index 67c3eee..4a7d8dd 100644
0 string/wt #!\ /bin/rc Plan 9 rc shell script text executable
--
1.8.5.5
From 0b478f445b6b7540b58af5d1fe583fa9e48fd745 Mon Sep 17 00:00:00 2001
From: Christos Zoulas <christos@zoulas.com>
Date: Wed, 28 May 2014 19:52:36 +0000
Subject: [PATCH] further optimize awk by not looking for the BEGIN regex until
we found the BEGIN (Jan Kaluza)
---
magic/Magdir/commands | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/magic/Magdir/commands b/magic/Magdir/commands
index bfffdef..26b2869 100644
--- a/magic/Magdir/commands
+++ b/magic/Magdir/commands
@@ -49,7 +49,8 @@
!:mime text/x-awk
0 string/wt #!\ /usr/bin/awk awk script text executable
!:mime text/x-awk
-0 regex =^\\s{0,100}BEGIN\\s{0,100}[{] awk script text
+0 search/16384 BEGIN
+>0 regex =^\\s{0,100}BEGIN\\s{0,100}[{] awk script text
# AT&T Bell Labs' Plan 9 shell
0 string/wt #!\ /bin/rc Plan 9 rc shell script text executable
--
2.0.3
From 71a8b6c0d758acb0f73e2e51421a711b5e9d6668 Mon Sep 17 00:00:00 2001
From: Christos Zoulas <christos@zoulas.com>
Date: Fri, 30 May 2014 16:48:44 +0000
Subject: [PATCH] Limit regex search for BEGIN to the first 4K of the file.
---
magic/Magdir/commands | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/magic/Magdir/commands b/magic/Magdir/commands
index 26b2869..bcd0f43 100644
--- a/magic/Magdir/commands
+++ b/magic/Magdir/commands
@@ -49,8 +49,7 @@
!:mime text/x-awk
0 string/wt #!\ /usr/bin/awk awk script text executable
!:mime text/x-awk
-0 search/16384 BEGIN
->0 regex =^\\s{0,100}BEGIN\\s{0,100}[{] awk script text
+0 regex/4096 =^\\s{0,100}BEGIN\\s{0,100}[{] awk script text
# AT&T Bell Labs' Plan 9 shell
0 string/wt #!\ /bin/rc Plan 9 rc shell script text executable
--
2.0.3
+35
View File
@@ -0,0 +1,35 @@
--TEST--
Bug #66731: file: extensive backtraking
--SKIPIF--
<?php
if (!class_exists('finfo'))
die('skip no fileinfo extension');
--FILE--
<?php
$fd = __DIR__.'/cve-2014-3538.data';
file_put_contents($fd,
'try:' .
str_repeat("\n", 1000000));
$fi = finfo_open(FILEINFO_NONE);
$t = microtime(true);
var_dump(finfo_file($fi, $fd));
$t = microtime(true) - $t;
finfo_close($fi);
if ($t < 1) {
echo "Ok\n";
} else {
printf("Failed, time=%.2f\n", $t);
}
?>
Done
--CLEAN--
<?php
@unlink(__DIR__.'/cve-2014-3538.data');
?>
--EXPECTF--
string(%d) "%s"
Ok
Done
Loaded 100 of 270 files, more files were not shown because too many files have changed in this diff. Show more