Compare commits

...
208 Commits
Author SHA1 Message Date
Stanislav Malyshev bcb10c4700 fix date 2014-06-25 15:53:57 -07:00
Stanislav Malyshev 02213cd510 Fix test - because of big #67397 we don't allow overlong locales anymore 2014-06-24 11:22:44 -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 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
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 2b04d68972 Fix bug #66127 (Segmentation fault with ArrayObject unset) 2014-06-10 23:24:11 -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
Stanislav Malyshev eea75e7146 Fix test - on CI somebody could create a process in the meantime 2014-04-14 15:44:23 -07:00
Anatol Belski 24b72e7a27 fix windows build 2014-04-14 23:29:38 +02:00
Chuan Ma a186312832 Fix #66942: openssl_seal() memory leak
Fix #66952: memory leak in openssl_open()
2014-04-14 13:24:14 -07:00
Stanislav Malyshev 56f9727305 ws fix 2014-04-14 13:16:53 -07:00
Stanislav Malyshev ad1b9eef98 Fix null byte in LDAP bindings 2014-04-14 10:44:53 -07:00
Stanislav Malyshev 40a9316dff Fix bug #66171: better handling of symlinks 2014-04-14 10:44:53 -07:00
Anatol Belski 4268504084 backported some ext/intl tests from 5.6 into 5.4 2014-04-14 16:31:18 +02:00
Anatol Belski 95c57bb646 Fixed bug #67033 Remove reference to Windows 95 2014-04-14 09:32:31 +02:00
Stanislav Malyshev b80243aece fix NEWS 2014-04-13 20:16:27 -07:00
Stanislav Malyshev 5e66ce9293 Merge branch 'pull-request/518' into PHP-5.4
* pull-request/518:
  Fix #66021 (Blank line inside empty array/object)
2014-04-13 18:50:39 -07:00
Ingo Walz b05c088a3a Fixed bug #64604 2014-04-13 18:37:40 -07:00
Freek 5558d0db9b Fix #66562: Consistency bug where curl_multi_getcontent behaves different from curl_exec
curl_exec returns an empty string when data is received from a domain that returns zero content. curl_multi_getcontent
returned null. Now it returns an empty string fixing the incosistency
2014-04-13 18:12:17 -07:00
itxx00 636adf251c Fix bug #66482, replace wrong item name 'priority' with 'process.priority' in php-fpm.conf 2014-04-13 17:30:50 -07:00
Stanislav Malyshev 3a2660b302 Fix windows build 2014-04-13 17:02:21 -07:00
Boro Sitnikovski 8c88b6e81c Fix bug #66721
Add NULL check to php_date_parse_tzfile's retval
2014-04-13 15:51:55 -07:00
Jeff Trawick 442264ffd6 fix apr_psprintf format string from e0df4e3dba 2014-04-13 15:36:43 -07:00
Gabor Buella 1010200da5 Fixed bug #67024 - getimagesize should recognize BMP files with negative height 2014-04-13 15:17:04 -07:00
Bob Weinand beda5093b4 Reverted to 5a0da281e5
Discussion: http://news.php.net/php.cvs/76836
2014-04-13 23:01:31 +02:00
Bob Weinand f07e37c96d Forgot title in phpt for bug #67064 2014-04-13 19:34:17 +02:00
Bob Weinand 2f3056fecc Updated NEWS 2014-04-13 19:32:51 +02:00
Bob Weinand 1a4a9eede5 Fix bug #67064 in a BC safe way
You can use an optional parameter now when implementing the Countable interface
to get the $mode passed to count().
2014-04-13 19:24:12 +02:00
Ferenc Kovacs 5a0da281e5 fix typo 2014-04-13 01:55:55 +02:00
Bob Weinand edd90e5ae3 Made usage of php_hash_environment useful by updating instead of just adding argc 2014-04-12 23:53:21 +02:00
Popa Adrian Marius 1c3ed86211 Cleanup $ is not needed for git 2014-04-10 17:42:32 +03:00
Ferenc Kovacs 9540ced221 fix typo 2014-04-10 07:05:07 +02:00
Ferenc Kovacs 2c8aeda6dc abstract namespace for unix sockets is a linux only feature 2014-04-09 19:01:01 +02:00
Popa Adrian Marius 0ea731fc83 cleanup 2014-04-08 17:51:06 +03:00
Popa Adrian Marius cc20351134 Fixes bug #66071: isc_interprete is unsafe and deprecated , it is replaced with fb_iterpret 2014-04-08 17:50:41 +03:00
Anatol Belski a0beddf5e9 Fixed bug #66084 simplexml_load_string() mangles empty node name 2014-04-05 09:46:24 +02:00
Stanislav Malyshev 7e5de3a1ce cleanup NEWS 2014-04-03 15:54:00 -07:00
Michael Wallner d08b4dbf23 Fix Bug #66736 fpassthru broken 2014-04-03 10:40:06 +02:00
Michael Wallner 7ab5c593f7 Fix bug #66182 exit in stream filter produces segfault
Unfortunately, a segv caused by exit cannot be tested reliably.
2014-04-03 09:07:35 +02:00
Michael Wallner 1ec83d44a1 Fixed bug #61019 (Out of memory on command stream_get_contents) 2014-04-02 15:36:39 +02:00
Michael Wallner 91a9d24aa3 Fix bug #64330
stream_socket_server() creates wrong Abstract Namespace UNIX sockets
2014-04-02 11:09:26 +02:00
Anatol Belski f244513fc0 updated NEWS 2014-04-01 10:11:40 +02:00
Anatol Belski fca1501ed6 added test for bug #53965 2014-04-01 10:08:08 +02:00
Anatol Belski 3cb056f523 Fixed bug #53965 <xsl:include> cannot find files w/ relative paths when loaded w/ "file://" 2014-04-01 10:07:18 +02:00
Remi Collet fca331cae9 NEWS 2014-03-31 16:57:02 +02:00
Remi Collet 2c204a55af Fixed Bug #66987 Memory corruption in fileinfo ext (bigendian)
On little endian:
	map->p == php_magic_database
	map->magic[i] = pointer into the map

	map->p == NULL
	map->magic[i] = pointer to allocated memory

On big endian (ppc64, s390x, ...):
	map->p != php_magic_database and map->p != NULL
        map->magic[i] = pointer into a copy of the map

Trying to efree pointer in the later cause memory corruption
Thanks to dkatulek / Red Hat for the report.
2014-03-31 16:50:47 +02:00
Anatol Belski 1283722589 update lib versions 2014-03-27 18:18:06 +01:00
Derick Rethans 170cf3ec00 - Updated to version 2014.2 (2014b) 2014-03-25 12:17:14 +00:00
Remi Collet 3616db6d38 NEWS 2014-03-25 11:00:47 +01:00
Remi Collet 4374a52e9d Fixed bug #66946 extensive backtracking in awk rule regular expression
CVE-2013-7345

Applied upstream patch:
https://github.com/file/file/commit/ef2329cf71acb59204dd981e2c6cce6c81fe467c

Add the magicdata.patch to track patches applied to upstream data file.
2014-03-25 11:00:33 +01:00
Remi Collet 1df558c6a0 Fixed bug #66946 extensive backtracking in awk rule regular expression
CVE-2013-7345

Applied upstream patch:
https://github.com/file/file/commit/ef2329cf71acb59204dd981e2c6cce6c81fe467c

Add the magicdata.patch to track patches applied to upstream data file.
2014-03-25 10:58:50 +01:00
Anatol Belski 6612e1ba6a more fixes related to bug #65715 2014-03-24 19:15:02 +01:00
Anatol Belski 5efda763be updated NEWS 2014-03-24 10:28:21 +01:00
Anatol Belski 17a57ad980 Fixed bug #65715 php5embed.lib isn't provided anymore 2014-03-24 10:24:37 +01:00
Stanislav Malyshev 9b88bc494e prep for 5.4.27 rc1 2014-03-18 23:19:09 -07:00
Derick Rethans b30304fb78 - Updated to version 2014.1 (2014a) 2014-03-18 14:48:55 +00:00
Mateusz Kocielski 497b918e62 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed off-by-one in php_url_parse_ex

Conflicts:
	ext/standard/url.c
2014-03-18 08:54:57 +01:00
Mateusz Kocielski 46566b78c9 Fixed off-by-one in php_url_parse_ex
Change order of condition, previously pointer could be derefrenced before
bound check was done.
2014-03-18 08:48:41 +01:00
Remi Collet 87a87c6682 NEWS 2014-03-14 09:51:53 +01:00
Remi Collet 17f6391bf8 Fixed Bug #66833 Default digest algo is still MD5
Switch to SHA1, which match internal openssl hardcoded algo.

In most case, won't even be noticed
- priority on user input (default_md)
- fallback on system config
- fallback on this default value

Recent system reject MD5 digest, noticed in bug36732.phpt failure.

While SHA1 is better than MD5, SHA256 is recommenced,
and defined as default algo in provided configuration on
recent system (Fedora 21, RHEL-7, ...). But the idea is to
keep in sync with openssl internal value for PHP internal value.
2014-03-14 09:50:15 +01:00
Michael Meyer 737c187013 Typo fix: sicret -> secret 2014-03-13 12:37:25 +02:00
Tjerk Meesters ddd7ed9b24 Removed bogus loops 2014-03-11 19:08:18 +08:00
Anatol Belski 1a624e27a6 restored the old code in 5.4/5 related to bug #66872
The crash is reproducable in 5.6+ only, so 5.4 and 5.5 are fine
with the old code.
2014-03-11 11:50:14 +01:00
Christopher Jones 4dc8610d34 Merge branch 'PHP-5.4' of https://git.php.net/repository/php-src into PHP-5.4
# By Pierre Joye
# Via Pierre Joye
* 'PHP-5.4' of https://git.php.net/repository/php-src:
  fix #66872, invalid argument crashes gmp_testbit
  fix #66872, invalid argument crashes gmp_testbit
  add vc12 (2013)
2014-03-10 16:46:39 -07:00
Pierre Joye 8391277fb8 Merge branch 'PHP-5.4' of git.php.net:php-src into PHP-5.4
# By Anatol Belski
# Via Anatol Belski
* 'PHP-5.4' of git.php.net:php-src:
  updated libmagic.patch
2014-03-10 16:31:09 +01:00
Anatol Belski b9d494a33b updated libmagic.patch 2014-03-10 14:12:20 +01:00
Pierre Joye 28fa31d6e5 fix #66872, invalid argument crashes gmp_testbit 2014-03-10 12:07:58 +01:00
Pierre Joye af41914e15 fix #66872, invalid argument crashes gmp_testbit 2014-03-10 12:06:40 +01:00
Pierre Joye cedc718f73 Merge branch 'PHP-5.4' of git.php.net:php-src into PHP-5.4
# By Dmitry Panin (1) and Remi Collet (1)
# Via Nikita Popov
* 'PHP-5.4' of git.php.net:php-src:
  Fix HTML entity table generation
  Set default Digest Message to use SHA1 instead of MD5 in openssl tests as MD5 signature are now rejected by newer openssl Version.
2014-03-10 12:04:04 +01:00
Dmitry Panin e2fc6b52f0 Fix HTML entity table generation 2014-03-06 23:10:31 +01:00
Remi Collet 721b9a7c8d Set default Digest Message to use SHA1 instead of MD5 in openssl tests
as MD5 signature are now rejected by newer openssl Version.

Noticed in RHEL-7 and Fedora 21 build.
2014-03-06 10:14:08 +01:00
Pierre Joye e590aceb5a Merge branch 'PHP-5.4' of git.php.net:php-src into PHP-5.4
# By Anatol Belski (22) and others
# Via Derick Rethans (5) and others
* 'PHP-5.4' of git.php.net:php-src: (176 commits)
  NEWS
  Fixed Bug #66820 out-of-bounds memory access in fileinfo
  Improves fix for memory leak, keep in sync with upstream.
  Updated news for #60602
  proc_open(): separate environment values that aren't strings
  Updated NEWS for #66535
  Fixed test case title
  [bug 66535] X-PHP-Originating-Script adds newline if no custom headers are given
  man page: long option name is --strip, not --stripped
  --global have be removed in 5.2
  NEWS
  test for bug #66762
  Fixed Bug #66762 Segfault in mysqli_stmt::bind_result() when link closed
  fix tests broken by 633f898f15
  add news entry
  add clear_env option to FPM config
  Reduce test noise on cross Oracle client <-> server version tests. This fix is already in PHP 5.6+
  Reduce test noise in cross Oracle client <-> server version testing. This change is already in PHP 5.6+
  fixed macro
  Make sure value is initialized
  ...
2014-03-05 10:32:42 +01:00
Remi Collet c2a9f73c99 NEWS 2014-03-04 20:35:56 +01:00
Remi Collet a33759fd27 Fixed Bug #66820 out-of-bounds memory access in fileinfo
Upstream fix:
https://github.com/glensc/file/commit/447558595a3650db2886cd2f416ad0beba965801

Notice, test changed, with upstream agreement:
-define OFFSET_OOB(n, o, i)	((n) < (o) || (i) >= ((n) - (o)))
+define OFFSET_OOB(n, o, i)	((n) < (o) || (i) >  ((n) - (o)))
2014-03-04 20:32:52 +01:00
Remi Collet 731013ee8e Improves fix for memory leak, keep in sync with upstream.
Previous fix:
http://git.php.net/?p=php-src.git;a=commitdiff;h=10eb0070700382f966bf260e44135e1f724a15d2

Upstream fix:
https://github.com/glensc/file/commit/c0c0032b9e9eb57b91fefef905a3b018bab492d9
2014-03-04 13:41:37 +01:00
Tjerk Meesters 1533f98afd Updated news for #60602 2014-03-03 05:54:09 +08:00
Tjerk Meesters e73c05b75e proc_open(): separate environment values that aren't strings
Added a test case
2014-03-03 05:49:52 +08:00
Tjerk Meesters 362b70a32c Updated NEWS for #66535 2014-03-01 08:47:32 +08:00
Tjerk Meesters eca13f7909 Fixed test case title 2014-02-28 22:27:32 +08:00
Tjerk Meesters 79b3c2a744 [bug 66535] X-PHP-Originating-Script adds newline if no custom headers are given
A newline is added to the mail headers when mail.add_x_header is used and no other headers are passed to mail().

The scenario in which custom headers are used was already fixed in #48620, back in 2009.
2014-02-28 22:22:07 +08:00
Remi Collet b1df743b7a man page: long option name is --strip, not --stripped 2014-02-28 08:12:03 +01:00
Remi Collet c73b0543f1 --global have be removed in 5.2 2014-02-28 08:10:01 +01:00
Remi Collet 33d372a45f NEWS 2014-02-27 08:49:08 +01:00
Remi Collet 816a5d2072 test for bug #66762 2014-02-27 08:48:01 +01:00
Remi Collet 9137acc7ec Fixed Bug #66762 Segfault in mysqli_stmt::bind_result() when link closed
Each new mysqli_stmt now increase the refcount of the link object.
So the link is really destroy after all statements.

Only implemented with libmysqlclient, as mysqlnd already implement
this internally.

So, libmysqlclient and mysqlnd have the same behavior.
2014-02-27 08:45:16 +01:00
Ferenc Kovacs bd961f3e87 fix tests broken by 633f898f15 2014-02-27 02:31:42 +01:00
Antony Dovgal 4d9c556b5d add news entry 2014-02-25 12:14:50 +04:00
Paul Annesley eb6941e902 add clear_env option to FPM config
This makes it possible to leave the envoronment as is on startup and
pass all the variables to the workers.
The default value of clear_env is "yes", preserving previous behaviour.
Patch by Paul Annesley.
2014-02-25 12:12:09 +04:00
Christopher Jones ee7671afb5 Reduce test noise on cross Oracle client <-> server version tests.
This fix is already in PHP 5.6+
2014-02-24 17:01:30 -08:00
Christopher Jones 8cdefd3d10 Reduce test noise in cross Oracle client <-> server version testing.
This change is already in PHP 5.6+
2014-02-24 16:33:41 -08:00
Anatol Belski c6a4a7cad6 fixed macro 2014-02-24 10:12:18 +01:00
Johannes Schlüter 3f258e6b46 Make sure value is initialized 2014-02-23 14:55:29 +01:00
Johannes Schlüter 756ee95605 We can't dereference dbh if it is NULL 2014-02-23 14:18:24 +01:00
Anatol Belski ce1fd72776 updated libmagic.patch in 5.4/5 2014-02-20 19:00:05 +01:00
Anatol Belski 10eb007070 fixed leak introduced after CVE/upgrade 2014-02-20 18:53:53 +01:00
Bob Weinand afa03a470e Use nicer output for characters < 32 and > 126 in exception strings
Using question marks might confuse more than it helps.
Users are wondering what happened to their string...
2014-02-20 17:39:58 +01:00
Daniel Lowrey 633f898f15 Skip failing tests when EC unavailable (RHEL) 2014-02-19 03:57:37 -07:00
Anatol Belski a289b37f48 updated libmagic.patch 2014-02-18 19:08:16 +01:00
Stanislav Malyshev ee4b3892f8 update news with CVE 2014-02-18 08:36:51 -08:00
Remi Collet 9f449df1e4 NEWS 2014-02-18 13:56:58 +01:00
Remi Collet 89f864c547 Fixed Bug #66731 file: infinite recursion
Upstream commit (available in file-5.17)

https://github.com/glensc/file/commit/3c081560c23f20b2985c285338b52c7aae9fdb0f
https://github.com/glensc/file/commit/cc9e74dfeca5265ad725acc926ef0b8d2a18ee70
2014-02-18 13:54:33 +01:00
Stanislav Malyshev c612440e0f 5.4.27 now 2014-02-17 21:19:25 -08:00
Pierre Joye 9b54901ffb add vc12 (2013) 2013-11-04 22:19:02 +01:00
Kevin Israel 82a4f1a1a2 Fix #66021 (Blank line inside empty array/object)
Changed json_encode() so that when the JSON_PRETTY_PRINT option is specified,
the pair of linefeeds immediately after an opening bracket and before the
corresponding closing bracket is omitted when the array or object contains no
elements or accessible properties (and hence would have a blank line between
the brackets).
2013-11-02 15:59:11 -04:00
296 changed files with 29158 additions and 23137 deletions

No files matched your search

+188 -3
View File
@@ -1,13 +1,197 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 2014, PHP 5.4.26
26 Jun 2014, PHP 5.4.30
?? ??? 2014, PHP 5.4.26
- 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).
(CVE-2014-3981) (Remi)
. 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 #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).
(Freek Lijten)
- Date:
. Fixed bug #66721 (__wakeup of DateTime segfaults when invalid object data is
supplied). (Boro Sitnikovski)
- Embed:
. Fixed bug #65715 (php5embed.lib isn't provided anymore). (Anatol)
- Fileinfo:
. Fixed bug #66987 (Memory corruption in fileinfo ext / bigendian).
(Remi)
- 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
JSON_PRETTY_PRINT is set). (Kevin Israel)
- LDAP:
. Fixed issue with null bytes in LDAP bindings. (Matthew Daley)
- OpenSSL:
. Fix bug #66942 (memory leak in openssl_seal()). (Chuan Ma)
. Fix bug #66952 (memory leak in openssl_open()). (Chuan Ma)
- SimpleXML:
. Fixed bug #66084 (simplexml_load_string() mangles empty node name)
(Anatol)
- XSL:
. Fixed bug #53965 (<xsl:include> cannot find files with relative paths
when loaded with "file://"). (Anatol)
- Apache2 Handler SAPI:
. Fixed Apache log issue caused by APR's lack of support for %zu
(APR issue https://issues.apache.org/bugzilla/show_bug.cgi?id=56120).
(Jeff Trawick)
03 Apr 2014, PHP 5.4.27
- Core:
. Fixed bug #60602 (proc_open() changes environment array) (Tjerk)
- Fileinfo:
. Fixed bug #66946 (fileinfo: extensive backtracking in awk rule regular
expression). (CVE-2013-7345) (Remi)
- FPM:
. Added clear_env configuration directive to disable clearenv() call.
(Github PR# 598, Paul Annesley)
- GMP
. Fixed bug #66872 (invalid argument crashes gmp_testbit) (Pierre)
- Mail:
. Fixed bug #66535 (Don't add newline after X-PHP-Originating-Script) (Tjerk)
- MySQLi:
. Fixed bug #66762 (Segfault in mysqli_stmt::bind_result() when link closed)
(Remi)
- Openssl:
. Fixed bug #66833 (Default disgest algo is still MD5, switch to SHA1). (Remi)
06 Mar 2014, PHP 5.4.26
- JSON:
. Fixed bug #65753 (JsonSerializeable couldn't implement on module extension)
(chobieeee@php.net)
- Fileinfo:
. Fixed bug #66731 (file: infinite recursion). (CVE-2014-1943) (Remi)
. Fixed bug #66820 (out-of-bounds memory access in fileinfo). (Remi)
- LDAP:
. Implemented ldap_modify_batch (https://wiki.php.net/rfc/ldap_modify_batch).
(Ondřej Hošek)
@@ -609,7 +793,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.
+1 -1
View File
@@ -2,7 +2,7 @@
#define TSRM_CONFIG_COMMON_H
#ifndef __CYGWIN__
# if WINNT|WIN32
# ifdef _WIN32
# define TSRM_WIN32
# endif
#endif
Executable → Regular
+5
View File
@@ -350,6 +350,9 @@ 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.
- Manipulated serialization strings for objects implementing Serializable by
replacing "C:" with "O:" at the start will now produce an error.
==============================
5. Changes to existing classes
==============================
@@ -370,6 +373,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
========================
+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;
}
}
/* }}} */
+58 -3
View File
@@ -360,6 +360,11 @@ ZEND_METHOD(error_exception, getSeverity)
} \
}
#define TRACE_ARG_APPEND(vallen) \
*str = (char*)erealloc(*str, *len + 1 + vallen); \
memmove((*str) + *len - l_added + 1 + vallen, (*str) + *len - l_added + 1, l_added);
/* }}} */
static int _build_trace_args(zval **arg TSRMLS_DC, int num_args, va_list args, zend_hash_key *hash_key) /* {{{ */
@@ -371,7 +376,7 @@ static int _build_trace_args(zval **arg TSRMLS_DC, int num_args, va_list args, z
len = va_arg(args, int*);
/* the trivial way would be to do:
* conver_to_string_ex(arg);
* convert_to_string_ex(arg);
* append it and kill the now tmp arg.
* but that could cause some E_NOTICE and also damn long lines.
*/
@@ -394,8 +399,58 @@ static int _build_trace_args(zval **arg TSRMLS_DC, int num_args, va_list args, z
l_added += 3 + 1;
}
while (--l_added) {
if ((*str)[*len - l_added] < 32) {
(*str)[*len - l_added] = '?';
unsigned char chr = (*str)[*len - l_added];
if (chr < 32 || chr == '\\' || chr > 126) {
(*str)[*len - l_added] = '\\';
switch (chr) {
case '\n':
TRACE_ARG_APPEND(1);
(*str)[++(*len) - l_added] = 'n';
break;
case '\r':
TRACE_ARG_APPEND(1);
(*str)[++(*len) - l_added] = 'r';
break;
case '\t':
TRACE_ARG_APPEND(1);
(*str)[++(*len) - l_added] = 't';
break;
case '\f':
TRACE_ARG_APPEND(1);
(*str)[++(*len) - l_added] = 'f';
break;
case '\v':
TRACE_ARG_APPEND(1);
(*str)[++(*len) - l_added] = 'v';
break;
#ifndef PHP_WIN32
case '\e':
#else
case VK_ESCAPE:
#endif
TRACE_ARG_APPEND(1);
(*str)[++(*len) - l_added] = 'e';
break;
case '\\':
TRACE_ARG_APPEND(1);
(*str)[++(*len) - l_added] = '\\';
break;
default:
TRACE_ARG_APPEND(3);
(*str)[*len - l_added + 1] = 'x';
if ((chr >> 4) < 10) {
(*str)[*len - l_added + 2] = (chr >> 4) + '0';
} else {
(*str)[*len - l_added + 2] = (chr >> 4) + 'A' - 10;
}
if (chr % 16 < 10) {
(*str)[*len - l_added + 3] = chr % 16 + '0';
} else {
(*str)[*len - l_added + 3] = chr % 16 + 'A' - 10;
}
*len += 3;
}
}
}
break;
+1 -1
View File
@@ -57,7 +57,7 @@ ZEND_API void zend_html_putc(char c)
ZEND_API void zend_html_puts(const char *s, uint len TSRMLS_DC)
{
const unsigned char *ptr = (const unsigned char*)s, *end = ptr + len;
unsigned char *filtered;
unsigned char *filtered = NULL;
size_t filtered_len;
if (LANG_SCNG(output_filter)) {
+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
@@ -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) {
+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=26
PHP_EXTRA_VERSION="-dev"
PHP_RELEASE_VERSION=30
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) {
+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===
+2
View File
@@ -253,6 +253,8 @@ PHP_FUNCTION(curl_multi_getcontent)
smart_str_0(&ch->handlers->write->buf);
RETURN_STRINGL(ch->handlers->write->buf.c, ch->handlers->write->buf.len, 1);
}
RETURN_EMPTY_STRING();
}
/* }}} */
+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--
+106 -99
View File
@@ -1,4 +1,4 @@
/* Generated by re2c 0.13.5 on Sat Jan 25 15:48:30 2014 */
/* Generated by re2c 0.13.5 on Tue May 13 16:52:44 2014 */
#line 1 "ext/date/lib/parse_date.re"
/*
+----------------------------------------------------------------------+
@@ -403,9 +403,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;
@@ -872,11 +875,11 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper)
std:
s->tok = cursor;
s->len = 0;
#line 998 "ext/date/lib/parse_date.re"
#line 1001 "ext/date/lib/parse_date.re"
#line 880 "ext/date/lib/parse_date.c"
#line 883 "ext/date/lib/parse_date.c"
{
YYCTYPE yych;
unsigned int yyaccept = 0;
@@ -996,7 +999,7 @@ std:
}
yy2:
YYDEBUG(2, *YYCURSOR);
#line 1084 "ext/date/lib/parse_date.re"
#line 1087 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("firstdayof | lastdayof");
TIMELIB_INIT;
@@ -1012,7 +1015,7 @@ yy2:
TIMELIB_DEINIT;
return TIMELIB_LF_DAY_OF_MONTH;
}
#line 1016 "ext/date/lib/parse_date.c"
#line 1019 "ext/date/lib/parse_date.c"
yy3:
YYDEBUG(3, *YYCURSOR);
++YYCURSOR;
@@ -1035,7 +1038,7 @@ yy3:
}
yy4:
YYDEBUG(4, *YYCURSOR);
#line 1678 "ext/date/lib/parse_date.re"
#line 1681 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("tzcorrection | tz");
@@ -1048,7 +1051,7 @@ yy4:
TIMELIB_DEINIT;
return TIMELIB_TIMEZONE;
}
#line 1052 "ext/date/lib/parse_date.c"
#line 1055 "ext/date/lib/parse_date.c"
yy5:
YYDEBUG(5, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1359,12 +1362,12 @@ yy12:
if (yych <= '9') goto yy1385;
yy13:
YYDEBUG(13, *YYCURSOR);
#line 1773 "ext/date/lib/parse_date.re"
#line 1776 "ext/date/lib/parse_date.re"
{
add_error(s, "Unexpected character");
goto std;
}
#line 1368 "ext/date/lib/parse_date.c"
#line 1371 "ext/date/lib/parse_date.c"
yy14:
YYDEBUG(14, *YYCURSOR);
yych = *++YYCURSOR;
@@ -2421,11 +2424,11 @@ yy49:
if (yych <= '9') goto yy55;
yy50:
YYDEBUG(50, *YYCURSOR);
#line 1762 "ext/date/lib/parse_date.re"
#line 1765 "ext/date/lib/parse_date.re"
{
goto std;
}
#line 2429 "ext/date/lib/parse_date.c"
#line 2432 "ext/date/lib/parse_date.c"
yy51:
YYDEBUG(51, *YYCURSOR);
yych = *++YYCURSOR;
@@ -2434,12 +2437,12 @@ yy52:
YYDEBUG(52, *YYCURSOR);
++YYCURSOR;
YYDEBUG(53, *YYCURSOR);
#line 1767 "ext/date/lib/parse_date.re"
#line 1770 "ext/date/lib/parse_date.re"
{
s->pos = cursor; s->line++;
goto std;
}
#line 2443 "ext/date/lib/parse_date.c"
#line 2446 "ext/date/lib/parse_date.c"
yy54:
YYDEBUG(54, *YYCURSOR);
yych = *++YYCURSOR;
@@ -2826,7 +2829,7 @@ yy72:
if (yych == 's') goto yy74;
yy73:
YYDEBUG(73, *YYCURSOR);
#line 1746 "ext/date/lib/parse_date.re"
#line 1749 "ext/date/lib/parse_date.re"
{
timelib_ull i;
DEBUG_OUTPUT("relative");
@@ -2841,7 +2844,7 @@ yy73:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
#line 2845 "ext/date/lib/parse_date.c"
#line 2848 "ext/date/lib/parse_date.c"
yy74:
YYDEBUG(74, *YYCURSOR);
yych = *++YYCURSOR;
@@ -3603,7 +3606,7 @@ yy166:
}
yy167:
YYDEBUG(167, *YYCURSOR);
#line 1609 "ext/date/lib/parse_date.re"
#line 1612 "ext/date/lib/parse_date.re"
{
const timelib_relunit* relunit;
DEBUG_OUTPUT("daytext");
@@ -3620,7 +3623,7 @@ yy167:
TIMELIB_DEINIT;
return TIMELIB_WEEKDAY;
}
#line 3624 "ext/date/lib/parse_date.c"
#line 3627 "ext/date/lib/parse_date.c"
yy168:
YYDEBUG(168, *YYCURSOR);
yych = *++YYCURSOR;
@@ -4140,7 +4143,7 @@ yy193:
}
yy194:
YYDEBUG(194, *YYCURSOR);
#line 1668 "ext/date/lib/parse_date.re"
#line 1671 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("monthtext");
TIMELIB_INIT;
@@ -4149,7 +4152,7 @@ yy194:
TIMELIB_DEINIT;
return TIMELIB_DATE_TEXT;
}
#line 4153 "ext/date/lib/parse_date.c"
#line 4156 "ext/date/lib/parse_date.c"
yy195:
YYDEBUG(195, *YYCURSOR);
++YYCURSOR;
@@ -4200,7 +4203,7 @@ yy198:
}
yy199:
YYDEBUG(199, *YYCURSOR);
#line 1414 "ext/date/lib/parse_date.re"
#line 1417 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("datetextual | datenoyear");
@@ -4213,7 +4216,7 @@ yy199:
TIMELIB_DEINIT;
return TIMELIB_DATE_TEXT;
}
#line 4217 "ext/date/lib/parse_date.c"
#line 4220 "ext/date/lib/parse_date.c"
yy200:
YYDEBUG(200, *YYCURSOR);
yyaccept = 6;
@@ -4482,7 +4485,7 @@ yy222:
}
yy223:
YYDEBUG(223, *YYCURSOR);
#line 1716 "ext/date/lib/parse_date.re"
#line 1719 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("dateshortwithtimeshort | dateshortwithtimelong | dateshortwithtimelongtz");
@@ -4511,7 +4514,7 @@ yy223:
TIMELIB_DEINIT;
return TIMELIB_SHORTDATE_WITH_TIME;
}
#line 4515 "ext/date/lib/parse_date.c"
#line 4518 "ext/date/lib/parse_date.c"
yy224:
YYDEBUG(224, *YYCURSOR);
yyaccept = 7;
@@ -5209,7 +5212,7 @@ yy278:
YYDEBUG(278, *YYCURSOR);
++YYCURSOR;
YYDEBUG(279, *YYCURSOR);
#line 1692 "ext/date/lib/parse_date.re"
#line 1695 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("dateshortwithtimeshort12 | dateshortwithtimelong12");
TIMELIB_INIT;
@@ -5232,7 +5235,7 @@ yy278:
TIMELIB_DEINIT;
return TIMELIB_SHORTDATE_WITH_TIME;
}
#line 5236 "ext/date/lib/parse_date.c"
#line 5239 "ext/date/lib/parse_date.c"
yy280:
YYDEBUG(280, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5410,7 +5413,7 @@ yy294:
++YYCURSOR;
yy295:
YYDEBUG(295, *YYCURSOR);
#line 1386 "ext/date/lib/parse_date.re"
#line 1389 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("datenoday");
@@ -5423,7 +5426,7 @@ yy295:
TIMELIB_DEINIT;
return TIMELIB_DATE_NO_DAY;
}
#line 5427 "ext/date/lib/parse_date.c"
#line 5430 "ext/date/lib/parse_date.c"
yy296:
YYDEBUG(296, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6643,7 +6646,7 @@ yy362:
if (yych <= '9') goto yy365;
yy364:
YYDEBUG(364, *YYCURSOR);
#line 1530 "ext/date/lib/parse_date.re"
#line 1533 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("pgtextshort");
@@ -6656,7 +6659,7 @@ yy364:
TIMELIB_DEINIT;
return TIMELIB_PG_TEXT;
}
#line 6660 "ext/date/lib/parse_date.c"
#line 6663 "ext/date/lib/parse_date.c"
yy365:
YYDEBUG(365, *YYCURSOR);
yych = *++YYCURSOR;
@@ -7294,7 +7297,7 @@ yy392:
}
yy393:
YYDEBUG(393, *YYCURSOR);
#line 1588 "ext/date/lib/parse_date.re"
#line 1591 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("ago");
TIMELIB_INIT;
@@ -7314,7 +7317,7 @@ yy393:
TIMELIB_DEINIT;
return TIMELIB_AGO;
}
#line 7318 "ext/date/lib/parse_date.c"
#line 7321 "ext/date/lib/parse_date.c"
yy394:
YYDEBUG(394, *YYCURSOR);
yyaccept = 5;
@@ -9064,7 +9067,7 @@ yy454:
++YYCURSOR;
yy455:
YYDEBUG(455, *YYCURSOR);
#line 1291 "ext/date/lib/parse_date.re"
#line 1294 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("iso8601date4 | iso8601date2 | iso8601dateslash | dateslash");
TIMELIB_INIT;
@@ -9075,7 +9078,7 @@ yy455:
TIMELIB_DEINIT;
return TIMELIB_ISO_DATE;
}
#line 9079 "ext/date/lib/parse_date.c"
#line 9082 "ext/date/lib/parse_date.c"
yy456:
YYDEBUG(456, *YYCURSOR);
yyaccept = 0;
@@ -9635,7 +9638,7 @@ yy475:
}
yy476:
YYDEBUG(476, *YYCURSOR);
#line 1428 "ext/date/lib/parse_date.re"
#line 1431 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("datenoyearrev");
TIMELIB_INIT;
@@ -9646,7 +9649,7 @@ yy476:
TIMELIB_DEINIT;
return TIMELIB_DATE_TEXT;
}
#line 9650 "ext/date/lib/parse_date.c"
#line 9653 "ext/date/lib/parse_date.c"
yy477:
YYDEBUG(477, *YYCURSOR);
yyaccept = 10;
@@ -9787,7 +9790,7 @@ yy488:
YYDEBUG(488, *YYCURSOR);
++YYCURSOR;
YYDEBUG(489, *YYCURSOR);
#line 1146 "ext/date/lib/parse_date.re"
#line 1149 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("timetiny12 | timeshort12 | timelong12");
TIMELIB_INIT;
@@ -9803,7 +9806,7 @@ yy488:
TIMELIB_DEINIT;
return TIMELIB_TIME12;
}
#line 9807 "ext/date/lib/parse_date.c"
#line 9810 "ext/date/lib/parse_date.c"
yy490:
YYDEBUG(490, *YYCURSOR);
yyaccept = 11;
@@ -9816,7 +9819,7 @@ yy490:
}
yy491:
YYDEBUG(491, *YYCURSOR);
#line 1183 "ext/date/lib/parse_date.re"
#line 1186 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("timeshort24 | timelong24 | iso8601long");
@@ -9841,7 +9844,7 @@ yy491:
TIMELIB_DEINIT;
return TIMELIB_TIME24_WITH_ZONE;
}
#line 9845 "ext/date/lib/parse_date.c"
#line 9848 "ext/date/lib/parse_date.c"
yy492:
YYDEBUG(492, *YYCURSOR);
yyaccept = 11;
@@ -10151,7 +10154,7 @@ yy523:
YYDEBUG(523, *YYCURSOR);
++YYCURSOR;
YYDEBUG(524, *YYCURSOR);
#line 1163 "ext/date/lib/parse_date.re"
#line 1166 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("mssqltime");
TIMELIB_INIT;
@@ -10170,7 +10173,7 @@ yy523:
TIMELIB_DEINIT;
return TIMELIB_TIME24_WITH_ZONE;
}
#line 10174 "ext/date/lib/parse_date.c"
#line 10177 "ext/date/lib/parse_date.c"
yy525:
YYDEBUG(525, *YYCURSOR);
yyaccept = 11;
@@ -10276,7 +10279,7 @@ yy534:
if (yych <= '9') goto yy541;
yy535:
YYDEBUG(535, *YYCURSOR);
#line 1345 "ext/date/lib/parse_date.re"
#line 1348 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("datefull");
@@ -10290,7 +10293,7 @@ yy535:
TIMELIB_DEINIT;
return TIMELIB_DATE_FULL;
}
#line 10294 "ext/date/lib/parse_date.c"
#line 10297 "ext/date/lib/parse_date.c"
yy536:
YYDEBUG(536, *YYCURSOR);
yych = *++YYCURSOR;
@@ -11027,7 +11030,7 @@ yy605:
YYDEBUG(606, *YYCURSOR);
++YYCURSOR;
YYDEBUG(607, *YYCURSOR);
#line 1360 "ext/date/lib/parse_date.re"
#line 1363 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("pointed date YYYY");
TIMELIB_INIT;
@@ -11038,7 +11041,7 @@ yy605:
TIMELIB_DEINIT;
return TIMELIB_DATE_FULL_POINTED;
}
#line 11042 "ext/date/lib/parse_date.c"
#line 11045 "ext/date/lib/parse_date.c"
yy608:
YYDEBUG(608, *YYCURSOR);
yyaccept = 11;
@@ -11074,7 +11077,7 @@ yy611:
if (yych <= '9') goto yy605;
yy612:
YYDEBUG(612, *YYCURSOR);
#line 1372 "ext/date/lib/parse_date.re"
#line 1375 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("pointed date YY");
@@ -11087,7 +11090,7 @@ yy612:
TIMELIB_DEINIT;
return TIMELIB_DATE_FULL_POINTED;
}
#line 11091 "ext/date/lib/parse_date.c"
#line 11094 "ext/date/lib/parse_date.c"
yy613:
YYDEBUG(613, *YYCURSOR);
yyaccept = 11;
@@ -11728,7 +11731,7 @@ yy656:
}
yy657:
YYDEBUG(657, *YYCURSOR);
#line 1331 "ext/date/lib/parse_date.re"
#line 1334 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("gnudateshort");
@@ -11741,7 +11744,7 @@ yy657:
TIMELIB_DEINIT;
return TIMELIB_ISO_DATE;
}
#line 11745 "ext/date/lib/parse_date.c"
#line 11748 "ext/date/lib/parse_date.c"
yy658:
YYDEBUG(658, *YYCURSOR);
yyaccept = 13;
@@ -11847,7 +11850,7 @@ yy666:
}
yy667:
YYDEBUG(667, *YYCURSOR);
#line 1275 "ext/date/lib/parse_date.re"
#line 1278 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("americanshort | american");
@@ -11862,7 +11865,7 @@ yy667:
TIMELIB_DEINIT;
return TIMELIB_AMERICAN;
}
#line 11866 "ext/date/lib/parse_date.c"
#line 11869 "ext/date/lib/parse_date.c"
yy668:
YYDEBUG(668, *YYCURSOR);
yyaccept = 14;
@@ -12095,7 +12098,7 @@ yy700:
if (yych <= ':') goto yy704;
yy701:
YYDEBUG(701, *YYCURSOR);
#line 1558 "ext/date/lib/parse_date.re"
#line 1561 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("clf");
@@ -12115,7 +12118,7 @@ yy701:
TIMELIB_DEINIT;
return TIMELIB_CLF;
}
#line 12119 "ext/date/lib/parse_date.c"
#line 12122 "ext/date/lib/parse_date.c"
yy702:
YYDEBUG(702, *YYCURSOR);
yych = *++YYCURSOR;
@@ -12667,7 +12670,7 @@ yy763:
}
yy764:
YYDEBUG(764, *YYCURSOR);
#line 1303 "ext/date/lib/parse_date.re"
#line 1306 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("iso8601date2");
@@ -12680,7 +12683,7 @@ yy764:
TIMELIB_DEINIT;
return TIMELIB_ISO_DATE;
}
#line 12684 "ext/date/lib/parse_date.c"
#line 12687 "ext/date/lib/parse_date.c"
yy765:
YYDEBUG(765, *YYCURSOR);
yych = *++YYCURSOR;
@@ -12719,7 +12722,7 @@ yy771:
YYDEBUG(771, *YYCURSOR);
++YYCURSOR;
YYDEBUG(772, *YYCURSOR);
#line 1544 "ext/date/lib/parse_date.re"
#line 1547 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("pgtextreverse");
@@ -12732,7 +12735,7 @@ yy771:
TIMELIB_DEINIT;
return TIMELIB_PG_TEXT;
}
#line 12736 "ext/date/lib/parse_date.c"
#line 12739 "ext/date/lib/parse_date.c"
yy773:
YYDEBUG(773, *YYCURSOR);
yych = *++YYCURSOR;
@@ -12870,7 +12873,7 @@ yy783:
}
yy784:
YYDEBUG(784, *YYCURSOR);
#line 1579 "ext/date/lib/parse_date.re"
#line 1582 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("year4");
TIMELIB_INIT;
@@ -12878,7 +12881,7 @@ yy784:
TIMELIB_DEINIT;
return TIMELIB_CLF;
}
#line 12882 "ext/date/lib/parse_date.c"
#line 12885 "ext/date/lib/parse_date.c"
yy785:
YYDEBUG(785, *YYCURSOR);
yych = *++YYCURSOR;
@@ -13029,7 +13032,7 @@ yy793:
}
yy794:
YYDEBUG(794, *YYCURSOR);
#line 1400 "ext/date/lib/parse_date.re"
#line 1403 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("datenodayrev");
@@ -13042,7 +13045,7 @@ yy794:
TIMELIB_DEINIT;
return TIMELIB_DATE_NO_DAY;
}
#line 13046 "ext/date/lib/parse_date.c"
#line 13049 "ext/date/lib/parse_date.c"
yy795:
YYDEBUG(795, *YYCURSOR);
yych = *++YYCURSOR;
@@ -13257,7 +13260,7 @@ yy814:
if (yych <= '7') goto yy817;
yy815:
YYDEBUG(815, *YYCURSOR);
#line 1511 "ext/date/lib/parse_date.re"
#line 1514 "ext/date/lib/parse_date.re"
{
timelib_sll w, d;
DEBUG_OUTPUT("isoweek");
@@ -13275,7 +13278,7 @@ yy815:
TIMELIB_DEINIT;
return TIMELIB_ISO_WEEK;
}
#line 13279 "ext/date/lib/parse_date.c"
#line 13282 "ext/date/lib/parse_date.c"
yy816:
YYDEBUG(816, *YYCURSOR);
yych = *++YYCURSOR;
@@ -13285,7 +13288,7 @@ yy817:
YYDEBUG(817, *YYCURSOR);
++YYCURSOR;
YYDEBUG(818, *YYCURSOR);
#line 1492 "ext/date/lib/parse_date.re"
#line 1495 "ext/date/lib/parse_date.re"
{
timelib_sll w, d;
DEBUG_OUTPUT("isoweekday");
@@ -13303,7 +13306,7 @@ yy817:
TIMELIB_DEINIT;
return TIMELIB_ISO_WEEK;
}
#line 13307 "ext/date/lib/parse_date.c"
#line 13310 "ext/date/lib/parse_date.c"
yy819:
YYDEBUG(819, *YYCURSOR);
yych = *++YYCURSOR;
@@ -13367,7 +13370,7 @@ yy821:
}
yy822:
YYDEBUG(822, *YYCURSOR);
#line 1478 "ext/date/lib/parse_date.re"
#line 1481 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("pgydotd");
@@ -13380,7 +13383,7 @@ yy822:
TIMELIB_DEINIT;
return TIMELIB_PG_YEARDAY;
}
#line 13384 "ext/date/lib/parse_date.c"
#line 13387 "ext/date/lib/parse_date.c"
yy823:
YYDEBUG(823, *YYCURSOR);
yych = *++YYCURSOR;
@@ -13483,7 +13486,7 @@ yy842:
++YYCURSOR;
yy843:
YYDEBUG(843, *YYCURSOR);
#line 1452 "ext/date/lib/parse_date.re"
#line 1455 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("xmlrpc | xmlrpcnocolon | soap | wddx | exif");
@@ -13508,7 +13511,7 @@ yy843:
TIMELIB_DEINIT;
return TIMELIB_XMLRPC_SOAP;
}
#line 13512 "ext/date/lib/parse_date.c"
#line 13515 "ext/date/lib/parse_date.c"
yy844:
YYDEBUG(844, *YYCURSOR);
yych = *++YYCURSOR;
@@ -13770,7 +13773,7 @@ yy848:
}
yy849:
YYDEBUG(849, *YYCURSOR);
#line 1440 "ext/date/lib/parse_date.re"
#line 1443 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("datenocolon");
TIMELIB_INIT;
@@ -13781,7 +13784,7 @@ yy849:
TIMELIB_DEINIT;
return TIMELIB_DATE_NOCOLON;
}
#line 13785 "ext/date/lib/parse_date.c"
#line 13788 "ext/date/lib/parse_date.c"
yy850:
YYDEBUG(850, *YYCURSOR);
yych = *++YYCURSOR;
@@ -14701,7 +14704,7 @@ yy973:
if (yych <= '9') goto yy996;
yy974:
YYDEBUG(974, *YYCURSOR);
#line 1317 "ext/date/lib/parse_date.re"
#line 1320 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("gnudateshorter");
@@ -14714,7 +14717,7 @@ yy974:
TIMELIB_DEINIT;
return TIMELIB_ISO_DATE;
}
#line 14718 "ext/date/lib/parse_date.c"
#line 14721 "ext/date/lib/parse_date.c"
yy975:
YYDEBUG(975, *YYCURSOR);
yyaccept = 22;
@@ -15723,7 +15726,7 @@ yy1066:
}
yy1068:
YYDEBUG(1068, *YYCURSOR);
#line 1209 "ext/date/lib/parse_date.re"
#line 1212 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("gnunocolon");
TIMELIB_INIT;
@@ -15745,7 +15748,7 @@ yy1068:
TIMELIB_DEINIT;
return TIMELIB_GNU_NOCOLON;
}
#line 15749 "ext/date/lib/parse_date.c"
#line 15752 "ext/date/lib/parse_date.c"
yy1069:
YYDEBUG(1069, *YYCURSOR);
yych = *++YYCURSOR;
@@ -15837,7 +15840,7 @@ yy1075:
}
yy1076:
YYDEBUG(1076, *YYCURSOR);
#line 1255 "ext/date/lib/parse_date.re"
#line 1258 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("iso8601nocolon");
@@ -15856,7 +15859,7 @@ yy1076:
TIMELIB_DEINIT;
return TIMELIB_ISO_NOCOLON;
}
#line 15860 "ext/date/lib/parse_date.c"
#line 15863 "ext/date/lib/parse_date.c"
yy1077:
YYDEBUG(1077, *YYCURSOR);
yyaccept = 25;
@@ -16754,7 +16757,7 @@ yy1117:
}
yy1118:
YYDEBUG(1118, *YYCURSOR);
#line 1651 "ext/date/lib/parse_date.re"
#line 1654 "ext/date/lib/parse_date.re"
{
timelib_sll i;
int behavior = 0;
@@ -16770,7 +16773,7 @@ yy1118:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
#line 16774 "ext/date/lib/parse_date.c"
#line 16777 "ext/date/lib/parse_date.c"
yy1119:
YYDEBUG(1119, *YYCURSOR);
++YYCURSOR;
@@ -16821,7 +16824,7 @@ yy1126:
YYDEBUG(1126, *YYCURSOR);
++YYCURSOR;
YYDEBUG(1127, *YYCURSOR);
#line 1124 "ext/date/lib/parse_date.re"
#line 1127 "ext/date/lib/parse_date.re"
{
timelib_sll i;
int behavior = 0;
@@ -16842,7 +16845,7 @@ yy1126:
TIMELIB_DEINIT;
return TIMELIB_WEEK_DAY_OF_MONTH;
}
#line 16846 "ext/date/lib/parse_date.c"
#line 16849 "ext/date/lib/parse_date.c"
yy1128:
YYDEBUG(1128, *YYCURSOR);
yyaccept = 26;
@@ -16950,7 +16953,7 @@ yy1141:
}
yy1142:
YYDEBUG(1142, *YYCURSOR);
#line 1627 "ext/date/lib/parse_date.re"
#line 1630 "ext/date/lib/parse_date.re"
{
timelib_sll i;
int behavior = 0;
@@ -16973,7 +16976,7 @@ yy1142:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
#line 16977 "ext/date/lib/parse_date.c"
#line 16980 "ext/date/lib/parse_date.c"
yy1143:
YYDEBUG(1143, *YYCURSOR);
yych = *++YYCURSOR;
@@ -19650,7 +19653,7 @@ yy1294:
goto yy1298;
yy1295:
YYDEBUG(1295, *YYCURSOR);
#line 1101 "ext/date/lib/parse_date.re"
#line 1104 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("backof | frontof");
TIMELIB_INIT;
@@ -19672,7 +19675,7 @@ yy1295:
TIMELIB_DEINIT;
return TIMELIB_LF_DAY_OF_MONTH;
}
#line 19676 "ext/date/lib/parse_date.c"
#line 19679 "ext/date/lib/parse_date.c"
yy1296:
YYDEBUG(1296, *YYCURSOR);
yyaccept = 28;
@@ -21363,7 +21366,7 @@ yy1385:
if (yych <= '9') goto yy1385;
yy1387:
YYDEBUG(1387, *YYCURSOR);
#line 1058 "ext/date/lib/parse_date.re"
#line 1061 "ext/date/lib/parse_date.re"
{
timelib_ull i;
@@ -21388,7 +21391,7 @@ yy1387:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
#line 21392 "ext/date/lib/parse_date.c"
#line 21395 "ext/date/lib/parse_date.c"
yy1388:
YYDEBUG(1388, *YYCURSOR);
yych = *++YYCURSOR;
@@ -21824,7 +21827,7 @@ yy1416:
++YYCURSOR;
yy1417:
YYDEBUG(1417, *YYCURSOR);
#line 1046 "ext/date/lib/parse_date.re"
#line 1049 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("tomorrow");
TIMELIB_INIT;
@@ -21835,7 +21838,7 @@ yy1417:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
#line 21839 "ext/date/lib/parse_date.c"
#line 21842 "ext/date/lib/parse_date.c"
yy1418:
YYDEBUG(1418, *YYCURSOR);
yych = *++YYCURSOR;
@@ -21870,7 +21873,7 @@ yy1419:
}
yy1420:
YYDEBUG(1420, *YYCURSOR);
#line 1036 "ext/date/lib/parse_date.re"
#line 1039 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("midnight | today");
TIMELIB_INIT;
@@ -21879,7 +21882,7 @@ yy1420:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
#line 21883 "ext/date/lib/parse_date.c"
#line 21886 "ext/date/lib/parse_date.c"
yy1421:
YYDEBUG(1421, *YYCURSOR);
yych = *++YYCURSOR;
@@ -23891,7 +23894,7 @@ yy1499:
}
yy1500:
YYDEBUG(1500, *YYCURSOR);
#line 1015 "ext/date/lib/parse_date.re"
#line 1018 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("now");
TIMELIB_INIT;
@@ -23899,7 +23902,7 @@ yy1500:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
#line 23903 "ext/date/lib/parse_date.c"
#line 23906 "ext/date/lib/parse_date.c"
yy1501:
YYDEBUG(1501, *YYCURSOR);
yych = *++YYCURSOR;
@@ -24038,7 +24041,7 @@ yy1507:
}
yy1508:
YYDEBUG(1508, *YYCURSOR);
#line 1024 "ext/date/lib/parse_date.re"
#line 1027 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("noon");
TIMELIB_INIT;
@@ -24049,7 +24052,7 @@ yy1508:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
#line 24053 "ext/date/lib/parse_date.c"
#line 24056 "ext/date/lib/parse_date.c"
yy1509:
YYDEBUG(1509, *YYCURSOR);
yyaccept = 0;
@@ -24582,7 +24585,7 @@ yy1530:
++YYCURSOR;
yy1531:
YYDEBUG(1531, *YYCURSOR);
#line 1003 "ext/date/lib/parse_date.re"
#line 1006 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("yesterday");
TIMELIB_INIT;
@@ -24593,7 +24596,7 @@ yy1531:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
#line 24597 "ext/date/lib/parse_date.c"
#line 24600 "ext/date/lib/parse_date.c"
yy1532:
YYDEBUG(1532, *YYCURSOR);
yyaccept = 0;
@@ -24766,7 +24769,7 @@ yy1537:
goto yy1531;
}
}
#line 1777 "ext/date/lib/parse_date.re"
#line 1780 "ext/date/lib/parse_date.re"
}
@@ -25124,6 +25127,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;
+8 -1
View File
@@ -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;
@@ -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;
+731 -676
View File
File diff suppressed because it is too large. Load diff
+11 -12
View File
@@ -28,7 +28,7 @@ static int month_tab[12] = { 0, 31, 59, 90, 120, 151, 181, 212, 24
static int days_in_month_leap[13] = { 31, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
static int days_in_month[13] = { 31, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
static int do_range_limit(timelib_sll start, timelib_sll end, timelib_sll adj, timelib_sll *a, timelib_sll *b)
static void do_range_limit(timelib_sll start, timelib_sll end, timelib_sll adj, timelib_sll *a, timelib_sll *b)
{
if (*a < start) {
*b -= (start - *a - 1) / adj + 1;
@@ -38,7 +38,6 @@ static int do_range_limit(timelib_sll start, timelib_sll end, timelib_sll adj, t
*b += *a / adj;
*a -= adj * (*a / adj);
}
return 0;
}
static void inc_month(timelib_sll *y, timelib_sll *m)
@@ -170,24 +169,24 @@ static void do_adjust_for_weekday(timelib_time* time)
void timelib_do_rel_normalize(timelib_time *base, timelib_rel_time *rt)
{
do {} while (do_range_limit(0, 60, 60, &rt->s, &rt->i));
do {} while (do_range_limit(0, 60, 60, &rt->i, &rt->h));
do {} while (do_range_limit(0, 24, 24, &rt->h, &rt->d));
do {} while (do_range_limit(0, 12, 12, &rt->m, &rt->y));
do_range_limit(0, 60, 60, &rt->s, &rt->i);
do_range_limit(0, 60, 60, &rt->i, &rt->h);
do_range_limit(0, 24, 24, &rt->h, &rt->d);
do_range_limit(0, 12, 12, &rt->m, &rt->y);
do_range_limit_days_relative(&base->y, &base->m, &rt->y, &rt->m, &rt->d, rt->invert);
do {} while (do_range_limit(0, 12, 12, &rt->m, &rt->y));
do_range_limit(0, 12, 12, &rt->m, &rt->y);
}
void timelib_do_normalize(timelib_time* time)
{
if (time->s != TIMELIB_UNSET) do {} while (do_range_limit(0, 60, 60, &time->s, &time->i));
if (time->s != TIMELIB_UNSET) do {} while (do_range_limit(0, 60, 60, &time->i, &time->h));
if (time->s != TIMELIB_UNSET) do {} while (do_range_limit(0, 24, 24, &time->h, &time->d));
do {} while (do_range_limit(1, 13, 12, &time->m, &time->y));
if (time->s != TIMELIB_UNSET) do_range_limit(0, 60, 60, &time->s, &time->i);
if (time->s != TIMELIB_UNSET) do_range_limit(0, 60, 60, &time->i, &time->h);
if (time->s != TIMELIB_UNSET) do_range_limit(0, 24, 24, &time->h, &time->d);
do_range_limit(1, 13, 12, &time->m, &time->y);
do {} while (do_range_limit_days(&time->y, &time->m, &time->d));
do {} while (do_range_limit(1, 13, 12, &time->m, &time->y));
do_range_limit(1, 13, 12, &time->m, &time->y);
}
static void do_adjust_relative(timelib_time* time)
+7 -1
View File
@@ -2121,7 +2121,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 +2441,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;
}
@@ -2587,6 +2589,10 @@ static int php_date_initialize_from_hash(zval **return_value, php_date_obj **dat
tzi = php_date_parse_tzfile(Z_STRVAL_PP(z_timezone), DATE_TIMEZONEDB TSRMLS_CC);
if (tzi == NULL) {
return 0;
}
ALLOC_INIT_ZVAL(tmp_obj);
tzobj = zend_object_store_get_object(php_date_instantiate(date_ce_timezone, tmp_obj TSRMLS_CC) TSRMLS_CC);
tzobj->type = TIMELIB_ZONETYPE_ID;
+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"]=>
+11
View File
@@ -0,0 +1,11 @@
--TEST--
Test for bug #66721: __wakeup of DateTime segfaults when invalid object data is supplied
--CREDITS--
Boro Sitnikovski <buritomath@yahoo.com>
--FILE--
<?php
$y = 'O:8:"DateTime":3:{s:4:"date";s:19:"2014-02-15 02:00:51";s:13:"timezone_type";i:3;s:8:"timezone";s:10:"1234567890";}';
var_dump(unserialize($y));
?>
--EXPECTF--
Fatal error: Invalid serialization data for DateTime object in %s on line %d
+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"]=>
+6
View File
@@ -1509,6 +1509,12 @@ char *_dom_get_valid_file_path(char *source, char *resolved_path, int resolved_p
if (uri->scheme != NULL) {
/* absolute file uris - libxml only supports localhost or empty host */
#ifdef PHP_WIN32
if (strncasecmp(source, "file://",7) == 0 && ':' == source[8]) {
isFileUri = 1;
source += 7;
} else
#endif
if (strncasecmp(source, "file:///",8) == 0) {
isFileUri = 1;
#ifdef PHP_WIN32
+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
+21281 -21281
View File
File diff suppressed because it is too large. Load diff
+370 -101
View File
@@ -1,6 +1,6 @@
diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
--- libmagic.orig/apprentice.c 2013-03-21 18:45:14.000000000 +0100
+++ libmagic/apprentice.c 2013-04-27 13:53:32.175250261 +0200
--- libmagic.orig/apprentice.c Thu Mar 21 18:45:14 2013
+++ libmagic/apprentice.c Fri Apr 11 12:36:52 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);
@@ -830,8 +832,8 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
m->str_flags = swap4(m->str_flags);
}
diff -u libmagic.orig/ascmagic.c libmagic/ascmagic.c
--- libmagic.orig/ascmagic.c 2012-10-31 18:03:01.000000000 +0100
+++ libmagic/ascmagic.c 2013-04-08 15:42:57.328298809 +0200
--- libmagic.orig/ascmagic.c Wed Oct 31 18:03:01 2012
+++ libmagic/ascmagic.c Mon Mar 10 16:40:55 2014
@@ -139,7 +139,7 @@
/* malloc size is a conservative overestimate; could be
improved, or at least realloced after conversion. */
@@ -841,6 +843,15 @@ diff -u libmagic.orig/ascmagic.c libmagic/ascmagic.c
file_oomem(ms, mlen);
goto done;
}
@@ -147,7 +147,7 @@
== NULL)
goto done;
if ((rv = file_softmagic(ms, utf8_buf,
- (size_t)(utf8_end - utf8_buf), TEXTTEST, text)) == 0)
+ (size_t)(utf8_end - utf8_buf), 0, TEXTTEST, text)) == 0)
rv = -1;
}
@@ -211,6 +211,7 @@
case 0:
if (file_printf(ms, ", ") == -1)
@@ -860,8 +871,8 @@ diff -u libmagic.orig/ascmagic.c libmagic/ascmagic.c
return rv;
}
diff -u libmagic.orig/cdf.c libmagic/cdf.c
--- libmagic.orig/cdf.c 2013-03-21 18:45:14.000000000 +0100
+++ libmagic/cdf.c 2013-04-08 15:42:57.328298809 +0200
--- libmagic.orig/cdf.c Thu Mar 21 18:45:14 2013
+++ libmagic/cdf.c Tue May 27 22:22:35 2014
@@ -43,7 +43,17 @@
#include <err.h>
#endif
@@ -892,7 +903,63 @@ diff -u libmagic.orig/cdf.c libmagic/cdf.c
return -1;
return (ssize_t)len;
@@ -1132,7 +1145,7 @@
@@ -810,6 +823,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 +901,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 +948,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 +963,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 +1143,7 @@
cdf_directory_t *d;
char name[__arraycount(d->d_name)];
cdf_stream_t scn;
@@ -901,7 +968,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 +1196,7 @@
cdf_dump_property_info(const cdf_property_info_t *info, size_t count)
{
cdf_timestamp_t tp;
@@ -910,7 +977,7 @@ diff -u libmagic.orig/cdf.c libmagic/cdf.c
char buf[64];
size_t i, j;
@@ -1229,7 +1242,11 @@
@@ -1229,7 +1240,11 @@
break;
case CDF_FILETIME:
tp = info[i].pi_tp;
@@ -923,8 +990,8 @@ diff -u libmagic.orig/cdf.c libmagic/cdf.c
(void)fprintf(stderr, "timestamp %s\n", buf);
} else {
diff -u libmagic.orig/cdf.h libmagic/cdf.h
--- libmagic.orig/cdf.h 2012-10-31 18:03:01.000000000 +0100
+++ libmagic/cdf.h 2013-04-08 15:42:57.328298809 +0200
--- libmagic.orig/cdf.h Wed Oct 31 18:03:01 2012
+++ libmagic/cdf.h Mon Dec 2 15:25:29 2013
@@ -35,10 +35,12 @@
#ifndef _H_CDF_
#define _H_CDF_
@@ -966,8 +1033,8 @@ diff -u libmagic.orig/cdf.h libmagic/cdf.h
void cdf_swap_header(cdf_header_t *);
void cdf_unpack_header(cdf_header_t *, char *);
diff -u libmagic.orig/cdf_time.c libmagic/cdf_time.c
--- libmagic.orig/cdf_time.c 2012-10-31 18:03:01.000000000 +0100
+++ libmagic/cdf_time.c 2013-04-08 15:42:57.328298809 +0200
--- libmagic.orig/cdf_time.c Wed Oct 31 18:03:01 2012
+++ libmagic/cdf_time.c Mon Dec 2 15:25:29 2013
@@ -96,7 +96,7 @@
}
@@ -1026,8 +1093,8 @@ diff -u libmagic.orig/cdf_time.c libmagic/cdf_time.c
static const cdf_timestamp_t tst = 0x01A5E403C2D59C00ULL;
static const char *ref = "Sat Apr 23 01:30:00 1977";
diff -u libmagic.orig/compress.c libmagic/compress.c
--- libmagic.orig/compress.c 2013-01-06 21:35:43.000000000 +0100
+++ libmagic/compress.c 2013-04-08 15:42:57.328298809 +0200
--- libmagic.orig/compress.c Sun Jan 6 21:35:43 2013
+++ libmagic/compress.c Mon Dec 2 15:25:29 2013
@@ -32,6 +32,7 @@
* uncompress(method, old, n, newch) - uncompress old into new,
* using method, return sizeof new
@@ -1189,8 +1256,8 @@ diff -u libmagic.orig/compress.c libmagic/compress.c
-#endif
+#endif /* if PHP_FILEINFO_UNCOMPRESS */
diff -u libmagic.orig/file.h libmagic/file.h
--- libmagic.orig/file.h 2013-02-18 16:40:59.000000000 +0100
+++ libmagic/file.h 2013-04-08 15:42:57.328298809 +0200
--- libmagic.orig/file.h Mon Feb 18 16:40:59 2013
+++ libmagic/file.h Mon Mar 10 16:40:55 2014
@@ -33,11 +33,9 @@
#ifndef __file_h__
#define __file_h__
@@ -1303,7 +1370,13 @@ diff -u libmagic.orig/file.h libmagic/file.h
protected int file_zmagic(struct magic_set *, int, const char *,
const unsigned char *, size_t);
#endif
@@ -443,16 +442,13 @@
@@ -438,21 +437,18 @@
unichar **, size_t *, const char **, const char **, const char **);
protected int file_is_tar(struct magic_set *, const unsigned char *, size_t);
protected int file_softmagic(struct magic_set *, const unsigned char *, size_t,
- int, int);
+ size_t, int, int);
protected int file_apprentice(struct magic_set *, const char *, int);
protected int file_magicfind(struct magic_set *, const char *, struct mlist *);
protected uint64_t file_signextend(struct magic_set *, struct magic *,
uint64_t);
@@ -1377,22 +1450,24 @@ diff -u libmagic.orig/file.h libmagic/file.h
#if defined(HAVE_MMAP) && defined(HAVE_SYS_MMAN_H) && !defined(QUICK)
#define QUICK
@@ -533,4 +511,12 @@
#define FILE_RCSID(id)
@@ -531,6 +509,14 @@
#endif
#else
#define FILE_RCSID(id)
+#endif
+
+#ifdef PHP_WIN32
+#define FINFO_LSEEK_FUNC _lseek
+#define FINFO_READ_FUNC _read
+#else
+#define FINFO_LSEEK_FUNC lseek
+#define FINFO_READ_FUNC read
+#endif
+
#endif
#endif /* __file_h__ */
diff -u libmagic.orig/fsmagic.c libmagic/fsmagic.c
--- libmagic.orig/fsmagic.c 2013-03-21 18:45:14.000000000 +0100
+++ libmagic/fsmagic.c 2013-04-08 15:42:57.328298809 +0200
--- libmagic.orig/fsmagic.c Thu Mar 21 18:45:14 2013
+++ libmagic/fsmagic.c Mon Dec 2 15:25:29 2013
@@ -59,27 +59,21 @@
# define minor(dev) ((dev) & 0xff)
#endif
@@ -1758,8 +1833,8 @@ diff -u libmagic.orig/fsmagic.c libmagic/fsmagic.c
return ret;
}
diff -u libmagic.orig/funcs.c libmagic/funcs.c
--- libmagic.orig/funcs.c 2012-10-31 18:03:01.000000000 +0100
+++ libmagic/funcs.c 2013-04-08 15:42:57.328298809 +0200
--- libmagic.orig/funcs.c Wed Oct 31 18:03:01 2012
+++ libmagic/funcs.c Mon Mar 10 16:40:55 2014
@@ -41,52 +41,42 @@
#if defined(HAVE_WCTYPE_H)
#include <wctype.h>
@@ -1896,7 +1971,7 @@ diff -u libmagic.orig/funcs.c libmagic/funcs.c
if ((ms->flags & MAGIC_DEBUG) != 0)
(void)fprintf(stderr, "zmagic %d\n", m);
goto done;
@@ -219,12 +221,17 @@
@@ -219,16 +221,21 @@
}
/* Check if we have a CDF file */
@@ -1919,6 +1994,11 @@ diff -u libmagic.orig/funcs.c libmagic/funcs.c
/* try soft magic tests */
if ((ms->flags & MAGIC_NO_CHECK_SOFT) == 0)
- if ((m = file_softmagic(ms, ubuf, nb, BINTEST,
+ if ((m = file_softmagic(ms, ubuf, nb, 0, BINTEST,
looks_text)) != 0) {
if ((ms->flags & MAGIC_DEBUG) != 0)
(void)fprintf(stderr, "softmagic %d\n", m);
@@ -296,7 +303,6 @@
return m;
@@ -2047,8 +2127,8 @@ diff -u libmagic.orig/funcs.c libmagic/funcs.c
}
+
diff -u libmagic.orig/magic.c libmagic/magic.c
--- libmagic.orig/magic.c 2013-01-11 17:43:09.000000000 +0100
+++ libmagic/magic.c 2013-04-27 13:53:32.175250261 +0200
--- libmagic.orig/magic.c Fri Jan 11 17:43:09 2013
+++ libmagic/magic.c Mon Dec 2 15:29:02 2013
@@ -25,11 +25,6 @@
* SUCH DAMAGE.
*/
@@ -2391,8 +2471,8 @@ diff -u libmagic.orig/magic.c libmagic/magic.c
public const char *
magic_error(struct magic_set *ms)
diff -u libmagic.orig/magic.h libmagic/magic.h
--- libmagic.orig/magic.h 2013-03-21 18:52:42.000000000 +0100
+++ libmagic/magic.h 2013-04-08 15:42:57.328298809 +0200
--- libmagic.orig/magic.h Thu Mar 21 18:52:42 2013
+++ libmagic/magic.h Mon Dec 2 15:25:29 2013
@@ -87,6 +87,7 @@
const char *magic_getpath(const char *, int);
@@ -2410,8 +2490,8 @@ diff -u libmagic.orig/magic.h libmagic/magic.h
int magic_errno(magic_t);
diff -u libmagic.orig/print.c libmagic/print.c
--- libmagic.orig/print.c 2013-03-21 18:45:14.000000000 +0100
+++ libmagic/print.c 2013-04-27 13:53:32.175250261 +0200
--- libmagic.orig/print.c Thu Mar 21 18:45:14 2013
+++ libmagic/print.c Mon Dec 2 15:29:02 2013
@@ -28,13 +28,17 @@
/*
* print.c - debugging printout routines
@@ -2641,8 +2721,8 @@ diff -u libmagic.orig/print.c libmagic/print.c
t = ts.tv_sec;
}
diff -u libmagic.orig/readcdf.c libmagic/readcdf.c
--- libmagic.orig/readcdf.c 2012-10-31 18:03:01.000000000 +0100
+++ libmagic/readcdf.c 2013-04-08 15:42:57.328298809 +0200
--- libmagic.orig/readcdf.c Wed Oct 31 18:03:01 2012
+++ libmagic/readcdf.c Thu Apr 24 19:54:40 2014
@@ -30,7 +30,11 @@
#endif
@@ -2655,7 +2735,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;
@@ -2664,7 +2744,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) {
@@ -2679,18 +2766,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;
@@ -2704,8 +2797,8 @@ diff -u libmagic.orig/readcdf.c libmagic/readcdf.c
if (file_printf(ms, "application/CDFV2-corrupt") == -1)
return -1;
diff -u libmagic.orig/readelf.c libmagic/readelf.c
--- libmagic.orig/readelf.c 2013-03-21 18:45:14.000000000 +0100
+++ libmagic/readelf.c 2013-04-08 15:42:57.328298809 +0200
--- libmagic.orig/readelf.c Thu Mar 21 18:45:14 2013
+++ libmagic/readelf.c Mon Dec 2 15:25:29 2013
@@ -48,8 +48,8 @@
private int dophn_exec(struct magic_set *, int, int, int, off_t, int, size_t,
off_t, int *, int);
@@ -2956,8 +3049,8 @@ 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 2013-03-21 18:45:14.000000000 +0100
+++ libmagic/readelf.h 2013-03-31 16:57:18.499744030 +0200
--- libmagic.orig/readelf.h Thu Mar 21 18:45:14 2013
+++ libmagic/readelf.h Mon Dec 2 15:25:29 2013
@@ -44,9 +44,17 @@
typedef uint32_t Elf32_Word;
typedef uint8_t Elf32_Char;
@@ -2977,8 +3070,8 @@ diff -u libmagic.orig/readelf.h libmagic/readelf.h
typedef uint32_t Elf64_Word;
typedef uint8_t Elf64_Char;
diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
--- libmagic.orig/softmagic.c 2013-03-21 18:45:14.000000000 +0100
+++ libmagic/softmagic.c 2013-05-14 11:00:07.044745939 +0200
--- libmagic.orig/softmagic.c Thu Mar 21 18:45:14 2013
+++ libmagic/softmagic.c Mon Mar 10 16:40:55 2014
@@ -41,6 +41,11 @@
#include <stdlib.h>
#include <time.h>
@@ -2991,7 +3084,32 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
private int match(struct magic_set *, struct magic *, uint32_t,
const unsigned char *, size_t, size_t, int, int, int, int, int *, int *,
@@ -132,7 +137,7 @@
@@ -62,6 +67,8 @@
private void cvt_32(union VALUETYPE *, const struct magic *);
private void cvt_64(union VALUETYPE *, const struct magic *);
+#define OFFSET_OOB(n, o, i) ((n) < (o) || (i) > ((n) - (o)))
+
/*
* softmagic - lookup one file in parsed, in-memory copy of database
* Passed the name and FILE * of one file to be typed.
@@ -69,13 +76,13 @@
/*ARGSUSED1*/ /* nbytes passed for regularity, maybe need later */
protected int
file_softmagic(struct magic_set *ms, const unsigned char *buf, size_t nbytes,
- int mode, int text)
+ size_t level, int mode, int text)
{
struct mlist *ml;
int rv, printed_something = 0, need_separator = 0;
for (ml = ms->mlist[0]->next; ml != ms->mlist[0]; ml = ml->next)
if ((rv = match(ms, ml->magic, ml->nmagic, buf, nbytes, 0, mode,
- text, 0, 0, &printed_something, &need_separator,
+ text, 0, level, &printed_something, &need_separator,
NULL)) != 0)
return rv;
@@ -132,7 +139,7 @@
struct magic *m = &magic[magindex];
if (m->type != FILE_NAME)
@@ -3000,7 +3118,7 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
#define FLT (STRING_BINTEST | STRING_TEXTTEST)
((text && (m->str_flags & FLT) == STRING_BINTEST) ||
(!text && (m->str_flags & FLT) == STRING_TEXTTEST))) ||
@@ -209,8 +214,8 @@
@@ -209,8 +216,8 @@
if (file_check_mem(ms, ++cont_level) == -1)
return -1;
@@ -3011,7 +3129,7 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
m = &magic[magindex];
ms->line = m->lineno; /* for messages */
@@ -335,44 +340,22 @@
@@ -335,44 +342,22 @@
private int
check_fmt(struct magic_set *ms, struct magic *m)
{
@@ -3066,7 +3184,7 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
private int32_t
mprint(struct magic_set *ms, struct magic *m)
{
@@ -583,13 +566,13 @@
@@ -583,13 +568,13 @@
char *cp;
int rval;
@@ -3082,7 +3200,7 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
if (rval == -1)
return -1;
@@ -835,16 +818,16 @@
@@ -835,16 +820,16 @@
if (m->num_mask) \
switch (m->mask_op & FILE_OPS_MASK) { \
case FILE_OPADD: \
@@ -3103,7 +3221,7 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
break; \
} \
@@ -1145,9 +1128,6 @@
@@ -1145,9 +1130,6 @@
"nbytes=%zu, count=%u)\n", m->type, m->flag, offset, o,
nbytes, count);
mdebug(offset, (char *)(void *)p, sizeof(union VALUETYPE));
@@ -3113,7 +3231,79 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
}
if (m->flag & INDIR) {
@@ -1644,9 +1624,6 @@
@@ -1191,7 +1173,7 @@
}
switch (cvt_flip(m->in_type, flip)) {
case FILE_BYTE:
- if (nbytes < (offset + 1))
+ if (OFFSET_OOB(nbytes, offset, 1))
return 0;
if (off) {
switch (m->in_op & FILE_OPS_MASK) {
@@ -1226,7 +1208,7 @@
offset = ~offset;
break;
case FILE_BESHORT:
- if (nbytes < (offset + 2))
+ if (OFFSET_OOB(nbytes, offset, 2))
return 0;
if (off) {
switch (m->in_op & FILE_OPS_MASK) {
@@ -1278,7 +1260,7 @@
offset = ~offset;
break;
case FILE_LESHORT:
- if (nbytes < (offset + 2))
+ if (OFFSET_OOB(nbytes, offset, 2))
return 0;
if (off) {
switch (m->in_op & FILE_OPS_MASK) {
@@ -1330,7 +1312,7 @@
offset = ~offset;
break;
case FILE_SHORT:
- if (nbytes < (offset + 2))
+ if (OFFSET_OOB(nbytes, offset, 2))
return 0;
if (off) {
switch (m->in_op & FILE_OPS_MASK) {
@@ -1367,7 +1349,7 @@
break;
case FILE_BELONG:
case FILE_BEID3:
- if (nbytes < (offset + 4))
+ if (OFFSET_OOB(nbytes, offset, 4))
return 0;
if (off) {
switch (m->in_op & FILE_OPS_MASK) {
@@ -1438,7 +1420,7 @@
break;
case FILE_LELONG:
case FILE_LEID3:
- if (nbytes < (offset + 4))
+ if (OFFSET_OOB(nbytes, offset, 4))
return 0;
if (off) {
switch (m->in_op & FILE_OPS_MASK) {
@@ -1508,7 +1490,7 @@
offset = ~offset;
break;
case FILE_MELONG:
- if (nbytes < (offset + 4))
+ if (OFFSET_OOB(nbytes, offset, 4))
return 0;
if (off) {
switch (m->in_op & FILE_OPS_MASK) {
@@ -1578,7 +1560,7 @@
offset = ~offset;
break;
case FILE_LONG:
- if (nbytes < (offset + 4))
+ if (OFFSET_OOB(nbytes, offset, 4))
return 0;
if (off) {
switch (m->in_op & FILE_OPS_MASK) {
@@ -1644,23 +1626,20 @@
if ((ms->flags & MAGIC_DEBUG) != 0) {
mdebug(offset, (char *)(void *)p,
sizeof(union VALUETYPE));
@@ -3123,23 +3313,101 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
}
}
@@ -1717,12 +1694,12 @@
ms->o.buf = sbuf;
/* Verify we have enough data to match magic type */
switch (m->type) {
case FILE_BYTE:
- if (nbytes < (offset + 1)) /* should alway be true */
+ if (OFFSET_OOB(nbytes, offset, 1))
return 0;
break;
case FILE_SHORT:
case FILE_BESHORT:
case FILE_LESHORT:
- if (nbytes < (offset + 2))
+ if (OFFSET_OOB(nbytes, offset, 2))
return 0;
break;
@@ -1679,38 +1658,40 @@
case FILE_FLOAT:
case FILE_BEFLOAT:
case FILE_LEFLOAT:
- if (nbytes < (offset + 4))
+ if (OFFSET_OOB(nbytes, offset, 4))
return 0;
break;
case FILE_DOUBLE:
case FILE_BEDOUBLE:
case FILE_LEDOUBLE:
- if (nbytes < (offset + 8))
+ if (OFFSET_OOB(nbytes, offset, 8))
return 0;
break;
case FILE_STRING:
case FILE_PSTRING:
case FILE_SEARCH:
- if (nbytes < (offset + m->vallen))
+ if (OFFSET_OOB(nbytes, offset, m->vallen))
return 0;
break;
case FILE_REGEX:
- if (nbytes < offset)
+ if (OFFSET_OOB(nbytes, offset, 0))
return 0;
break;
case FILE_INDIRECT:
- if (nbytes < offset)
+ if (offset == 0)
+ return 0;
+ if (OFFSET_OOB(nbytes, offset, 0))
return 0;
sbuf = ms->o.buf;
soffset = ms->offset;
ms->o.buf = NULL;
ms->offset = 0;
rv = file_softmagic(ms, s + offset, nbytes - offset,
- BINTEST, text);
+ recursion_level, BINTEST, text);
if ((ms->flags & MAGIC_DEBUG) != 0)
fprintf(stderr, "indirect @offs=%u[%d]\n", offset, rv);
rbuf = ms->o.buf;
@@ -1718,16 +1699,26 @@
ms->offset = soffset;
if (rv == 1) {
- if ((ms->flags & (MAGIC_MIME|MAGIC_APPLE)) == 0 &&
+ if ((ms->flags & (MAGIC_MIME|MAGIC_APPLE)) == 0 &&
file_printf(ms, m->desc, offset) == -1)
- return -1;
+ return -1;
if (file_printf(ms, "%s", rbuf) == -1)
if ((ms->flags & (MAGIC_MIME|MAGIC_APPLE)) == 0 &&
- file_printf(ms, m->desc, offset) == -1)
+ file_printf(ms, m->desc, offset) == -1) {
+ if (rbuf) {
+ efree(rbuf);
+ }
return -1;
- if (file_printf(ms, "%s", rbuf) == -1)
+ }
+ if (file_printf(ms, "%s", rbuf) == -1) {
+ if (rbuf) {
+ efree(rbuf);
+ }
return -1;
- free(rbuf);
+ }
+ }
+ if (rbuf) {
+ efree(rbuf);
}
return rv;
@@ -1837,6 +1814,42 @@
case FILE_USE:
- if (nbytes < offset)
+ if (OFFSET_OOB(nbytes, offset, 0))
return 0;
sbuf = m->value.s;
if (*sbuf == '^') {
@@ -1837,6 +1828,42 @@
return file_strncmp(a, b, len, flags);
}
@@ -3182,7 +3450,7 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
private int
magiccheck(struct magic_set *ms, struct magic *m)
{
@@ -1996,69 +2009,157 @@
@@ -1996,69 +2023,157 @@
break;
}
case FILE_REGEX: {
@@ -3395,3 +3663,4 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
default:
file_magerror(ms, "invalid type %d in magiccheck()", m->type);
return -1;
+8 -6
View File
@@ -493,12 +493,14 @@ apprentice_unmap(struct magic_map *map)
if (map == NULL)
return;
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);
}
}
+1 -1
View File
@@ -147,7 +147,7 @@ file_ascmagic_with_encoding(struct magic_set *ms, const unsigned char *buf,
== NULL)
goto done;
if ((rv = file_softmagic(ms, utf8_buf,
(size_t)(utf8_end - utf8_buf), TEXTTEST, text)) == 0)
(size_t)(utf8_end - utf8_buf), 0, TEXTTEST, text)) == 0)
rv = -1;
}
+26 -21
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,7 +812,11 @@ 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));
@@ -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;
}
+1 -1
View File
@@ -437,7 +437,7 @@ protected int file_encoding(struct magic_set *, const unsigned char *, size_t,
unichar **, size_t *, const char **, const char **, const char **);
protected int file_is_tar(struct magic_set *, const unsigned char *, size_t);
protected int file_softmagic(struct magic_set *, const unsigned char *, size_t,
int, int);
size_t, int, int);
protected int file_apprentice(struct magic_set *, const char *, int);
protected int file_magicfind(struct magic_set *, const char *, struct mlist *);
protected uint64_t file_signextend(struct magic_set *, struct magic *,
+1 -1
View File
@@ -235,7 +235,7 @@ file_buffer(struct magic_set *ms, php_stream *stream, const char *inname, const
/* try soft magic tests */
if ((ms->flags & MAGIC_NO_CHECK_SOFT) == 0)
if ((m = file_softmagic(ms, ubuf, nb, BINTEST,
if ((m = file_softmagic(ms, ubuf, nb, 0, BINTEST,
looks_text)) != 0) {
if ((ms->flags & MAGIC_DEBUG) != 0)
(void)fprintf(stderr, "softmagic %d\n", m);
+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,
+48 -26
View File
@@ -67,6 +67,8 @@ private void cvt_16(union VALUETYPE *, const struct magic *);
private void cvt_32(union VALUETYPE *, const struct magic *);
private void cvt_64(union VALUETYPE *, const struct magic *);
#define OFFSET_OOB(n, o, i) ((n) < (o) || (i) > ((n) - (o)))
/*
* softmagic - lookup one file in parsed, in-memory copy of database
* Passed the name and FILE * of one file to be typed.
@@ -74,13 +76,13 @@ private void cvt_64(union VALUETYPE *, const struct magic *);
/*ARGSUSED1*/ /* nbytes passed for regularity, maybe need later */
protected int
file_softmagic(struct magic_set *ms, const unsigned char *buf, size_t nbytes,
int mode, int text)
size_t level, int mode, int text)
{
struct mlist *ml;
int rv, printed_something = 0, need_separator = 0;
for (ml = ms->mlist[0]->next; ml != ms->mlist[0]; ml = ml->next)
if ((rv = match(ms, ml->magic, ml->nmagic, buf, nbytes, 0, mode,
text, 0, 0, &printed_something, &need_separator,
text, 0, level, &printed_something, &need_separator,
NULL)) != 0)
return rv;
@@ -879,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';
@@ -1171,7 +1181,7 @@ mget(struct magic_set *ms, const unsigned char *s, struct magic *m,
}
switch (cvt_flip(m->in_type, flip)) {
case FILE_BYTE:
if (nbytes < (offset + 1))
if (OFFSET_OOB(nbytes, offset, 1))
return 0;
if (off) {
switch (m->in_op & FILE_OPS_MASK) {
@@ -1206,7 +1216,7 @@ mget(struct magic_set *ms, const unsigned char *s, struct magic *m,
offset = ~offset;
break;
case FILE_BESHORT:
if (nbytes < (offset + 2))
if (OFFSET_OOB(nbytes, offset, 2))
return 0;
if (off) {
switch (m->in_op & FILE_OPS_MASK) {
@@ -1258,7 +1268,7 @@ mget(struct magic_set *ms, const unsigned char *s, struct magic *m,
offset = ~offset;
break;
case FILE_LESHORT:
if (nbytes < (offset + 2))
if (OFFSET_OOB(nbytes, offset, 2))
return 0;
if (off) {
switch (m->in_op & FILE_OPS_MASK) {
@@ -1310,7 +1320,7 @@ mget(struct magic_set *ms, const unsigned char *s, struct magic *m,
offset = ~offset;
break;
case FILE_SHORT:
if (nbytes < (offset + 2))
if (OFFSET_OOB(nbytes, offset, 2))
return 0;
if (off) {
switch (m->in_op & FILE_OPS_MASK) {
@@ -1347,7 +1357,7 @@ mget(struct magic_set *ms, const unsigned char *s, struct magic *m,
break;
case FILE_BELONG:
case FILE_BEID3:
if (nbytes < (offset + 4))
if (OFFSET_OOB(nbytes, offset, 4))
return 0;
if (off) {
switch (m->in_op & FILE_OPS_MASK) {
@@ -1418,7 +1428,7 @@ mget(struct magic_set *ms, const unsigned char *s, struct magic *m,
break;
case FILE_LELONG:
case FILE_LEID3:
if (nbytes < (offset + 4))
if (OFFSET_OOB(nbytes, offset, 4))
return 0;
if (off) {
switch (m->in_op & FILE_OPS_MASK) {
@@ -1488,7 +1498,7 @@ mget(struct magic_set *ms, const unsigned char *s, struct magic *m,
offset = ~offset;
break;
case FILE_MELONG:
if (nbytes < (offset + 4))
if (OFFSET_OOB(nbytes, offset, 4))
return 0;
if (off) {
switch (m->in_op & FILE_OPS_MASK) {
@@ -1558,7 +1568,7 @@ mget(struct magic_set *ms, const unsigned char *s, struct magic *m,
offset = ~offset;
break;
case FILE_LONG:
if (nbytes < (offset + 4))
if (OFFSET_OOB(nbytes, offset, 4))
return 0;
if (off) {
switch (m->in_op & FILE_OPS_MASK) {
@@ -1630,14 +1640,14 @@ mget(struct magic_set *ms, const unsigned char *s, struct magic *m,
/* Verify we have enough data to match magic type */
switch (m->type) {
case FILE_BYTE:
if (nbytes < (offset + 1)) /* should always be true */
if (OFFSET_OOB(nbytes, offset, 1))
return 0;
break;
case FILE_SHORT:
case FILE_BESHORT:
case FILE_LESHORT:
if (nbytes < (offset + 2))
if (OFFSET_OOB(nbytes, offset, 2))
return 0;
break;
@@ -1656,55 +1666,67 @@ mget(struct magic_set *ms, const unsigned char *s, struct magic *m,
case FILE_FLOAT:
case FILE_BEFLOAT:
case FILE_LEFLOAT:
if (nbytes < (offset + 4))
if (OFFSET_OOB(nbytes, offset, 4))
return 0;
break;
case FILE_DOUBLE:
case FILE_BEDOUBLE:
case FILE_LEDOUBLE:
if (nbytes < (offset + 8))
if (OFFSET_OOB(nbytes, offset, 8))
return 0;
break;
case FILE_STRING:
case FILE_PSTRING:
case FILE_SEARCH:
if (nbytes < (offset + m->vallen))
if (OFFSET_OOB(nbytes, offset, m->vallen))
return 0;
break;
case FILE_REGEX:
if (nbytes < offset)
if (OFFSET_OOB(nbytes, offset, 0))
return 0;
break;
case FILE_INDIRECT:
if (nbytes < offset)
if (offset == 0)
return 0;
if (OFFSET_OOB(nbytes, offset, 0))
return 0;
sbuf = ms->o.buf;
soffset = ms->offset;
ms->o.buf = NULL;
ms->offset = 0;
rv = file_softmagic(ms, s + offset, nbytes - offset,
BINTEST, text);
recursion_level, BINTEST, text);
if ((ms->flags & MAGIC_DEBUG) != 0)
fprintf(stderr, "indirect @offs=%u[%d]\n", offset, rv);
rbuf = ms->o.buf;
ms->o.buf = sbuf;
ms->offset = soffset;
if (rv == 1) {
if ((ms->flags & (MAGIC_MIME|MAGIC_APPLE)) == 0 &&
file_printf(ms, m->desc, offset) == -1)
return -1;
if (file_printf(ms, "%s", rbuf) == -1)
if ((ms->flags & (MAGIC_MIME|MAGIC_APPLE)) == 0 &&
file_printf(ms, m->desc, offset) == -1) {
if (rbuf) {
efree(rbuf);
}
return -1;
}
if (file_printf(ms, "%s", rbuf) == -1) {
if (rbuf) {
efree(rbuf);
}
return -1;
}
}
if (rbuf) {
efree(rbuf);
}
return rv;
case FILE_USE:
if (nbytes < offset)
if (OFFSET_OOB(nbytes, offset, 0))
return 0;
sbuf = m->value.s;
if (*sbuf == '^') {
+39
View File
@@ -0,0 +1,39 @@
Patches applied to file sources tree before generating magic.mgc
and before running create_data_file.php to create data_file.c.
From ef2329cf71acb59204dd981e2c6cce6c81fe467c Mon Sep 17 00:00:00 2001
From: Christos Zoulas <christos@zoulas.com>
Date: Mon, 25 Mar 2013 14:06:55 +0000
Subject: [PATCH] limit to 100 repetitions to avoid excessive backtracking
Carsten Wolff
---
magic/Magdir/commands | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
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
!:mime text/x-awk
-0 regex =^\\s*BEGIN\\s*[{] awk script text
+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
--
1.8.5.5
+39
View File
@@ -0,0 +1,39 @@
--TEST--
Bug #66731: file: infinite recursion
--SKIPIF--
<?php
if (!class_exists('finfo'))
die('skip no fileinfo extension');
--FILE--
<?php
$fd = __DIR__.'/cve-2014-1943.data';
$fm = __DIR__.'/cve-2014-1943.magic';
$a = "\105\122\000\000\000\000\000";
$b = str_repeat("\001", 250000);
$m = "0 byte x\n".
">(1.b) indirect x\n";
file_put_contents($fd, $a);
$fi = finfo_open(FILEINFO_NONE);
var_dump(finfo_file($fi, $fd));
finfo_close($fi);
file_put_contents($fd, $b);
file_put_contents($fm, $m);
$fi = finfo_open(FILEINFO_NONE, $fm);
var_dump(finfo_file($fi, $fd));
finfo_close($fi);
?>
Done
--CLEAN--
<?php
@unlink(__DIR__.'/cve-2014-1943.data');
@unlink(__DIR__.'/cve-2014-1943.magic');
?>
--EXPECTF--
string(%d) "%s"
Warning: finfo_file(): Failed identify data 0:(null) in %s on line %d
bool(false)
Done
+3 -1
View File
@@ -18,7 +18,7 @@ ksort($results);
var_dump($results);
?>
--EXPECTF--
array(8) {
array(9) {
["%s/resources/dir.zip"]=>
string(15) "application/zip"
["%s/resources/test.awk"]=>
@@ -35,4 +35,6 @@ array(8) {
string(15) "application/pdf"
["%s/resources/test.png"]=>
string(9) "image/png"
["%s/resources/test.ppt"]=>
string(29) "application/vnd.ms-powerpoint"
}
Binary file not shown.
Loaded 100 of 296 files, more files were not shown because too many files have changed in this diff. Show more