mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-11 19:20:50 +00:00
Compare commits
8
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
60c5de5cd7 | ||
|
|
c9a6c62b41 | ||
|
|
71e21e17a1 | ||
|
|
fc8f0c34f7 | ||
|
|
43d220603c | ||
|
|
0658e65f64 | ||
|
|
fdb9b6e5ec | ||
|
|
cbf5581d82 |
No files matched your search
@@ -22,10 +22,6 @@ sapi/nsapi/nsapi.c ident
|
||||
sapi/continuity/capi.c ident
|
||||
Zend/RFCs/002.txt ident
|
||||
Zend/RFCs/003.txt ident
|
||||
ext/exif/exif.c ident
|
||||
ext/ldap/ldap.c ident
|
||||
ext/pdo_pgsql/pdo_pgsql.c ident
|
||||
ext/tidy/tidy.c ident
|
||||
NEWS merge=NEWS
|
||||
/ext/bz2/tests/with_strings.phpt -crlf
|
||||
/ext/dom/tests/bug40836.phpt -crlf
|
||||
|
||||
@@ -19,8 +19,6 @@
|
||||
*.tgz
|
||||
*.tar.gz
|
||||
*.tar.bz2
|
||||
*.tar.gz.asc
|
||||
*.tar.bz2.asc
|
||||
.FBCIndex
|
||||
.FBCLockFolder
|
||||
.deps
|
||||
|
||||
@@ -385,12 +385,6 @@ MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
SINCE: 4.0.4
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: hash
|
||||
PRIMARY MAINTAINER: Sara Golemon <pollita@php.net>, Mike Wallner <mike@php.net>, Anatol Belski <ab@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
SINCE: 5.1.2
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: iconv
|
||||
PRIMARY MAINTAINER: Moriyoshi Koizumi <moriyoshi@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
|
||||
@@ -1,612 +1,5 @@
|
||||
PHP NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
03 Sep 2015 PHP 5.4.45
|
||||
|
||||
- Core:
|
||||
. Fixed bug #70172 (Use After Free Vulnerability in unserialize()). (Stas)
|
||||
. Fixed bug #70219 (Use after free vulnerability in session deserializer).
|
||||
(taoguangchen at icloud dot com)
|
||||
|
||||
- EXIF:
|
||||
. Fixed bug #70385 (Buffer over-read in exif_read_data with TIFF IFD tag byte
|
||||
value of 32 bytes). (Stas)
|
||||
|
||||
- hash:
|
||||
. Fixed bug #70312 (HAVAL gives wrong hashes in specific cases). (letsgolee
|
||||
at naver dot com)
|
||||
|
||||
- PCRE:
|
||||
. Fixed bug #70345 (Multiple vulnerabilities related to PCRE functions).
|
||||
(Anatol Belski)
|
||||
|
||||
- SOAP:
|
||||
. Fixed bug #70388 (SOAP serialize_function_call() type confusion / RCE).
|
||||
(Stas)
|
||||
|
||||
- SPL:
|
||||
. Fixed bug #70365 (Use-after-free vulnerability in unserialize() with
|
||||
SplObjectStorage). (taoguangchen at icloud dot com)
|
||||
. Fixed bug #70366 (Use-after-free vulnerability in unserialize() with
|
||||
SplDoublyLinkedList). (taoguangchen at icloud dot com)
|
||||
|
||||
- XSLT:
|
||||
. Fixed bug #69782 (NULL pointer dereference). (Stas)
|
||||
|
||||
- ZIP:
|
||||
. Fixed bug #70350 (ZipArchive::extractTo allows for directory traversal when
|
||||
creating directories). (neal at fb dot com)
|
||||
|
||||
06 Aug 2015 PHP 5.4.44
|
||||
|
||||
- Core:
|
||||
. Fixed bug #69793 (Remotely triggerable stack exhaustion via recursive
|
||||
method calls). (Stas)
|
||||
. Fixed bug #69892 (Different arrays compare indentical due to integer key
|
||||
truncation). (Nikita)
|
||||
. Fixed bug #70121 (unserialize() could lead to unexpected methods execution
|
||||
/ NULL pointer deref). (Stas)
|
||||
|
||||
- OpenSSL:
|
||||
. Fixed bug #70014 (openssl_random_pseudo_bytes() is not cryptographically
|
||||
secure). (Stas)
|
||||
|
||||
- Phar:
|
||||
. Improved fix for bug #69441. (Anatol Belski)
|
||||
. Fixed bug #70019 (Files extracted from archive may be placed outside of
|
||||
destination directory). (Anatol Belski)
|
||||
|
||||
- SOAP:
|
||||
. Fixed bug #70081 (SoapClient info leak / null pointer dereference via
|
||||
multiple type confusions). (Stas)
|
||||
|
||||
- SPL:
|
||||
. Fixed bug #70068 (Dangling pointer in the unserialization of ArrayObject
|
||||
items). (sean.heelan)
|
||||
. Fixed bug #70166 (Use After Free Vulnerability in unserialize() with
|
||||
SPLArrayObject). (taoguangchen at icloud dot com)
|
||||
. Fixed bug #70168 (Use After Free Vulnerability in unserialize() with
|
||||
SplObjectStorage). (taoguangchen at icloud dot com)
|
||||
. Fixed bug #70169 (Use After Free Vulnerability in unserialize() with
|
||||
SplDoublyLinkedList). (taoguangchen at icloud dot com)
|
||||
|
||||
09 Jul 2015 PHP 5.4.43
|
||||
|
||||
- Core:
|
||||
. Fixed bug #69768 (escapeshell*() doesn't cater to !). (cmb)
|
||||
. Fixed bug #69874 (Can't set empty additional_headers for mail()), regression
|
||||
from fix to bug #68776. (Yasuo)
|
||||
|
||||
- Mysqlnd:
|
||||
. Fixed bug #69669 (mysqlnd is vulnerable to BACKRONYM). (CVE-2015-3152)
|
||||
(Andrey)
|
||||
|
||||
- Phar:
|
||||
. Fixed bug #69958 (Segfault in Phar::convertToData on invalid file).
|
||||
(CVE-2015-5589) (Stas)
|
||||
. Fixed bug #69923 (Buffer overflow and stack smashing error in
|
||||
phar_fix_filepath). (CVE-2015-5590) (Stas)
|
||||
|
||||
11 Jun 2015 PHP 5.4.42
|
||||
|
||||
- Core:
|
||||
. Imroved fix for bug #69545 (Integer overflow in ftp_genlist() resulting in
|
||||
heap overflow). (CVE-2015-4643) (Max Spelsberg)
|
||||
. Fixed bug #69646 (OS command injection vulnerability in escapeshellarg).
|
||||
(CVE-2015-4642) (Anatol Belski)
|
||||
. Fixed bug #69719 (Incorrect handling of paths with NULs). (Stas)
|
||||
|
||||
- Litespeed SAPI:
|
||||
. Fixed bug #68812 (Unchecked return value). (George Wang)
|
||||
|
||||
- Mail:
|
||||
. Fixed bug #68776 (mail() does not have mail header injection prevention for
|
||||
additional headers). (Yasuo)
|
||||
|
||||
- Postgres:
|
||||
. Fixed bug #69667 (segfault in php_pgsql_meta_data). (CVE-2015-4644) (Remi)
|
||||
|
||||
- Sqlite3:
|
||||
. Upgrade bundled sqlite to 3.8.10.2. (CVE-2015-3414, CVE-2015-3415,
|
||||
CVE-2015-3416) (Kaplan)
|
||||
|
||||
14 May 2015 PHP 5.4.41
|
||||
|
||||
- Core:
|
||||
. Fixed bug #69364 (PHP Multipart/form-data remote dos Vulnerability).
|
||||
(CVE-2015-4024) (Stas)
|
||||
. Fixed bug #69403 (str_repeat() sign mismatch based memory corruption).
|
||||
(Stas)
|
||||
. Fixed bug #69418 (CVE-2006-7243 fix regressions in 5.4+). (CVE-2015-4025)
|
||||
(Stas)
|
||||
. Fixed bug #69522 (heap buffer overflow in unpack()). (Stas)
|
||||
|
||||
- FTP:
|
||||
. Fixed bug #69545 (Integer overflow in ftp_genlist() resulting in heap
|
||||
overflow). (CVE-2015-4022) (Stas)
|
||||
|
||||
- PCNTL:
|
||||
. Fixed bug #68598 (pcntl_exec() should not allow null char). (CVE-2015-4026)
|
||||
(Stas)
|
||||
|
||||
- PCRE
|
||||
. Upgraded pcrelib to 8.37. (CVE-2015-2325, CVE-2015-2326)
|
||||
|
||||
- Phar:
|
||||
. Fixed bug #69453 (Memory Corruption in phar_parse_tarfile when entry
|
||||
filename starts with null). (CVE-2015-4021) (Stas)
|
||||
|
||||
16 Apr 2015 PHP 5.4.40
|
||||
|
||||
- Apache2handler:
|
||||
. Fixed bug #69218 (potential remote code execution with apache 2.4
|
||||
apache2handler). (CVE-2015-3330) (Gerrit Venema)
|
||||
|
||||
- Core:
|
||||
. Additional fix for bug #69152 (Type confusion vulnerability in
|
||||
exception::getTraceAsString). (Stas)
|
||||
. Fixed bug #69337 (php_stream_url_wrap_http_ex() type-confusion
|
||||
vulnerability). (Stas)
|
||||
. Fixed bug #69353 (Missing null byte checks for paths in various PHP
|
||||
extensions). (Stas)
|
||||
|
||||
- cURL:
|
||||
. Fixed bug #69316 (Use-after-free in php_curl related to
|
||||
CURLOPT_FILE/_INFILE/_WRITEHEADER). (Laruence)
|
||||
|
||||
- Ereg:
|
||||
. Fixed bug #68740 (NULL Pointer Dereference). (Laruence)
|
||||
|
||||
- Fileinfo:
|
||||
. Fixed bug #68819 (Fileinfo on specific file causes spurious OOM and/or
|
||||
segfault). (Anatol Belski)
|
||||
|
||||
- GD:
|
||||
. Fixed bug #68601 (buffer read overflow in gd_gif_in.c). (CVE-2014-9709)
|
||||
(Remi)
|
||||
|
||||
- Phar:
|
||||
. Fixed bug #68901 (use after free). (CVE-2015-2301) (bugreports at internot
|
||||
dot info)
|
||||
. Fixed bug #69324 (Buffer Over-read in unserialize when parsing Phar).
|
||||
(CVE-2015-2783) (Stas)
|
||||
. Fixed bug #69441 (Buffer Overflow when parsing tar/zip/phar in
|
||||
phar_set_inode). (CVE-2015-3329) (Stas)
|
||||
|
||||
- Postgres:
|
||||
. Fixed bug #68741 (Null pointer deference) (CVE-2015-1352). (Xinchen Hui)
|
||||
|
||||
- SOAP:
|
||||
. Fixed bug #69152 (Type Confusion Infoleak Vulnerability in unserialize()
|
||||
with SoapFault). (Dmitry)
|
||||
|
||||
- Sqlite3:
|
||||
. Fixed bug #66550 (SQLite prepared statement use-after-free). (Sean Heelan)
|
||||
|
||||
19 Mar 2015 PHP 5.4.39
|
||||
|
||||
- Core:
|
||||
. Fixed bug #68976 (Use After Free Vulnerability in unserialize())
|
||||
(CVE-2015-2787). (Stas)
|
||||
. Fixed bug #69134 (Per Directory Values overrides PHP_INI_SYSTEM
|
||||
configuration options). (Anatol Belski)
|
||||
. Fixed bug #69207 (move_uploaded_file allows nulls in path). (CVE-2015-2348)
|
||||
(Stas)
|
||||
|
||||
- Ereg:
|
||||
. Fixed bug #69248 (heap overflow vulnerability in regcomp.c) (CVE-2015-2305).
|
||||
(Stas)
|
||||
|
||||
- SOAP:
|
||||
. Fixed bug #69085 (SoapClient's __call() type confusion through
|
||||
unserialize()). (CVE-2015-4147, CVE-2015-4148) (Dmitry)
|
||||
|
||||
- ZIP:
|
||||
. Fixed bug #69253 (ZIP Integer Overflow leads to writing past heap
|
||||
boundary) (CVE-2015-2331). (Stas)
|
||||
|
||||
19 Feb 2015 PHP 5.4.38
|
||||
|
||||
- Core:
|
||||
. Removed support for multi-line headers, as the are deprecated by RFC 7230.
|
||||
(Stas)
|
||||
. Added NULL byte protection to exec, system and passthru. (Yasuo)
|
||||
. Fixed bug #68925 (Mitigation for CVE-2015-0235 – GHOST: glibc gethostbyname
|
||||
buffer overflow). (Stas)
|
||||
. Fixed bug #67827 (broken detection of system crypt sha256/sha512 support).
|
||||
(ncopa at alpinelinux dot org)
|
||||
. Fixed bug #68942 (Use after free vulnerability in unserialize() with
|
||||
DateTimeZone). (CVE-2015-0273) (Stas)
|
||||
|
||||
- Enchant:
|
||||
. Fixed bug #68552 (heap buffer overflow in enchant_broker_request_dict()).
|
||||
(Antony)
|
||||
|
||||
- SOAP:
|
||||
. Fixed bug #67427 (SoapServer cannot handle large messages)
|
||||
(brandt at docoloc dot de)
|
||||
|
||||
22 Jan 2015 PHP 5.4.37
|
||||
- Core:
|
||||
. Fixed bug #68710 (Use After Free Vulnerability in PHP's unserialize()).
|
||||
(CVE-2015-0231) (Stefan Esser)
|
||||
|
||||
- CGI:
|
||||
. Fixed bug #68618 (out of bounds read crashes php-cgi). (CVE-2014-9427)
|
||||
(Stas)
|
||||
|
||||
- EXIF:
|
||||
. Fixed bug #68799: Free called on unitialized pointer. (CVE-2015-0232)
|
||||
(Stas)
|
||||
|
||||
- Fileinfo:
|
||||
. Removed readelf.c and related code from libmagic sources
|
||||
(Remi, Anatol)
|
||||
. Fixed bug #68735 (fileinfo out-of-bounds memory access).
|
||||
(Anatol)
|
||||
|
||||
- OpenSSL:
|
||||
. Fixed bug #55618 (use case-insensitive cert name matching).
|
||||
(Daniel Lowrey)
|
||||
|
||||
18 Dec 2014 PHP 5.4.36
|
||||
|
||||
- Core:
|
||||
. Upgraded crypt_blowfish to version 1.3. (Leigh)
|
||||
. Fixed bug #68545 (NULL pointer dereference in unserialize.c). (Anatol)
|
||||
. Fixed bug #68594 (Use after free vulnerability in unserialize()).
|
||||
(CVE-2014-8142) (Stefan Esser)
|
||||
|
||||
- Mcrypt:
|
||||
. Fixed possible read after end of buffer and use after free. (Dmitry)
|
||||
|
||||
13 Nov 2014 PHP 5.4.35
|
||||
|
||||
- Core:
|
||||
. Fixed bug #68365 (zend_mm_heap corrupted after memory overflow in
|
||||
zend_hash_copy). (Dmitry)
|
||||
|
||||
- Fileinfo:
|
||||
. Fixed bug #68283 (fileinfo: out-of-bounds read in elf note headers).
|
||||
(CVE-2014-3710) (Remi)
|
||||
|
||||
- GMP:
|
||||
. Fixed bug #63595 (GMP memory management conflicts with other libraries
|
||||
using GMP). (Remi)
|
||||
|
||||
- PDO_pgsql:
|
||||
. Fixed bug #66584 (Segmentation fault on statement deallocation) (Matteo)
|
||||
|
||||
16 Oct 2014, PHP 5.4.34
|
||||
|
||||
- Fileinfo:
|
||||
. Fixed bug #66242 (libmagic: don't assume char is signed). (ArdB)
|
||||
|
||||
- Core:
|
||||
. Fixed bug #67985 (Incorrect last used array index copied to new array after
|
||||
unset). (Tjerk)
|
||||
. Fixed bug #68044 (Integer overflow in unserialize() (32-bits only)).
|
||||
(CVE-2014-3669) (Stas)
|
||||
|
||||
- cURL:
|
||||
. Fixed bug #68089 (NULL byte injection - cURL lib). (Stas)
|
||||
|
||||
- EXIF:
|
||||
. Fixed bug #68113 (Heap corruption in exif_thumbnail()). (CVE-2014-3670)
|
||||
(Stas)
|
||||
|
||||
- OpenSSL:
|
||||
. Reverted fixes for bug #41631, due to regressions. (Stas)
|
||||
|
||||
- XMLRPC:
|
||||
. Fixed bug #68027 (Global buffer overflow in mkgmtime() function).
|
||||
(CVE-2014-3668) (Stas)
|
||||
|
||||
18 Sep 2014, PHP 5.4.33
|
||||
|
||||
- Core:
|
||||
. Fixed bug #47358 (glob returns error, should be empty array()). (Pierre)
|
||||
. Fixed bug #65463 (SIGSEGV during zend_shutdown()). (Keyur Govande)
|
||||
. Fixed bug #66036 (Crash on SIGTERM in apache process). (Keyur Govande)
|
||||
|
||||
- OpenSSL:
|
||||
. Fixed bug #41631 (socket timeouts not honored in blocking SSL reads).
|
||||
(Daniel Lowrey)
|
||||
|
||||
- Date:
|
||||
. Fixed bug #66091 (memory leaks in DateTime constructor). (Tjerk)
|
||||
|
||||
- FPM:
|
||||
. Fixed #67606 (FPM with mod_fastcgi/apache2.4 is broken). (David Zuelke)
|
||||
|
||||
- GD:
|
||||
. Made fontFetch's path parser thread-safe. (Sara)
|
||||
|
||||
- Wddx:
|
||||
. Fixed bug #67873 (Segfaults in php_wddx_serialize_var). (Anatol, Remi)
|
||||
|
||||
- Zlib:
|
||||
. Fixed bug #67724 (chained zlib filters silently fail with large amounts of
|
||||
data). (Mike)
|
||||
. Fixed bug #67865 (internal corruption phar error). (Mike)
|
||||
|
||||
21 Aug 2014, PHP 5.4.32
|
||||
|
||||
- COM:
|
||||
. Fixed missing type checks in com_event_sink. (Yussuf Khalil, Stas)
|
||||
. Fixed bug #41577 (DOTNET is successful once per server run).
|
||||
(Aidas Kasparas)
|
||||
|
||||
- Fileinfo:
|
||||
. Fixed bug #67705 (extensive backtracking in rule regular expression).
|
||||
(CVE-2014-3538) (Remi)
|
||||
. Fixed bug #67716 (Segfault in cdf.c). (CVE-2014-3587) (Remi)
|
||||
|
||||
- GD:
|
||||
. Fixed bug #66901 (php-gd 'c_color' NULL pointer dereference).
|
||||
(CVE-2014-2497). (Remi)
|
||||
. Fixed bug #67730 (Null byte injection possible with imagexxx functions).
|
||||
(CVE-2014-5120) (Ryan Mauger)
|
||||
|
||||
- LiteSpeed:
|
||||
. Updated LiteSpeed SAPI code from V5.5 to V6.6 (George Wang)
|
||||
|
||||
- Network:
|
||||
. Fixed bug #67717 (segfault in dns_get_record). (CVE-2014-3597) (Remi)
|
||||
|
||||
- Milter:
|
||||
. Fixed bug #67715 (php-milter does not build and crashes randomly). (Mike)
|
||||
|
||||
- OpenSSL:
|
||||
. Fixed missing type checks in OpenSSL options (Yussuf Khalil, Stas).
|
||||
|
||||
- Readline:
|
||||
. Fixed bug #55496 (Interactive mode doesn't force a newline before the
|
||||
prompt). (Bob, Johannes)
|
||||
. Fixed bug #67496 (Save command history when exiting interactive shell
|
||||
with control-c). (Dmitry Saprykin, Johannes)
|
||||
|
||||
- Sessions:
|
||||
. Fixed missing type checks in php_session_create_id. (Yussuf Khalil, Stas).
|
||||
|
||||
- SPL:
|
||||
. Fixed bug #67539 (ArrayIterator use-after-free due to object change during
|
||||
sorting). (CVE-2014-4698) (research at insighti dot org, Laruence)
|
||||
. Fixed bug #67538 (SPL Iterators use-after-free). (CVE-2014-4670) (Laruence)
|
||||
|
||||
- Core:
|
||||
. Fixed bug #67693 (incorrect push to the empty array) (Tjerk)
|
||||
|
||||
- ODBC:
|
||||
. Fixed bug #60616 (odbc_fetch_into returns junk data at end of multi-byte
|
||||
char fields). (Keyur)
|
||||
|
||||
- MySQLi:
|
||||
. Fixed bug #67839 (mysqli does not handle 4-byte floats correctly). (Keyur)
|
||||
|
||||
24 Jul 2014, PHP 5.4.31
|
||||
|
||||
- Core:
|
||||
. Fixed bug #67428 (header('Location: foo') will override a 308-399 response
|
||||
code). (Adam)
|
||||
. Fixed bug #67436 (Autoloader isn't called if two method definitions don't
|
||||
match). (Bob)
|
||||
. Fixed bug #67091 (make install fails to install libphp5.so on FreeBSD 10.0).
|
||||
(Ferenc)
|
||||
. Fixed bug #67151 (strtr with empty array crashes). (Nikita)
|
||||
. Fixed bug #67407 (Windows 8.1/Server 2012 R2 reported as Windows 8/Server
|
||||
2012). (Christian Wenz)
|
||||
. Implemented FR #34407 (ucwords and Title Case). (Tjerk)
|
||||
|
||||
- CLI server:
|
||||
. Implemented FR #67429 (CLI server is missing some new HTTP response codes).
|
||||
(Adam)
|
||||
. Fixed bug #66830 (Empty header causes PHP built-in web server to hang).
|
||||
(Adam)
|
||||
|
||||
- FPM:
|
||||
. Fixed bug #67530 (error_log=syslog ignored). (Remi)
|
||||
. Fixed bug #67531 (syslog cannot be set in pool configuration). (Remi)
|
||||
|
||||
- Intl:
|
||||
. Fixed bug #67052 (NumberFormatter::parse() resets LC_NUMERIC setting).
|
||||
(Stas)
|
||||
|
||||
- pgsql:
|
||||
. Fixed bug #67550 (Error in code "form" instead of "from", pgsql.c, line 756),
|
||||
which affected builds against libpq < 7.3. (Adam)
|
||||
|
||||
- Phar:
|
||||
. Fixed bug #67587 (Redirection loop on nginx with FPM). (Christian Weiske)
|
||||
|
||||
- Streams:
|
||||
. Fixed bug #67430 (http:// wrapper doesn't follow 308 redirects). (Adam)
|
||||
|
||||
- Session:
|
||||
. Fixed bug #66827 (Session raises E_NOTICE when session name variable is array).
|
||||
(Yasuo)
|
||||
|
||||
26 Jun 2014, PHP 5.4.30
|
||||
|
||||
- Core:
|
||||
. Fixed BC break introduced by patch for bug #67072. (Anatol, Stas)
|
||||
. Fixed bug #66622 (Closures do not correctly capture the late bound class
|
||||
(static::) in some cases). (Levi Morrison)
|
||||
. Fixed bug #67390 (insecure temporary file use in the configure script).
|
||||
(Remi) (CVE-2014-3981)
|
||||
. Fixed bug #67399 (putenv with empty variable may lead to crash). (Stas)
|
||||
. Fixed bug #67498 (phpinfo() Type Confusion Information Leak Vulnerability).
|
||||
(Stefan Esser)
|
||||
|
||||
- CLI server:
|
||||
. Fixed Bug #67406 (built-in web-server segfaults on startup). (Remi)
|
||||
|
||||
- Date:
|
||||
. Fixed bug #67308 (Serialize of DateTime truncates fractions of second).
|
||||
(Adam)
|
||||
. Fixed regression in fix for bug #67118 (constructor can't be called twice).
|
||||
(Remi)
|
||||
|
||||
- Fileinfo:
|
||||
. Fixed bug #67326 (fileinfo: cdf_read_short_sector insufficient boundary
|
||||
check). (CVE-2014-0207)
|
||||
. Fixed bug #67410 (fileinfo: mconvert incorrect handling of truncated pascal
|
||||
string size). (CVE-2014-3478) (Francisco Alonso, Jan Kaluza, Remi)
|
||||
. Fixed bug #67411 (fileinfo: cdf_check_stream_offset insufficient boundary
|
||||
check). (CVE-2014-3479) (Francisco Alonso, Jan Kaluza, Remi)
|
||||
. Fixed bug #67412 (fileinfo: cdf_count_chain insufficient boundary check).
|
||||
(CVE-2014-3480) (Francisco Alonso, Jan Kaluza, Remi)
|
||||
. Fixed bug #67413 (fileinfo: cdf_read_property_info insufficient boundary
|
||||
check). (CVE-2014-3487) (Francisco Alonso, Jan Kaluza, Remi)
|
||||
|
||||
- Intl:
|
||||
. Fixed bug #67349 (Locale::parseLocale Double Free). (Stas)
|
||||
. Fixed bug #67397 (Buffer overflow in locale_get_display_name and
|
||||
uloc_getDisplayName (libicu 4.8.1)). (Stas)
|
||||
|
||||
- Network:
|
||||
. Fixed bug #67432 (Fix potential segfault in dns_get_record()).
|
||||
(CVE-2014-4049). (Sara)
|
||||
|
||||
- OpenSSL:
|
||||
. Fixed bug #65698 (certificates validity parsing does not work past 2050).
|
||||
(Paul Oehler)
|
||||
. Fixed bug #66636 (openssl_x509_parse warning with V_ASN1_GENERALIZEDTIME).
|
||||
(Paul Oehler)
|
||||
|
||||
- SOAP:
|
||||
. Implemented FR #49898 (Add SoapClient::__getCookies()). (Boro Sitnikovski)
|
||||
|
||||
- SPL:
|
||||
. Fixed bug #66127 (Segmentation fault with ArrayObject unset). (Stas)
|
||||
. Fixed bug #67359 (Segfault in recursiveDirectoryIterator). (Laruence)
|
||||
. Fixed bug #67360 (Missing element after ArrayObject::getIterator). (Adam)
|
||||
. Fixed bug #67492 (unserialize() SPL ArrayObject / SPLObjectStorage Type
|
||||
Confusion) (CVE-2014-3515). (Stefan Esser)
|
||||
|
||||
29 May 2014, PHP 5.4.29
|
||||
|
||||
- COM:
|
||||
. Fixed bug #66431 (Special Character via COM Interface (CP_UTF8)). (Anatol)
|
||||
|
||||
- Core:
|
||||
. Fixed bug #65701 (copy() doesn't work when destination filename is created
|
||||
by tempnam()). (Boro Sitnikovski)
|
||||
. Fixed bug #67072 (Echoing unserialized "SplFileObject" crash). (Anatol)
|
||||
. Fixed bug #67245 (usage of memcpy() with overlapping src and dst in
|
||||
zend_exceptions.c). (Bob)
|
||||
. Fixed bug #67247 (spl_fixedarray_resize integer overflow). (Stas)
|
||||
. Fixed bug #67249 (printf out-of-bounds read). (Stas)
|
||||
. Fixed bug #67250 (iptcparse out-of-bounds read). (Stas)
|
||||
. Fixed bug #67252 (convert_uudecode out-of-bounds read). (Stas)
|
||||
|
||||
- Date:
|
||||
. Fixed bug #67118 (DateTime constructor crash with invalid data). (Anatol)
|
||||
. Fixed bug #67251 (date_parse_from_format out-of-bounds read). (Stas)
|
||||
. Fixed bug #67253 (timelib_meridian_with_check out-of-bounds read). (Stas)
|
||||
|
||||
- DOM:
|
||||
. Fixed bug #67081 (DOMDocumentType->internalSubset returns entire DOCTYPE tag,
|
||||
not only the subset). (Anatol)
|
||||
|
||||
- Fileinfo:
|
||||
. Fixed bug #66307 (Fileinfo crashes with powerpoint files). (Anatol)
|
||||
. Fixed bug #67327 (fileinfo: CDF infinite loop in nelements DoS).
|
||||
(CVE-2014-0238)
|
||||
. Fixed bug #67328 (fileinfo: fileinfo: numerous file_printf calls resulting in
|
||||
performance degradation). (CVE-2014-0237)
|
||||
|
||||
- FPM:
|
||||
. Fixed bug #66908 (php-fpm reload leaks epoll_create() file descriptor).
|
||||
(Julio Pintos)
|
||||
|
||||
- Phar:
|
||||
. Fix bug #64498 ($phar->buildFromDirectory can't compress file with an accent
|
||||
in its name). (PR #588)
|
||||
|
||||
01 May 2014, PHP 5.4.28
|
||||
|
||||
- Core:
|
||||
. Fixed bug #61019 (Out of memory on command stream_get_contents). (Mike)
|
||||
. Fixed bug #64330 (stream_socket_server() creates wrong Abstract Namespace
|
||||
UNIX sockets). (Mike)
|
||||
. Fixed bug #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:
|
||||
@@ -615,7 +8,7 @@ PHP NEWS
|
||||
|
||||
- Fileinfo:
|
||||
. Fixed bug #66731 (file: infinite recursion). (CVE-2014-1943) (Remi)
|
||||
. Fixed bug #66820 (out-of-bounds memory access in fileinfo). (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).
|
||||
@@ -1218,8 +611,7 @@ 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).
|
||||
(Elan Ruusamäe, George)
|
||||
. Fixed bug #63228 (-Werror=format-security error in lsapi code). (George)
|
||||
|
||||
- ext/sqlite3:
|
||||
. Fixed bug #63921 (sqlite3::bindvalue and relative PHP functions aren't
|
||||
|
||||
+8
-12
@@ -12,7 +12,7 @@ Collaboration is a Good Thing(tm), and Git lets us do this. Thus, following
|
||||
some basic rules with regards to Git usage will::
|
||||
|
||||
a. Make everybody happier, especially those responsible for maintaining
|
||||
PHP itself.
|
||||
Git itself.
|
||||
|
||||
b. Keep the changes consistently well documented and easily trackable.
|
||||
|
||||
@@ -45,16 +45,15 @@ Currently we have the following branches in use::
|
||||
|
||||
master The active development branch.
|
||||
|
||||
PHP-5.6 Is used to release the PHP 5.6.x series. This is a current
|
||||
PHP-5.5 Is used to release the PHP 5.5.x series. This is a current
|
||||
stable version and is open for bugfixes only.
|
||||
|
||||
PHP-5.5 Is used to release the PHP 5.5.x series. This is an old
|
||||
stable version and is open for security fixes only.
|
||||
PHP-5.4 Is used to release the PHP 5.4.x series. This is a current
|
||||
stable version and is open for bugfixes only.
|
||||
|
||||
PHP-5.4 Is used to release the PHP 5.4.x series. This is an old
|
||||
stable version and is open for security fixes only.
|
||||
|
||||
PHP-5.3 This branch is closed.
|
||||
PHP-5.3 Is used to release the PHP 5.3.x series. This is currently
|
||||
in extended support and open forsecurity fixes only. Triaged
|
||||
via security@php.net
|
||||
|
||||
PHP-5.2 This branch is closed.
|
||||
|
||||
@@ -62,12 +61,9 @@ Currently we have the following branches in use::
|
||||
|
||||
PHP-4.4 This branch is closed.
|
||||
|
||||
PHP-X.Y.Z These branches are used for the release managers for tagging
|
||||
the releases, hence they are closed to the general public.
|
||||
|
||||
The next few rules are more of a technical nature::
|
||||
|
||||
1. All changes should first go to the lowest branch (i.e. 5.6) and then
|
||||
1. All changes should first go to the lowest branch (i.e. 5.3) and then
|
||||
get merged up to all other branches. If a change is not needed for
|
||||
later branches (i.e. fixes for features which where dropped from later
|
||||
branches) an empty merge should be done.
|
||||
|
||||
+10
-21
@@ -183,11 +183,11 @@ last commit id to web/php.git, then, mirrors will now sync
|
||||
Getting the stable release announced
|
||||
------------------------------------
|
||||
|
||||
1. Update phpweb/include/releases.inc with the old release info
|
||||
(updates the download archives)
|
||||
1. Run the bumpRelease script for phpweb on your local checkout
|
||||
|
||||
a. You can run ``php bin/bumpRelease 5`` if you are making a release for the
|
||||
highest branch, otherwise you have to do this manually, see point 1.b
|
||||
a. ``php bin/bumpRelease 5`` to create the release file (releases/x_y_z.php)
|
||||
The release announcement file should list in detail security fixes and
|
||||
changes in behavior (whether due to a bug fix or not).
|
||||
|
||||
b. In case multiple PHP minor versions are in active development you have
|
||||
to manually copy the old information to include/releases.inc
|
||||
@@ -200,18 +200,15 @@ Getting the stable release announced
|
||||
|
||||
c. ``$PHP_X_MD5`` array and update all the md5 sums
|
||||
|
||||
d. ``$PHP_X_SHA256`` array and update all the SHA256 sums
|
||||
d. set ``$PHP_X_RC`` to false!
|
||||
|
||||
e. set ``$PHP_X_RC`` to false!
|
||||
|
||||
f. Make sure there are no outdated "notes" or edited "date" keys in the
|
||||
e. Make sure there are no outdated "notes" or edited "date" keys in the
|
||||
``$RELEASES[X][$PHP_X_VERSION]["source"]`` array
|
||||
|
||||
g. if the windows builds aren't ready yet prefix the "windows" key with a dot (".windows")
|
||||
f. if the windows builds aren't ready yet prefix the "windows" key with a dot (".windows")
|
||||
|
||||
3. Create the release file (releases/x_y_z.php)
|
||||
Usually we use the same content as for point 6, but included in php template
|
||||
instead of the release xml.
|
||||
3. Update phpweb/include/releases.php with the old release info
|
||||
(updates the download archives)
|
||||
|
||||
4. Update php-qa/include/release-qa.php and add the next version as an QARELEASE
|
||||
(prepare for next RC)
|
||||
@@ -256,9 +253,6 @@ to upgrade.
|
||||
9. Wait an hour or two, then send a mail to php-announce@lists.php.net,
|
||||
php-general@lists.php.net and internals@lists.php.net with a text similar to
|
||||
http://news.php.net/php.internals/17222.
|
||||
Please make sure that the mail to php-announce@ is its own completely seperate email.
|
||||
This is to make sure that repiles to the announcement on php-general@ or internals@
|
||||
will not accidentally hit the php-announce@ mailinglist.
|
||||
|
||||
Re-releasing the same version (or -pl)
|
||||
--------------------------------------
|
||||
@@ -275,9 +269,7 @@ Re-releasing the same version (or -pl)
|
||||
|
||||
d. ``$PHP_X_MD5`` array and update all the md5 sums
|
||||
|
||||
e. ``$PHP_X_SHA256`` array and update all the SHA256 sums
|
||||
|
||||
f. Make sure there are no outdated "notes" or edited "date" keys in the
|
||||
e. Make sure there are no outdated "notes" or edited "date" keys in the
|
||||
``$RELEASES[X][$PHP_X_VERSION]["source"]`` array
|
||||
|
||||
3. Add a short notice to phpweb stating that there is a new release, and
|
||||
@@ -294,6 +286,3 @@ to upgrade.
|
||||
5. Wait an hour or two, then send a mail to php-announce@lists.php.net,
|
||||
php-general@lists.php.net and internals@lists.php.net with a text similar to
|
||||
the news entry.
|
||||
Please make sure that the mail to php-announce@ is its own completely seperate email.
|
||||
This is to make sure that repiles to the announcement on php-general@ or internals@
|
||||
will not accidentally hit the php-announce@ mailinglist.
|
||||
Regular → Executable
File mode changed.
@@ -2,7 +2,7 @@
|
||||
#define TSRM_CONFIG_COMMON_H
|
||||
|
||||
#ifndef __CYGWIN__
|
||||
# ifdef _WIN32
|
||||
# if WINNT|WIN32
|
||||
# define TSRM_WIN32
|
||||
# endif
|
||||
#endif
|
||||
|
||||
@@ -10,7 +10,6 @@ PHP 5.4 UPGRADE NOTES
|
||||
2. Changes to reserved words and classes
|
||||
3. Changes to engine behavior
|
||||
4. Changes to existing functions
|
||||
a. unserialize() change
|
||||
5. Changes to existing classes
|
||||
6. Changes to existing methods
|
||||
7. Deprecated Functionality
|
||||
@@ -312,7 +311,7 @@ PHP 5.4 UPGRADE NOTES
|
||||
to limit the amount of stack frames returned.
|
||||
|
||||
- Fixed crypt_blowfish handling of 8-bit characters. crypt() in Blowfish mode
|
||||
now supports hashes marked $2a$, $2x$ and $2y$.
|
||||
now supports hashes marked $2a$, $2x$, $2y$ and $2z$.
|
||||
|
||||
- mbstring now supports following encodings: Shift_JIS/UTF-8 Emoji,
|
||||
JIS X0213:2004 (Shift_JIS-2004, EUC-JP-2004, ISO-2022-JP-2004),
|
||||
@@ -351,47 +350,6 @@ PHP 5.4 UPGRADE NOTES
|
||||
- Since 5.4.7, ctor is always called when new user stream wrapper object is created.
|
||||
Before, it was called only when stream_open was called.
|
||||
|
||||
4a. unserialize() change
|
||||
------------------------
|
||||
|
||||
- Starting PHP 5.4.29, the bug fix for bug #67072 introduces a change to
|
||||
unserialize() function, detailed below:
|
||||
|
||||
If the string looking like 'O:..:"ClassName":...' is unserialized, and
|
||||
the class named is an internal class that declares custom unserializer
|
||||
function, or extends such class, unserialize would fail.
|
||||
|
||||
Using O: for user classes not extending internal classes (including
|
||||
those implementing Serializable) is still supported in 5.4, though
|
||||
it is deprecated and may not be supported in 5.6 for classes that do not
|
||||
originally serialize to O:. Same for using O: for internal classes
|
||||
implementing Serializable (like ArrayObject) and classes that extend
|
||||
them.
|
||||
|
||||
The reason for that is that O: format is meant to be used with classes
|
||||
that do not define custom handlers, and was never intended for the use
|
||||
with classes that do. When used with the class that relies on custom
|
||||
unserializer, it can leave the object of such internal class in an
|
||||
inconsistent state which has been observed to result in crashes and may
|
||||
also lead to memory corruption and ultimately even arbitrary code
|
||||
execution. This was never the intended use of unserializer, and mere
|
||||
possibility of doing this constitutes a bug, since the data passed to
|
||||
unserialize() is not a valid serialization of any object. Since there
|
||||
are many applications applying unserialize() to untrusted data, this
|
||||
presents a potential security vulnerability. Thus, keeping such bug in
|
||||
the code base was considered too dangerous.
|
||||
|
||||
We are aware that some applications use O: format as a way to
|
||||
instantiate classes. This was never the intended usage of serializer,
|
||||
and ReflectionClass methods such as newInstance or
|
||||
newInstanceWithoutConstructor can be used for that. We're working on
|
||||
providing more comprehensive solution for such use cases in PHP 5.6 and
|
||||
welcome the ideas in this area.
|
||||
|
||||
We note also that using unserialize() on any data that is not the result
|
||||
of serialize() call continues to be an unsupported scenario and should
|
||||
not be relied on to produce any specific result.
|
||||
|
||||
==============================
|
||||
5. Changes to existing classes
|
||||
==============================
|
||||
@@ -412,8 +370,6 @@ 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
|
||||
==============================
|
||||
|
||||
@@ -12,7 +12,6 @@ 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
|
||||
@@ -190,20 +189,6 @@ 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
|
||||
========================
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
<?php
|
||||
|
||||
class a {
|
||||
public function test($arg = c::TESTCONSTANT) {
|
||||
echo __METHOD__ . "($arg)\n";
|
||||
}
|
||||
|
||||
static public function staticTest() {
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
<?php
|
||||
|
||||
class b extends a {
|
||||
public function test() {
|
||||
echo __METHOD__ . "()\n";
|
||||
parent::test();
|
||||
}
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
--TEST--
|
||||
bug67436: Autoloader isn't called if user defined error handler is present
|
||||
|
||||
--INI--
|
||||
error_reporting=
|
||||
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
spl_autoload_register(function($classname) {
|
||||
if (in_array($classname, array('a','b','c'))) {
|
||||
require_once ($classname . '.php');
|
||||
}
|
||||
});
|
||||
|
||||
set_error_handler(function ($errno, $errstr, $errfile, $errline) {
|
||||
}, error_reporting());
|
||||
|
||||
a::staticTest();
|
||||
|
||||
$b = new b();
|
||||
$b->test();
|
||||
|
||||
--EXPECT--
|
||||
b::test()
|
||||
a::test(c::TESTCONSTANT)
|
||||
@@ -1,24 +0,0 @@
|
||||
--TEST--
|
||||
bug67436: E_STRICT instead of custom error handler
|
||||
|
||||
--INI--
|
||||
error_reporting=-1
|
||||
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
spl_autoload_register(function($classname) {
|
||||
if (in_array($classname, array('a','b','c'))) {
|
||||
require_once ($classname . '.php');
|
||||
}
|
||||
});
|
||||
|
||||
a::staticTest();
|
||||
|
||||
$b = new b();
|
||||
$b->test();
|
||||
|
||||
--EXPECTF--
|
||||
Strict Standards: Declaration of b::test() should be compatible with a::test($arg = c::TESTCONSTANT) in %s/bug67436/b.php on line %d
|
||||
b::test()
|
||||
a::test(c::TESTCONSTANT)
|
||||
@@ -1,5 +0,0 @@
|
||||
<?php
|
||||
|
||||
class c {
|
||||
const TESTCONSTANT = "c::TESTCONSTANT";
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
--TEST--
|
||||
Bug #67985 - Last used array index not copied to new array at assignment
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$a = ['zero', 'one', 'two'];
|
||||
unset($a[2]);
|
||||
$b = $a;
|
||||
$a[] = 'three';
|
||||
$b[] = 'three';
|
||||
|
||||
var_dump($a === $b);
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
bool(true)
|
||||
@@ -1,10 +0,0 @@
|
||||
--TEST--
|
||||
Bug #69892: Different arrays compare indentical due to integer key truncation
|
||||
--SKIPIF--
|
||||
<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platforms only"); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
var_dump([0 => 0] === [0x100000000 => 0]);
|
||||
?>
|
||||
--EXPECT--
|
||||
bool(false)
|
||||
@@ -1,9 +0,0 @@
|
||||
--TEST--
|
||||
Bug #70121 (unserialize() could lead to unexpected methods execution / NULL pointer deref)
|
||||
--FILE--
|
||||
<?php
|
||||
unserialize('O:12:"DateInterval":1:{s:4:"days";O:9:"Exception":7:{s:10:"'."\0".'*'."\0".'message";s:1:"x";s:17:"'."\0".'Exception'."\0".'string";s:1:"A";s:7:"'."\0".'*'."\0".'code";i:0;s:7:"'."\0".'*'."\0".'file";s:1:"a";s:7:"'."\0".'*'."\0".'line";i:1337;s:16:"'."\0".'Exception'."\0".'trace";a:0:{}s:19:"'."\0".'Exception'."\0".'previous";O:8:"stdClass":0:{}}}');
|
||||
?>
|
||||
OK
|
||||
--EXPECT--
|
||||
OK
|
||||
@@ -1,37 +0,0 @@
|
||||
--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
|
||||
-14
@@ -813,20 +813,6 @@ void zend_shutdown(TSRMLS_D) /* {{{ */
|
||||
zend_shutdown_timeout_thread();
|
||||
#endif
|
||||
zend_destroy_rsrc_list(&EG(persistent_list) TSRMLS_CC);
|
||||
|
||||
if (EG(active))
|
||||
{
|
||||
/*
|
||||
* The order of destruction is important here.
|
||||
* See bugs #65463 and 66036.
|
||||
*/
|
||||
zend_hash_reverse_apply(GLOBAL_FUNCTION_TABLE, (apply_func_t) zend_cleanup_function_data_full TSRMLS_CC);
|
||||
zend_hash_reverse_apply(GLOBAL_CLASS_TABLE, (apply_func_t) zend_cleanup_user_class_data TSRMLS_CC);
|
||||
zend_cleanup_internal_classes(TSRMLS_C);
|
||||
zend_hash_reverse_apply(GLOBAL_FUNCTION_TABLE, (apply_func_t) clean_non_persistent_function_full TSRMLS_CC);
|
||||
zend_hash_reverse_apply(GLOBAL_CLASS_TABLE, (apply_func_t) clean_non_persistent_class_full TSRMLS_CC);
|
||||
}
|
||||
|
||||
zend_destroy_modules();
|
||||
|
||||
zend_hash_destroy(GLOBAL_FUNCTION_TABLE);
|
||||
|
||||
+11
-11
@@ -980,7 +980,7 @@ static void zend_mm_random(unsigned char *buf, size_t size) /* {{{ */
|
||||
int has_context = 0;
|
||||
|
||||
if (!CryptAcquireContext(&hCryptProv, NULL, NULL, PROV_RSA_FULL, 0)) {
|
||||
/* Could mean that the key container does not exist, let try
|
||||
/* Could mean that the key container does not exist, let try
|
||||
again by asking for a new one */
|
||||
if (GetLastError() == NTE_BAD_KEYSET) {
|
||||
if (CryptAcquireContext(&hCryptProv, NULL, NULL, PROV_RSA_FULL, CRYPT_NEWKEYSET)) {
|
||||
@@ -1344,7 +1344,7 @@ static int zend_mm_check_ptr(zend_mm_heap *heap, void *ptr, int silent ZEND_FILE
|
||||
}
|
||||
if (!silent) {
|
||||
TSRMLS_FETCH();
|
||||
|
||||
|
||||
zend_message_dispatcher(ZMSG_LOG_SCRIPT_NAME, NULL TSRMLS_CC);
|
||||
zend_debug_alloc_output("---------------------------------------\n");
|
||||
zend_debug_alloc_output("%s(%d) : Block "PTR_FMT" status:\n" ZEND_FILE_LINE_RELAY_CC, ptr);
|
||||
@@ -2171,7 +2171,7 @@ static void *_zend_mm_realloc_int(zend_mm_heap *heap, void *p, size_t size ZEND_
|
||||
#if ZEND_MM_CACHE
|
||||
if (ZEND_MM_SMALL_SIZE(true_size)) {
|
||||
size_t index = ZEND_MM_BUCKET_INDEX(true_size);
|
||||
|
||||
|
||||
if (heap->cache[index] != NULL) {
|
||||
zend_mm_free_block *best_fit;
|
||||
zend_mm_free_block **cache;
|
||||
@@ -2184,7 +2184,7 @@ static void *_zend_mm_realloc_int(zend_mm_heap *heap, void *p, size_t size ZEND_
|
||||
heap->cache[index] = best_fit->prev_free_block;
|
||||
ZEND_MM_CHECK_MAGIC(best_fit, MEM_BLOCK_CACHED);
|
||||
ZEND_MM_SET_DEBUG_INFO(best_fit, size, 1, 0);
|
||||
|
||||
|
||||
ptr = ZEND_MM_DATA_OF(best_fit);
|
||||
|
||||
#if ZEND_DEBUG || ZEND_MM_HEAP_PROTECTION
|
||||
@@ -2466,7 +2466,7 @@ static inline size_t safe_address(size_t nmemb, size_t size, size_t offset)
|
||||
: "%0"(res),
|
||||
"rm"(size),
|
||||
"rm"(offset));
|
||||
|
||||
|
||||
if (UNEXPECTED(overflow)) {
|
||||
zend_error_noreturn(E_ERROR, "Possible integer overflow in memory allocation (%zu * %zu + %zu)", nmemb, size, offset);
|
||||
return 0;
|
||||
@@ -2575,7 +2575,7 @@ ZEND_API void *_ecalloc(size_t nmemb, size_t size ZEND_FILE_LINE_DC ZEND_FILE_LI
|
||||
|
||||
ZEND_API char *_estrdup(const char *s ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
|
||||
{
|
||||
size_t length;
|
||||
int length;
|
||||
char *p;
|
||||
#ifdef ZEND_SIGNALS
|
||||
TSRMLS_FETCH();
|
||||
@@ -2583,13 +2583,13 @@ ZEND_API char *_estrdup(const char *s ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
|
||||
|
||||
HANDLE_BLOCK_INTERRUPTIONS();
|
||||
|
||||
length = strlen(s);
|
||||
p = (char *) _emalloc(safe_address(length, 1, 1) ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
|
||||
length = strlen(s)+1;
|
||||
p = (char *) _emalloc(length ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
|
||||
if (UNEXPECTED(p == NULL)) {
|
||||
HANDLE_UNBLOCK_INTERRUPTIONS();
|
||||
return p;
|
||||
}
|
||||
memcpy(p, s, length+1);
|
||||
memcpy(p, s, length);
|
||||
HANDLE_UNBLOCK_INTERRUPTIONS();
|
||||
return p;
|
||||
}
|
||||
@@ -2603,7 +2603,7 @@ ZEND_API char *_estrndup(const char *s, uint length ZEND_FILE_LINE_DC ZEND_FILE_
|
||||
|
||||
HANDLE_BLOCK_INTERRUPTIONS();
|
||||
|
||||
p = (char *) _emalloc(safe_address(length, 1, 1) ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
|
||||
p = (char *) _emalloc(length+1 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
|
||||
if (UNEXPECTED(p == NULL)) {
|
||||
HANDLE_UNBLOCK_INTERRUPTIONS();
|
||||
return p;
|
||||
@@ -2624,7 +2624,7 @@ ZEND_API char *zend_strndup(const char *s, uint length)
|
||||
|
||||
HANDLE_BLOCK_INTERRUPTIONS();
|
||||
|
||||
p = (char *) malloc(safe_address(length, 1, 1));
|
||||
p = (char *) malloc(length+1);
|
||||
if (UNEXPECTED(p == NULL)) {
|
||||
HANDLE_UNBLOCK_INTERRUPTIONS();
|
||||
return p;
|
||||
|
||||
@@ -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
|
||||
};
|
||||
|
||||
@@ -487,7 +487,6 @@ 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 */
|
||||
@@ -499,7 +498,10 @@ 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;
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
+3
-6
@@ -3150,11 +3150,8 @@ static char * zend_get_function_declaration(zend_function *fptr TSRMLS_DC) /* {{
|
||||
*zv = *precv->op2.zv;
|
||||
zval_copy_ctor(zv);
|
||||
INIT_PZVAL(zv);
|
||||
if ((Z_TYPE_P(zv) & IS_CONSTANT_TYPE_MASK) == IS_CONSTANT) {
|
||||
REALLOC_BUF_IF_EXCEED(buf, offset, length, Z_STRLEN_P(zv));
|
||||
memcpy(offset, Z_STRVAL_P(zv), Z_STRLEN_P(zv));
|
||||
offset += Z_STRLEN_P(zv);
|
||||
} else if (Z_TYPE_P(zv) == IS_BOOL) {
|
||||
zval_update_constant_ex(&zv, (void*)1, fptr->common.scope TSRMLS_CC);
|
||||
if (Z_TYPE_P(zv) == IS_BOOL) {
|
||||
if (Z_LVAL_P(zv)) {
|
||||
memcpy(offset, "true", 4);
|
||||
offset += 4;
|
||||
@@ -3176,7 +3173,7 @@ static char * zend_get_function_declaration(zend_function *fptr TSRMLS_DC) /* {{
|
||||
*(offset++) = '.';
|
||||
}
|
||||
*(offset++) = '\'';
|
||||
} else if (Z_TYPE_P(zv) == IS_ARRAY || (Z_TYPE_P(zv) & IS_CONSTANT_TYPE_MASK) == IS_CONSTANT_ARRAY) {
|
||||
} else if (Z_TYPE_P(zv) == IS_ARRAY) {
|
||||
memcpy(offset, "Array", 5);
|
||||
offset += 5;
|
||||
} else {
|
||||
|
||||
@@ -639,8 +639,6 @@ ZEND_API void zend_cleanup_internal_class_data(zend_class_entry *ce TSRMLS_DC);
|
||||
ZEND_API void zend_cleanup_internal_classes(TSRMLS_D);
|
||||
ZEND_API int zend_cleanup_function_data(zend_function *function TSRMLS_DC);
|
||||
ZEND_API int zend_cleanup_function_data_full(zend_function *function TSRMLS_DC);
|
||||
ZEND_API int clean_non_persistent_function_full(zend_function *function TSRMLS_DC);
|
||||
ZEND_API int clean_non_persistent_class_full(zend_class_entry **ce TSRMLS_DC);
|
||||
|
||||
ZEND_API void destroy_zend_function(zend_function *function TSRMLS_DC);
|
||||
ZEND_API void zend_function_dtor(zend_function *function);
|
||||
|
||||
+12
-100
@@ -41,7 +41,7 @@ void zend_exception_set_previous(zval *exception, zval *add_previous TSRMLS_DC)
|
||||
if (exception == add_previous || !add_previous || !exception) {
|
||||
return;
|
||||
}
|
||||
if (Z_TYPE_P(add_previous) != IS_OBJECT || !instanceof_function(Z_OBJCE_P(add_previous), default_exception_ce TSRMLS_CC)) {
|
||||
if (Z_TYPE_P(add_previous) != IS_OBJECT && !instanceof_function(Z_OBJCE_P(add_previous), default_exception_ce TSRMLS_CC)) {
|
||||
zend_error(E_ERROR, "Cannot set non exception as previous exception");
|
||||
return;
|
||||
}
|
||||
@@ -218,33 +218,6 @@ ZEND_METHOD(exception, __construct)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto Exception::__wakeup()
|
||||
Exception unserialize checks */
|
||||
#define CHECK_EXC_TYPE(name, type) \
|
||||
value = zend_read_property(default_exception_ce, object, name, sizeof(name)-1, 0 TSRMLS_CC); \
|
||||
if(value && Z_TYPE_P(value) != type) { \
|
||||
zval *tmp; \
|
||||
MAKE_STD_ZVAL(tmp); \
|
||||
ZVAL_STRINGL(tmp, name, sizeof(name)-1, 1); \
|
||||
Z_OBJ_HANDLER_P(object, unset_property)(object, tmp, 0 TSRMLS_CC); \
|
||||
zval_ptr_dtor(&tmp); \
|
||||
}
|
||||
|
||||
ZEND_METHOD(exception, __wakeup)
|
||||
{
|
||||
zval *value;
|
||||
zval *object = getThis();
|
||||
HashTable *intern_ht = zend_std_get_properties(getThis() TSRMLS_CC);
|
||||
CHECK_EXC_TYPE("message", IS_STRING);
|
||||
CHECK_EXC_TYPE("string", IS_STRING);
|
||||
CHECK_EXC_TYPE("code", IS_LONG);
|
||||
CHECK_EXC_TYPE("file", IS_STRING);
|
||||
CHECK_EXC_TYPE("line", IS_LONG);
|
||||
CHECK_EXC_TYPE("trace", IS_ARRAY);
|
||||
CHECK_EXC_TYPE("previous", IS_OBJECT);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto ErrorException::__construct(string message, int code, int severity [, string filename [, int lineno [, Exception previous]]])
|
||||
ErrorException constructor */
|
||||
ZEND_METHOD(error_exception, __construct)
|
||||
@@ -387,11 +360,6 @@ 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) /* {{{ */
|
||||
@@ -403,7 +371,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:
|
||||
* convert_to_string_ex(arg);
|
||||
* conver_to_string_ex(arg);
|
||||
* append it and kill the now tmp arg.
|
||||
* but that could cause some E_NOTICE and also damn long lines.
|
||||
*/
|
||||
@@ -426,58 +394,8 @@ static int _build_trace_args(zval **arg TSRMLS_DC, int num_args, va_list args, z
|
||||
l_added += 3 + 1;
|
||||
}
|
||||
while (--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;
|
||||
}
|
||||
if ((*str)[*len - l_added] < 32) {
|
||||
(*str)[*len - l_added] = '?';
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -613,15 +531,11 @@ ZEND_METHOD(exception, getTraceAsString)
|
||||
int res_len = 0, *len = &res_len, num = 0;
|
||||
|
||||
DEFAULT_0_PARAMS;
|
||||
|
||||
trace = zend_read_property(default_exception_ce, getThis(), "trace", sizeof("trace")-1, 1 TSRMLS_CC);
|
||||
if(Z_TYPE_P(trace) != IS_ARRAY) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
|
||||
res = estrdup("");
|
||||
str = &res;
|
||||
|
||||
trace = zend_read_property(default_exception_ce, getThis(), "trace", sizeof("trace")-1, 1 TSRMLS_CC);
|
||||
zend_hash_apply_with_arguments(Z_ARRVAL_P(trace) TSRMLS_CC, (apply_func_args_t)_build_trace_string, 3, str, len, &num);
|
||||
|
||||
s_tmp = emalloc(1 + MAX_LENGTH_OF_LONG + 7 + 1);
|
||||
@@ -629,8 +543,8 @@ ZEND_METHOD(exception, getTraceAsString)
|
||||
TRACE_APPEND_STRL(s_tmp, strlen(s_tmp));
|
||||
efree(s_tmp);
|
||||
|
||||
res[res_len] = '\0';
|
||||
RETURN_STRINGL(res, res_len, 0);
|
||||
res[res_len] = '\0';
|
||||
RETURN_STRINGL(res, res_len, 0);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -667,15 +581,15 @@ ZEND_METHOD(exception, __toString)
|
||||
int len = 0;
|
||||
zend_fcall_info fci;
|
||||
zval fname;
|
||||
|
||||
|
||||
DEFAULT_0_PARAMS;
|
||||
|
||||
|
||||
str = estrndup("", 0);
|
||||
|
||||
exception = getThis();
|
||||
ZVAL_STRINGL(&fname, "gettraceasstring", sizeof("gettraceasstring")-1, 1);
|
||||
|
||||
while (exception && Z_TYPE_P(exception) == IS_OBJECT && instanceof_function(Z_OBJCE_P(exception), default_exception_ce TSRMLS_CC)) {
|
||||
while (exception && Z_TYPE_P(exception) == IS_OBJECT) {
|
||||
prev_str = str;
|
||||
_default_exception_get_entry(exception, "message", sizeof("message")-1, &message TSRMLS_CC);
|
||||
_default_exception_get_entry(exception, "file", sizeof("file")-1, &file TSRMLS_CC);
|
||||
@@ -685,7 +599,6 @@ ZEND_METHOD(exception, __toString)
|
||||
convert_to_string(&file);
|
||||
convert_to_long(&line);
|
||||
|
||||
trace = NULL;
|
||||
fci.size = sizeof(fci);
|
||||
fci.function_table = &Z_OBJCE_P(exception)->function_table;
|
||||
fci.function_name = &fname;
|
||||
@@ -698,7 +611,7 @@ ZEND_METHOD(exception, __toString)
|
||||
|
||||
zend_call_function(&fci, NULL TSRMLS_CC);
|
||||
|
||||
if (trace && Z_TYPE_P(trace) != IS_STRING) {
|
||||
if (Z_TYPE_P(trace) != IS_STRING) {
|
||||
zval_ptr_dtor(&trace);
|
||||
trace = NULL;
|
||||
}
|
||||
@@ -755,7 +668,6 @@ ZEND_END_ARG_INFO()
|
||||
const static zend_function_entry default_exception_functions[] = {
|
||||
ZEND_ME(exception, __clone, NULL, ZEND_ACC_PRIVATE|ZEND_ACC_FINAL)
|
||||
ZEND_ME(exception, __construct, arginfo_exception___construct, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME(exception, __wakeup, NULL, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME(exception, getMessage, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
|
||||
ZEND_ME(exception, getCode, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
|
||||
ZEND_ME(exception, getFile, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
|
||||
|
||||
@@ -108,7 +108,7 @@ static int clean_non_persistent_function(zend_function *function TSRMLS_DC) /* {
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
ZEND_API int clean_non_persistent_function_full(zend_function *function TSRMLS_DC) /* {{{ */
|
||||
static int clean_non_persistent_function_full(zend_function *function TSRMLS_DC) /* {{{ */
|
||||
{
|
||||
return (function->type == ZEND_INTERNAL_FUNCTION) ? ZEND_HASH_APPLY_KEEP : ZEND_HASH_APPLY_REMOVE;
|
||||
}
|
||||
@@ -120,7 +120,7 @@ static int clean_non_persistent_class(zend_class_entry **ce TSRMLS_DC) /* {{{ */
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
ZEND_API int clean_non_persistent_class_full(zend_class_entry **ce TSRMLS_DC) /* {{{ */
|
||||
static int clean_non_persistent_class_full(zend_class_entry **ce TSRMLS_DC) /* {{{ */
|
||||
{
|
||||
return ((*ce)->type == ZEND_INTERNAL_CLASS) ? ZEND_HASH_APPLY_KEEP : ZEND_HASH_APPLY_REMOVE;
|
||||
}
|
||||
|
||||
+3
-2
@@ -1513,10 +1513,11 @@ ZEND_API int zend_hash_compare(HashTable *ht1, HashTable *ht2, compare_func_t co
|
||||
}
|
||||
if (ordered) {
|
||||
if (p1->nKeyLength==0 && p2->nKeyLength==0) { /* numeric indices */
|
||||
if (p1->h != p2->h) {
|
||||
result = p1->h - p2->h;
|
||||
if (result!=0) {
|
||||
HASH_UNPROTECT_RECURSION(ht1);
|
||||
HASH_UNPROTECT_RECURSION(ht2);
|
||||
return p1->h > p2->h ? 1 : -1;
|
||||
return result;
|
||||
}
|
||||
} else { /* string indices */
|
||||
result = p1->nKeyLength - p2->nKeyLength;
|
||||
|
||||
@@ -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 = NULL;
|
||||
unsigned char *filtered;
|
||||
size_t filtered_len;
|
||||
|
||||
if (LANG_SCNG(output_filter)) {
|
||||
|
||||
@@ -1264,19 +1264,14 @@ ZEND_API int concat_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{
|
||||
zend_error(E_ERROR, "String size overflow");
|
||||
}
|
||||
|
||||
Z_STRVAL_P(result) = safe_erealloc(Z_STRVAL_P(result), res_len, 1, 1);
|
||||
Z_STRVAL_P(result) = erealloc(Z_STRVAL_P(result), res_len+1);
|
||||
|
||||
memcpy(Z_STRVAL_P(result)+Z_STRLEN_P(result), Z_STRVAL_P(op2), Z_STRLEN_P(op2));
|
||||
Z_STRVAL_P(result)[res_len]=0;
|
||||
Z_STRLEN_P(result) = res_len;
|
||||
} else {
|
||||
int length = Z_STRLEN_P(op1) + Z_STRLEN_P(op2);
|
||||
char *buf;
|
||||
|
||||
if (Z_STRLEN_P(op1) < 0 || Z_STRLEN_P(op2) < 0 || (int) (Z_STRLEN_P(op1) + Z_STRLEN_P(op2)) < 0) {
|
||||
zend_error(E_ERROR, "String size overflow");
|
||||
}
|
||||
buf = (char *) safe_emalloc(length, 1, 1);
|
||||
char *buf = (char *) emalloc(length + 1);
|
||||
|
||||
memcpy(buf, Z_STRVAL_P(op1), Z_STRLEN_P(op1));
|
||||
memcpy(buf + Z_STRLEN_P(op1), Z_STRVAL_P(op2), Z_STRLEN_P(op2));
|
||||
@@ -2072,7 +2067,7 @@ ZEND_API void zendi_smart_strcmp(zval *result, zval *s1, zval *s2) /* {{{ */
|
||||
} else if (ret2!=IS_DOUBLE) {
|
||||
if (oflow1) {
|
||||
ZVAL_LONG(result, oflow1);
|
||||
return;
|
||||
return;
|
||||
}
|
||||
dval2 = (double) lval2;
|
||||
} else if (dval1 == dval2 && !zend_finite(dval1)) {
|
||||
|
||||
@@ -135,9 +135,8 @@ ZEND_API void _zval_copy_ctor_func(zval *zvalue ZEND_FILE_LINE_DC)
|
||||
}
|
||||
ALLOC_HASHTABLE_REL(tmp_ht);
|
||||
zend_hash_init(tmp_ht, zend_hash_num_elements(original_ht), NULL, ZVAL_PTR_DTOR, 0);
|
||||
zvalue->value.ht = tmp_ht;
|
||||
zend_hash_copy(tmp_ht, original_ht, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
|
||||
tmp_ht->nNextFreeElement = original_ht->nNextFreeElement;
|
||||
zvalue->value.ht = tmp_ht;
|
||||
}
|
||||
break;
|
||||
case IS_OBJECT:
|
||||
|
||||
+1
-8
@@ -5161,7 +5161,6 @@ 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();
|
||||
|
||||
@@ -5170,13 +5169,7 @@ ZEND_VM_HANDLER(153, ZEND_DECLARE_LAMBDA_FUNCTION, CONST, UNUSED)
|
||||
zend_error_noreturn(E_ERROR, "Base lambda function for closure not found");
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
zend_create_closure(&EX_T(opline->result.var).tmp_var, op_array, EG(scope), EG(This) TSRMLS_CC);
|
||||
|
||||
CHECK_EXCEPTION();
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
|
||||
@@ -5847,7 +5847,6 @@ 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();
|
||||
|
||||
@@ -5856,13 +5855,7 @@ static int ZEND_FASTCALL ZEND_DECLARE_LAMBDA_FUNCTION_SPEC_CONST_UNUSED_HANDLER
|
||||
zend_error_noreturn(E_ERROR, "Base lambda function for closure not found");
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
zend_create_closure(&EX_T(opline->result.var).tmp_var, op_array, EG(scope), EG(This) TSRMLS_CC);
|
||||
|
||||
CHECK_EXCEPTION();
|
||||
ZEND_VM_NEXT_OPCODE();
|
||||
|
||||
@@ -1210,7 +1210,7 @@ function gen_vm($def, $skel) {
|
||||
fputs($f,"#define $op $code\n");
|
||||
}
|
||||
|
||||
fputs($f, "\n#endif\n");
|
||||
fputs($f, "\n#endif");
|
||||
fclose($f);
|
||||
echo "zend_vm_opcodes.h generated successfully.\n";
|
||||
|
||||
|
||||
@@ -165,4 +165,4 @@ ZEND_API const char *zend_get_opcode_name(zend_uchar opcode);
|
||||
#define ZEND_QM_ASSIGN_VAR 157
|
||||
#define ZEND_JMP_SET_VAR 158
|
||||
|
||||
#endif
|
||||
#endif
|
||||
+2
-2
@@ -1711,7 +1711,7 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
FILE *fp;
|
||||
long position;
|
||||
char *filename = tmpnam(NULL);
|
||||
char *filename = "/tmp/phpglibccheck";
|
||||
|
||||
fp = fopen(filename, "w");
|
||||
if (fp == NULL) {
|
||||
@@ -2800,7 +2800,7 @@ AC_DEFUN([PHP_DETECT_ICC],
|
||||
|
||||
dnl PHP_DETECT_SUNCC
|
||||
dnl Detect if the systems default compiler is suncc.
|
||||
dnl We also set some useful CFLAGS if the user didn't set any
|
||||
dnl We also set some usefull CFLAGS if the user didn't set any
|
||||
AC_DEFUN([PHP_DETECT_SUNCC],[
|
||||
SUNCC="no"
|
||||
AC_MSG_CHECKING([for suncc])
|
||||
|
||||
Vendored
+8
@@ -1532,6 +1532,10 @@ dgux*)
|
||||
shlibpath_var=LD_LIBRARY_PATH
|
||||
;;
|
||||
|
||||
freebsd1*)
|
||||
dynamic_linker=no
|
||||
;;
|
||||
|
||||
freebsd* | dragonfly*)
|
||||
# DragonFly does not have aout. When/if they implement a new
|
||||
# versioning mechanism, adjust this.
|
||||
@@ -5838,6 +5842,10 @@ _LT_EOF
|
||||
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
|
||||
;;
|
||||
|
||||
freebsd1*)
|
||||
_LT_AC_TAGVAR(ld_shlibs, $1)=no
|
||||
;;
|
||||
|
||||
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
|
||||
# support. Future versions do this automatically, but an explicit c++rt0.o
|
||||
# does not break anything, and helps significantly (at the cost of a little
|
||||
|
||||
+1
-1
@@ -119,7 +119,7 @@ int zend_sprintf(char *buffer, const char *format, ...);
|
||||
|
||||
PHP_MAJOR_VERSION=5
|
||||
PHP_MINOR_VERSION=4
|
||||
PHP_RELEASE_VERSION=45
|
||||
PHP_RELEASE_VERSION=26
|
||||
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`
|
||||
|
||||
@@ -229,9 +229,6 @@ 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;
|
||||
}
|
||||
|
||||
@@ -241,9 +238,6 @@ 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) {
|
||||
|
||||
@@ -698,9 +698,9 @@ PHP_FUNCTION(com_event_sink)
|
||||
/* 0 => typelibname, 1 => dispname */
|
||||
zval **tmp;
|
||||
|
||||
if (zend_hash_index_find(Z_ARRVAL_P(sink), 0, (void**)&tmp) == SUCCESS && Z_TYPE_PP(tmp) == IS_STRING)
|
||||
if (zend_hash_index_find(Z_ARRVAL_P(sink), 0, (void**)&tmp) == SUCCESS)
|
||||
typelibname = Z_STRVAL_PP(tmp);
|
||||
if (zend_hash_index_find(Z_ARRVAL_P(sink), 1, (void**)&tmp) == SUCCESS && Z_TYPE_PP(tmp) == IS_STRING)
|
||||
if (zend_hash_index_find(Z_ARRVAL_P(sink), 1, (void**)&tmp) == SUCCESS)
|
||||
dispname = Z_STRVAL_PP(tmp);
|
||||
} else if (sink != NULL) {
|
||||
convert_to_string(sink);
|
||||
|
||||
@@ -198,8 +198,7 @@ PHP_FUNCTION(com_dotnet_create_instance)
|
||||
IUnknown *unk = NULL;
|
||||
|
||||
php_com_initialize(TSRMLS_C);
|
||||
stuff = (struct dotnet_runtime_stuff*)COMG(dotnet_runtime_stuff);
|
||||
if (stuff == NULL) {
|
||||
if (COMG(dotnet_runtime_stuff) == NULL) {
|
||||
hr = dotnet_init(&where TSRMLS_CC);
|
||||
if (FAILED(hr)) {
|
||||
char buf[1024];
|
||||
@@ -211,36 +210,10 @@ PHP_FUNCTION(com_dotnet_create_instance)
|
||||
ZVAL_NULL(object);
|
||||
return;
|
||||
}
|
||||
stuff = (struct dotnet_runtime_stuff*)COMG(dotnet_runtime_stuff);
|
||||
|
||||
} else if (stuff->dotnet_domain == NULL) {
|
||||
where = "ICorRuntimeHost_GetDefaultDomain";
|
||||
hr = ICorRuntimeHost_GetDefaultDomain(stuff->dotnet_host, &unk);
|
||||
if (FAILED(hr)) {
|
||||
char buf[1024];
|
||||
char *err = php_win32_error_to_msg(hr);
|
||||
snprintf(buf, sizeof(buf), "Failed to re-init .Net domain [%s] %s", where, err);
|
||||
if (err)
|
||||
LocalFree(err);
|
||||
php_com_throw_exception(hr, buf TSRMLS_CC);
|
||||
ZVAL_NULL(object);
|
||||
return;
|
||||
}
|
||||
|
||||
where = "QI: System._AppDomain";
|
||||
hr = IUnknown_QueryInterface(unk, &IID_mscorlib_System_AppDomain, (LPVOID*)&stuff->dotnet_domain);
|
||||
if (FAILED(hr)) {
|
||||
char buf[1024];
|
||||
char *err = php_win32_error_to_msg(hr);
|
||||
snprintf(buf, sizeof(buf), "Failed to re-init .Net domain [%s] %s", where, err);
|
||||
if (err)
|
||||
LocalFree(err);
|
||||
php_com_throw_exception(hr, buf TSRMLS_CC);
|
||||
ZVAL_NULL(object);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
stuff = (struct dotnet_runtime_stuff*)COMG(dotnet_runtime_stuff);
|
||||
|
||||
obj = CDNO_FETCH(object);
|
||||
|
||||
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|l",
|
||||
|
||||
@@ -46,13 +46,7 @@ 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));
|
||||
|
||||
@@ -154,11 +154,7 @@ 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);
|
||||
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));
|
||||
}
|
||||
V_BSTR(v) = SysAllocStringByteLen((char*)olestring, Z_STRLEN_P(z) * sizeof(OLECHAR));
|
||||
efree(olestring);
|
||||
break;
|
||||
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
--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===
|
||||
@@ -1,60 +0,0 @@
|
||||
--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===
|
||||
+1
-11
@@ -10,7 +10,7 @@
|
||||
| http://www.php.net/license/3_01.txt |
|
||||
| If you did not receive a copy of the PHP license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@php.net so we can mail you a copy immediately. |
|
||||
| license@php.net so we can mail you 6 copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Author: Sterling Hughes <sterling@php.net> |
|
||||
+----------------------------------------------------------------------+
|
||||
@@ -170,12 +170,6 @@ static int php_curl_option_url(php_curl *ch, const char *url, const int len TSRM
|
||||
#if LIBCURL_VERSION_NUM < 0x071100
|
||||
char *copystr = NULL;
|
||||
#endif
|
||||
|
||||
if (strlen(url) != len) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Curl option contains invalid characters (\\0)");
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Disable file:// if open_basedir are used */
|
||||
if (PG(open_basedir) && *PG(open_basedir)) {
|
||||
#if LIBCURL_VERSION_NUM >= 0x071304
|
||||
@@ -1051,7 +1045,6 @@ static size_t curl_write(char *data, size_t size, size_t nmemb, void *ctx)
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not call the CURLOPT_WRITEFUNCTION");
|
||||
length = -1;
|
||||
} else if (retval_ptr) {
|
||||
_php_curl_verify_handlers(ch, 1 TSRMLS_CC);
|
||||
if (Z_TYPE_P(retval_ptr) != IS_LONG) {
|
||||
convert_to_long_ex(&retval_ptr);
|
||||
}
|
||||
@@ -1125,7 +1118,6 @@ static size_t curl_progress(void *clientp, double dltotal, double dlnow, double
|
||||
if (error == FAILURE) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot call the CURLOPT_PROGRESSFUNCTION");
|
||||
} else if (retval_ptr) {
|
||||
_php_curl_verify_handlers(ch, 1 TSRMLS_CC);
|
||||
if (Z_TYPE_P(retval_ptr) != IS_LONG) {
|
||||
convert_to_long_ex(&retval_ptr);
|
||||
}
|
||||
@@ -1202,7 +1194,6 @@ static size_t curl_read(char *data, size_t size, size_t nmemb, void *ctx)
|
||||
length = CURL_READFUNC_ABORT;
|
||||
#endif
|
||||
} else if (retval_ptr) {
|
||||
_php_curl_verify_handlers(ch, 1 TSRMLS_CC);
|
||||
if (Z_TYPE_P(retval_ptr) == IS_STRING) {
|
||||
length = MIN((int) (size * nmemb), Z_STRLEN_P(retval_ptr));
|
||||
memcpy(data, Z_STRVAL_P(retval_ptr), length);
|
||||
@@ -1277,7 +1268,6 @@ static size_t curl_write_header(char *data, size_t size, size_t nmemb, void *ctx
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not call the CURLOPT_HEADERFUNCTION");
|
||||
length = -1;
|
||||
} else if (retval_ptr) {
|
||||
_php_curl_verify_handlers(ch, 1 TSRMLS_CC);
|
||||
if (Z_TYPE_P(retval_ptr) != IS_LONG) {
|
||||
convert_to_long_ex(&retval_ptr);
|
||||
}
|
||||
|
||||
@@ -253,8 +253,6 @@ 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();
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
--TEST--
|
||||
Bug #68089 (NULL byte injection - cURL lib)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
include 'skipif.inc';
|
||||
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$url = "file:///etc/passwd\0http://google.com";
|
||||
$ch = curl_init();
|
||||
var_dump(curl_setopt($ch, CURLOPT_URL, $url));
|
||||
?>
|
||||
Done
|
||||
--EXPECTF--
|
||||
Warning: curl_setopt(): Curl option contains invalid characters (\0) in %s/bug68089.php on line 4
|
||||
bool(false)
|
||||
Done
|
||||
@@ -1,41 +0,0 @@
|
||||
--TEST--
|
||||
Bug #69316: Use-after-free in php_curl related to CURLOPT_FILE/_INFILE/_WRITEHEADER
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded("curl")) exit("skip curl extension not loaded");
|
||||
if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) exit("skip PHP_CURL_HTTP_REMOTE_SERVER env variable is not defined");
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
function hdr_callback($ch, $data) {
|
||||
// close the stream, causing the FILE structure to be free()'d
|
||||
if($GLOBALS['f_file']) {
|
||||
fclose($GLOBALS['f_file']); $GLOBALS['f_file'] = 0;
|
||||
|
||||
// cause an allocation of approx the same size as a FILE structure, size varies a bit depending on platform/libc
|
||||
$FILE_size = (PHP_INT_SIZE == 4 ? 0x160 : 0x238);
|
||||
curl_setopt($ch, CURLOPT_COOKIE, str_repeat("a", $FILE_size - 1));
|
||||
}
|
||||
return strlen($data);
|
||||
}
|
||||
$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
|
||||
|
||||
$temp_file = dirname(__FILE__) . '/body.tmp';
|
||||
$url = "{$host}/get.php?test=getpost";
|
||||
$ch = curl_init();
|
||||
$f_file = fopen($temp_file, "w") or die("failed to open file\n");
|
||||
curl_setopt($ch, CURLOPT_BUFFERSIZE, 10);
|
||||
curl_setopt($ch, CURLOPT_HEADERFUNCTION, "hdr_callback");
|
||||
curl_setopt($ch, CURLOPT_FILE, $f_file);
|
||||
curl_setopt($ch, CURLOPT_URL, $url);
|
||||
curl_exec($ch);
|
||||
curl_close($ch);
|
||||
?>
|
||||
===DONE===
|
||||
--CLEAN--
|
||||
<?php
|
||||
unlink(dirname(__FILE__) . '/body.tmp');
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: curl_exec(): CURLOPT_FILE resource has gone away, resetting to default in %s on line %d
|
||||
===DONE===
|
||||
@@ -23,18 +23,16 @@ 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) {
|
||||
$GLOBALS['alldata'] .= $data;
|
||||
echo 'Data: '.$data;
|
||||
return strlen ($data);
|
||||
});
|
||||
|
||||
|
||||
curl_exec($ch);
|
||||
curl_close($ch);
|
||||
ob_end_flush();
|
||||
echo "Data: $alldata";
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
<?php
|
||||
if (!extension_loaded("curl")) exit("skip curl extension not loaded");
|
||||
if(false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) {
|
||||
if (php_sapi_name() != "cli") {
|
||||
die("skip PHP_CURL_HTTP_REMOTE_SERVER env variable is not defined");
|
||||
}
|
||||
}
|
||||
+12644
-12649
File diff suppressed because it is too large.
Load diff
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| PHP Version 5 |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997-2014 The PHP Group |
|
||||
| Copyright (c) 1997-2013 The PHP Group |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 3.01 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
@@ -401,12 +401,9 @@ static timelib_sll timelib_meridian_with_check(char **ptr, timelib_sll h)
|
||||
{
|
||||
timelib_sll retval = 0;
|
||||
|
||||
while (**ptr && !strchr("AaPp", **ptr)) {
|
||||
while (!strchr("AaPp", **ptr)) {
|
||||
++*ptr;
|
||||
}
|
||||
if(!**ptr) {
|
||||
return TIMELIB_UNSET;
|
||||
}
|
||||
if (**ptr == 'a' || **ptr == 'A') {
|
||||
if (h == 12) {
|
||||
retval = -12;
|
||||
@@ -966,8 +963,8 @@ mssqltime = hour12 ":" minutelz ":" secondlz [:.] [0-9]+ meridian;
|
||||
isoweekday = year4 "-"? "W" weekofyear "-"? [0-7];
|
||||
isoweek = year4 "-"? "W" weekofyear;
|
||||
exif = year4 ":" monthlz ":" daylz " " hour24lz ":" minutelz ":" secondlz;
|
||||
firstdayof = 'first day of';
|
||||
lastdayof = 'last day of';
|
||||
firstdayof = 'first day of'?;
|
||||
lastdayof = 'last day of'?;
|
||||
backof = 'back of ' hour24 space? meridian?;
|
||||
frontof = 'front of ' hour24 space? meridian?;
|
||||
|
||||
@@ -2134,10 +2131,6 @@ 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;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
+----------------------------------------------------------------------+
|
||||
| PHP Version 5 |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997-2014 The PHP Group |
|
||||
| Copyright (c) 1997-2013 The PHP Group |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 3.01 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
|
||||
+1559
-1675
File diff suppressed because it is too large.
Load diff
+12
-11
@@ -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 void do_range_limit(timelib_sll start, timelib_sll end, timelib_sll adj, timelib_sll *a, timelib_sll *b)
|
||||
static int 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,6 +38,7 @@ static void do_range_limit(timelib_sll start, timelib_sll end, timelib_sll adj,
|
||||
*b += *a / adj;
|
||||
*a -= adj * (*a / adj);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void inc_month(timelib_sll *y, timelib_sll *m)
|
||||
@@ -169,24 +170,24 @@ static void do_adjust_for_weekday(timelib_time* time)
|
||||
|
||||
void timelib_do_rel_normalize(timelib_time *base, timelib_rel_time *rt)
|
||||
{
|
||||
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 {} 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_days_relative(&base->y, &base->m, &rt->y, &rt->m, &rt->d, rt->invert);
|
||||
do_range_limit(0, 12, 12, &rt->m, &rt->y);
|
||||
do {} while (do_range_limit(0, 12, 12, &rt->m, &rt->y));
|
||||
}
|
||||
|
||||
void timelib_do_normalize(timelib_time* time)
|
||||
{
|
||||
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);
|
||||
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));
|
||||
|
||||
do {} while (do_range_limit_days(&time->y, &time->m, &time->d));
|
||||
do_range_limit(1, 13, 12, &time->m, &time->y);
|
||||
do {} while (do_range_limit(1, 13, 12, &time->m, &time->y));
|
||||
}
|
||||
|
||||
static void do_adjust_relative(timelib_time* time)
|
||||
|
||||
+86
-104
@@ -50,11 +50,7 @@ static inline long long php_date_llabs( long long i ) { return i >= 0 ? i : -i;
|
||||
int st = snprintf(s, len, "%lld", i); \
|
||||
s[st] = '\0'; \
|
||||
} while (0);
|
||||
#ifdef HAVE_ATOLL
|
||||
# define DATE_A64I(i, s) i = atoll(s)
|
||||
#else
|
||||
# define DATE_A64I(i, s) i = strtoll(s, NULL, 10)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* {{{ arginfo */
|
||||
@@ -548,7 +544,7 @@ static zend_object_handlers date_object_handlers_period;
|
||||
#define DATE_SET_CONTEXT \
|
||||
zval *object; \
|
||||
object = getThis(); \
|
||||
|
||||
|
||||
#define DATE_FETCH_OBJECT \
|
||||
php_date_obj *obj; \
|
||||
DATE_SET_CONTEXT; \
|
||||
@@ -715,7 +711,7 @@ PHP_RSHUTDOWN_FUNCTION(date)
|
||||
* RFC2822, Section 3.3: http://www.ietf.org/rfc/rfc2822.txt
|
||||
* FWS = ([*WSP CRLF] 1*WSP) / ; Folding white space
|
||||
* CFWS = *([FWS] comment) (([FWS] comment) / FWS)
|
||||
*
|
||||
*
|
||||
* date-time = [ day-of-week "," ] date FWS time [CFWS]
|
||||
* day-of-week = ([FWS] day-name)
|
||||
* day-name = "Mon" / "Tue" / "Wed" / "Thu" / "Fri" / "Sat" / "Sun"
|
||||
@@ -737,19 +733,19 @@ PHP_RSHUTDOWN_FUNCTION(date)
|
||||
* date-fullyear = 4DIGIT
|
||||
* date-month = 2DIGIT ; 01-12
|
||||
* date-mday = 2DIGIT ; 01-28, 01-29, 01-30, 01-31 based on month/year
|
||||
*
|
||||
*
|
||||
* time-hour = 2DIGIT ; 00-23
|
||||
* time-minute = 2DIGIT ; 00-59
|
||||
* time-second = 2DIGIT ; 00-58, 00-59, 00-60 based on leap second rules
|
||||
*
|
||||
*
|
||||
* time-secfrac = "." 1*DIGIT
|
||||
* time-numoffset = ("+" / "-") time-hour ":" time-minute
|
||||
* time-offset = "Z" / time-numoffset
|
||||
*
|
||||
*
|
||||
* partial-time = time-hour ":" time-minute ":" time-second [time-secfrac]
|
||||
* full-date = date-fullyear "-" date-month "-" date-mday
|
||||
* full-time = partial-time time-offset
|
||||
*
|
||||
*
|
||||
* date-time = full-date "T" full-time
|
||||
*/
|
||||
#define DATE_FORMAT_RFC3339 "Y-m-d\\TH:i:sP"
|
||||
@@ -839,7 +835,7 @@ PHP_MSHUTDOWN_FUNCTION(date)
|
||||
PHP_MINFO_FUNCTION(date)
|
||||
{
|
||||
const timelib_tzdb *tzdb = DATE_TIMEZONEDB;
|
||||
|
||||
|
||||
php_info_print_table_start();
|
||||
php_info_print_table_row(2, "date/time support", "enabled");
|
||||
php_info_print_table_row(2, "\"Olson\" Timezone Database Version", tzdb->version);
|
||||
@@ -991,8 +987,8 @@ char *php_date_full_day_name(timelib_sll y, timelib_sll m, timelib_sll d)
|
||||
timelib_sll day_of_week = timelib_day_of_week(y, m, d);
|
||||
if (day_of_week < 0) {
|
||||
return "Unknown";
|
||||
}
|
||||
return day_full_names[day_of_week];
|
||||
}
|
||||
return day_full_names[day_of_week];
|
||||
}
|
||||
|
||||
char *php_date_short_day_name(timelib_sll y, timelib_sll m, timelib_sll d)
|
||||
@@ -1000,8 +996,8 @@ char *php_date_short_day_name(timelib_sll y, timelib_sll m, timelib_sll d)
|
||||
timelib_sll day_of_week = timelib_day_of_week(y, m, d);
|
||||
if (day_of_week < 0) {
|
||||
return "Unknown";
|
||||
}
|
||||
return day_short_names[day_of_week];
|
||||
}
|
||||
return day_short_names[day_of_week];
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -1033,7 +1029,7 @@ static char *date_format(char *format, int format_len, timelib_time *t, int loca
|
||||
offset->leap_secs = 0;
|
||||
offset->is_dst = 0;
|
||||
offset->abbr = malloc(9); /* GMT�xxxx\0 */
|
||||
snprintf(offset->abbr, 9, "GMT%c%02d%02d",
|
||||
snprintf(offset->abbr, 9, "GMT%c%02d%02d",
|
||||
localtime ? ((offset->offset < 0) ? '-' : '+') : '+',
|
||||
localtime ? abs(offset->offset / 3600) : 0,
|
||||
localtime ? abs((offset->offset % 3600) / 60) : 0 );
|
||||
@@ -1079,7 +1075,7 @@ static char *date_format(char *format, int format_len, timelib_time *t, int loca
|
||||
case 'a': length = slprintf(buffer, 32, "%s", t->h >= 12 ? "pm" : "am"); break;
|
||||
case 'A': length = slprintf(buffer, 32, "%s", t->h >= 12 ? "PM" : "AM"); break;
|
||||
case 'B': {
|
||||
int retval = (((((long)t->sse)-(((long)t->sse) - ((((long)t->sse) % 86400) + 3600))) * 10) / 864);
|
||||
int retval = (((((long)t->sse)-(((long)t->sse) - ((((long)t->sse) % 86400) + 3600))) * 10) / 864);
|
||||
while (retval < 0) {
|
||||
retval += 1000;
|
||||
}
|
||||
@@ -1179,7 +1175,7 @@ static void php_date(INTERNAL_FUNCTION_PARAMETERS, int localtime)
|
||||
}
|
||||
|
||||
string = php_format_date(format, format_len, ts, localtime TSRMLS_CC);
|
||||
|
||||
|
||||
RETVAL_STRING(string, 0);
|
||||
}
|
||||
/* }}} */
|
||||
@@ -1203,7 +1199,7 @@ PHPAPI char *php_format_date(char *format, int format_len, time_t ts, int localt
|
||||
}
|
||||
|
||||
string = date_format(format, format_len, t, localtime);
|
||||
|
||||
|
||||
timelib_time_dtor(t);
|
||||
return string;
|
||||
}
|
||||
@@ -1244,7 +1240,7 @@ PHPAPI int php_idate(char format, time_t ts, int localtime TSRMLS_DC)
|
||||
offset->leap_secs = 0;
|
||||
offset->is_dst = t->dst;
|
||||
offset->abbr = malloc(9); /* GMT�xxxx\0 */
|
||||
snprintf(offset->abbr, 9, "GMT%c%02d%02d",
|
||||
snprintf(offset->abbr, 9, "GMT%c%02d%02d",
|
||||
!localtime ? ((offset->offset < 0) ? '-' : '+') : '+',
|
||||
!localtime ? abs(offset->offset / 3600) : 0,
|
||||
!localtime ? abs((offset->offset % 3600) / 60) : 0 );
|
||||
@@ -1276,7 +1272,7 @@ PHPAPI int php_idate(char format, time_t ts, int localtime TSRMLS_DC)
|
||||
|
||||
/* Swatch Beat a.k.a. Internet Time */
|
||||
case 'B':
|
||||
retval = (((((long)t->sse)-(((long)t->sse) - ((((long)t->sse) % 86400) + 3600))) * 10) / 864);
|
||||
retval = (((((long)t->sse)-(((long)t->sse) - ((((long)t->sse) % 86400) + 3600))) * 10) / 864);
|
||||
while (retval < 0) {
|
||||
retval += 1000;
|
||||
}
|
||||
@@ -1328,7 +1324,7 @@ PHP_FUNCTION(idate)
|
||||
char *format;
|
||||
int format_len;
|
||||
long ts = 0;
|
||||
int ret;
|
||||
int ret;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l", &format, &format_len, &ts) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
@@ -1356,7 +1352,7 @@ PHP_FUNCTION(idate)
|
||||
PHPAPI void php_date_set_tzdb(timelib_tzdb *tzdb)
|
||||
{
|
||||
const timelib_tzdb *builtin = timelib_builtin_db();
|
||||
|
||||
|
||||
if (php_version_compare(tzdb->version, builtin->version) > 0) {
|
||||
php_date_global_timezone_db = tzdb;
|
||||
php_date_global_timezone_db_enabled = 1;
|
||||
@@ -1428,7 +1424,7 @@ PHP_FUNCTION(strtotime)
|
||||
}
|
||||
|
||||
if (!time_len) {
|
||||
timelib_time_dtor(now);
|
||||
timelib_time_dtor(now);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@@ -1869,7 +1865,7 @@ static void date_period_it_current_data(zend_object_iterator *iter, zval ***data
|
||||
if (it_time->tz_info) {
|
||||
newdateobj->time->tz_info = it_time->tz_info;
|
||||
}
|
||||
|
||||
|
||||
*data = &iterator->current;
|
||||
}
|
||||
/* }}} */
|
||||
@@ -2037,13 +2033,13 @@ static inline zend_object_value date_object_new_date_ex(zend_class_entry *class_
|
||||
if (ptr) {
|
||||
*ptr = intern;
|
||||
}
|
||||
|
||||
|
||||
zend_object_std_init(&intern->std, class_type TSRMLS_CC);
|
||||
object_properties_init(&intern->std, class_type);
|
||||
|
||||
|
||||
retval.handle = zend_objects_store_put(intern, (zend_objects_store_dtor_t)zend_objects_destroy_object, (zend_objects_free_object_storage_t) date_object_free_storage_date, NULL TSRMLS_CC);
|
||||
retval.handlers = &date_object_handlers_date;
|
||||
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
@@ -2057,12 +2053,12 @@ static zend_object_value date_object_clone_date(zval *this_ptr TSRMLS_DC)
|
||||
php_date_obj *new_obj = NULL;
|
||||
php_date_obj *old_obj = (php_date_obj *) zend_object_store_get_object(this_ptr TSRMLS_CC);
|
||||
zend_object_value new_ov = date_object_new_date_ex(old_obj->std.ce, &new_obj TSRMLS_CC);
|
||||
|
||||
|
||||
zend_objects_clone_members(&new_obj->std, new_ov, &old_obj->std, Z_OBJ_HANDLE_P(this_ptr) TSRMLS_CC);
|
||||
if (!old_obj->time) {
|
||||
return new_ov;
|
||||
}
|
||||
|
||||
|
||||
/* this should probably moved to a new `timelib_time *timelime_time_clone(timelib_time *)` */
|
||||
new_obj->time = timelib_time_ctor();
|
||||
*new_obj->time = *old_obj->time;
|
||||
@@ -2072,7 +2068,7 @@ static zend_object_value date_object_clone_date(zval *this_ptr TSRMLS_DC)
|
||||
if (old_obj->time->tz_info) {
|
||||
new_obj->time->tz_info = old_obj->time->tz_info;
|
||||
}
|
||||
|
||||
|
||||
return new_ov;
|
||||
}
|
||||
|
||||
@@ -2094,10 +2090,10 @@ static int date_object_compare_date(zval *d1, zval *d2 TSRMLS_DC)
|
||||
if (!o2->time->sse_uptodate) {
|
||||
timelib_update_ts(o2->time, o2->time->tz_info);
|
||||
}
|
||||
|
||||
|
||||
return (o1->time->sse == o2->time->sse) ? 0 : ((o1->time->sse < o2->time->sse) ? -1 : 1);
|
||||
}
|
||||
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -2125,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.u", 14, dateobj->time, 1), 0);
|
||||
ZVAL_STRING(zv, date_format("Y-m-d H:i:s", 12, dateobj->time, 1), 0);
|
||||
zend_hash_update(props, "date", 5, &zv, sizeof(zv), NULL);
|
||||
|
||||
/* then we add the timezone name (or similar) */
|
||||
@@ -2174,10 +2170,10 @@ static inline zend_object_value date_object_new_timezone_ex(zend_class_entry *cl
|
||||
|
||||
zend_object_std_init(&intern->std, class_type TSRMLS_CC);
|
||||
object_properties_init(&intern->std, class_type);
|
||||
|
||||
|
||||
retval.handle = zend_objects_store_put(intern, (zend_objects_store_dtor_t)zend_objects_destroy_object, (zend_objects_free_object_storage_t) date_object_free_storage_timezone, NULL TSRMLS_CC);
|
||||
retval.handlers = &date_object_handlers_timezone;
|
||||
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
@@ -2191,12 +2187,12 @@ static zend_object_value date_object_clone_timezone(zval *this_ptr TSRMLS_DC)
|
||||
php_timezone_obj *new_obj = NULL;
|
||||
php_timezone_obj *old_obj = (php_timezone_obj *) zend_object_store_get_object(this_ptr TSRMLS_CC);
|
||||
zend_object_value new_ov = date_object_new_timezone_ex(old_obj->std.ce, &new_obj TSRMLS_CC);
|
||||
|
||||
|
||||
zend_objects_clone_members(&new_obj->std, new_ov, &old_obj->std, Z_OBJ_HANDLE_P(this_ptr) TSRMLS_CC);
|
||||
if (!old_obj->initialized) {
|
||||
return new_ov;
|
||||
}
|
||||
|
||||
|
||||
new_obj->type = old_obj->type;
|
||||
new_obj->initialized = 1;
|
||||
switch (new_obj->type) {
|
||||
@@ -2212,7 +2208,7 @@ static zend_object_value date_object_clone_timezone(zval *this_ptr TSRMLS_DC)
|
||||
new_obj->tzi.z.abbr = old_obj->tzi.z.abbr;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
return new_ov;
|
||||
}
|
||||
|
||||
@@ -2229,10 +2225,10 @@ static inline zend_object_value date_object_new_interval_ex(zend_class_entry *cl
|
||||
|
||||
zend_object_std_init(&intern->std, class_type TSRMLS_CC);
|
||||
object_properties_init(&intern->std, class_type);
|
||||
|
||||
|
||||
retval.handle = zend_objects_store_put(intern, (zend_objects_store_dtor_t)zend_objects_destroy_object, (zend_objects_free_object_storage_t) date_object_free_storage_interval, NULL TSRMLS_CC);
|
||||
retval.handlers = &date_object_handlers_interval;
|
||||
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
@@ -2246,7 +2242,7 @@ static zend_object_value date_object_clone_interval(zval *this_ptr TSRMLS_DC)
|
||||
php_interval_obj *new_obj = NULL;
|
||||
php_interval_obj *old_obj = (php_interval_obj *) zend_object_store_get_object(this_ptr TSRMLS_CC);
|
||||
zend_object_value new_ov = date_object_new_interval_ex(old_obj->std.ce, &new_obj TSRMLS_CC);
|
||||
|
||||
|
||||
zend_objects_clone_members(&new_obj->std, new_ov, &old_obj->std, Z_OBJ_HANDLE_P(this_ptr) TSRMLS_CC);
|
||||
|
||||
/** FIX ME ADD CLONE STUFF **/
|
||||
@@ -2318,10 +2314,10 @@ static inline zend_object_value date_object_new_period_ex(zend_class_entry *clas
|
||||
|
||||
zend_object_std_init(&intern->std, class_type TSRMLS_CC);
|
||||
object_properties_init(&intern->std, class_type);
|
||||
|
||||
|
||||
retval.handle = zend_objects_store_put(intern, (zend_objects_store_dtor_t)zend_objects_destroy_object, (zend_objects_free_object_storage_t) date_object_free_storage_period, NULL TSRMLS_CC);
|
||||
retval.handlers = &date_object_handlers_period;
|
||||
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
@@ -2335,7 +2331,7 @@ static zend_object_value date_object_clone_period(zval *this_ptr TSRMLS_DC)
|
||||
php_period_obj *new_obj = NULL;
|
||||
php_period_obj *old_obj = (php_period_obj *) zend_object_store_get_object(this_ptr TSRMLS_CC);
|
||||
zend_object_value new_ov = date_object_new_period_ex(old_obj->std.ce, &new_obj TSRMLS_CC);
|
||||
|
||||
|
||||
zend_objects_clone_members(&new_obj->std, new_ov, &old_obj->std, Z_OBJ_HANDLE_P(this_ptr) TSRMLS_CC);
|
||||
|
||||
/** FIX ME ADD CLONE STUFF **/
|
||||
@@ -2398,7 +2394,11 @@ static void date_object_free_storage_period(void *object TSRMLS_DC)
|
||||
/* Advanced Interface */
|
||||
PHPAPI zval *php_date_instantiate(zend_class_entry *pce, zval *object TSRMLS_DC)
|
||||
{
|
||||
Z_TYPE_P(object) = IS_OBJECT;
|
||||
object_init_ex(object, pce);
|
||||
Z_SET_REFCOUNT_P(object, 1);
|
||||
Z_UNSET_ISREF_P(object);
|
||||
|
||||
return object;
|
||||
}
|
||||
|
||||
@@ -2421,7 +2421,7 @@ PHPAPI int php_date_initialize(php_date_obj *dateobj, /*const*/ char *time_str,
|
||||
int type = TIMELIB_ZONETYPE_ID, new_dst = 0;
|
||||
char *new_abbr = NULL;
|
||||
timelib_sll new_offset;
|
||||
|
||||
|
||||
if (dateobj->time) {
|
||||
timelib_time_dtor(dateobj->time);
|
||||
}
|
||||
@@ -2441,8 +2441,6 @@ 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;
|
||||
}
|
||||
|
||||
@@ -2506,19 +2504,14 @@ PHP_FUNCTION(date_create)
|
||||
zval *timezone_object = NULL;
|
||||
char *time_str = NULL;
|
||||
int time_str_len = 0;
|
||||
zval datetime_object;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|sO!", &time_str, &time_str_len, &timezone_object, date_ce_timezone) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
php_date_instantiate(date_ce_date, &datetime_object TSRMLS_CC);
|
||||
if (!php_date_initialize(zend_object_store_get_object(&datetime_object TSRMLS_CC), time_str, time_str_len, NULL, timezone_object, 0 TSRMLS_CC)) {
|
||||
zval_dtor(&datetime_object);
|
||||
php_date_instantiate(date_ce_date, return_value TSRMLS_CC);
|
||||
if (!php_date_initialize(zend_object_store_get_object(return_value TSRMLS_CC), time_str, time_str_len, NULL, timezone_object, 0 TSRMLS_CC)) {
|
||||
RETURN_FALSE;
|
||||
} else {
|
||||
zval *datetime_object_ptr = &datetime_object;
|
||||
RETVAL_ZVAL(datetime_object_ptr, 0, 0);
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
@@ -2531,19 +2524,14 @@ PHP_FUNCTION(date_create_from_format)
|
||||
zval *timezone_object = NULL;
|
||||
char *time_str = NULL, *format_str = NULL;
|
||||
int time_str_len = 0, format_str_len = 0;
|
||||
zval datetime_object;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|O", &format_str, &format_str_len, &time_str, &time_str_len, &timezone_object, date_ce_timezone) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
php_date_instantiate(date_ce_date, &datetime_object TSRMLS_CC);
|
||||
if (!php_date_initialize(zend_object_store_get_object(&datetime_object TSRMLS_CC), time_str, time_str_len, format_str, timezone_object, 0 TSRMLS_CC)) {
|
||||
zval_dtor(&datetime_object);
|
||||
php_date_instantiate(date_ce_date, return_value TSRMLS_CC);
|
||||
if (!php_date_initialize(zend_object_store_get_object(return_value TSRMLS_CC), time_str, time_str_len, format_str, timezone_object, 0 TSRMLS_CC)) {
|
||||
RETURN_FALSE;
|
||||
} else {
|
||||
zval *datetime_object_ptr = &datetime_object;
|
||||
RETVAL_ZVAL(datetime_object_ptr, 0, 0);
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
@@ -2566,7 +2554,7 @@ PHP_METHOD(DateTime, __construct)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static int php_date_initialize_from_hash(php_date_obj **dateobj, HashTable *myht TSRMLS_DC)
|
||||
static int php_date_initialize_from_hash(zval **return_value, php_date_obj **dateobj, HashTable *myht TSRMLS_DC)
|
||||
{
|
||||
zval **z_date = NULL;
|
||||
zval **z_timezone = NULL;
|
||||
@@ -2575,9 +2563,12 @@ static int php_date_initialize_from_hash(php_date_obj **dateobj, HashTable *myht
|
||||
timelib_tzinfo *tzi;
|
||||
php_timezone_obj *tzobj;
|
||||
|
||||
if (zend_hash_find(myht, "date", 5, (void**) &z_date) == SUCCESS && Z_TYPE_PP(z_date) == IS_STRING) {
|
||||
if (zend_hash_find(myht, "timezone_type", 14, (void**) &z_timezone_type) == SUCCESS && Z_TYPE_PP(z_timezone_type) == IS_LONG) {
|
||||
if (zend_hash_find(myht, "timezone", 9, (void**) &z_timezone) == SUCCESS && Z_TYPE_PP(z_timezone) == IS_STRING) {
|
||||
if (zend_hash_find(myht, "date", 5, (void**) &z_date) == SUCCESS) {
|
||||
convert_to_string(*z_date);
|
||||
if (zend_hash_find(myht, "timezone_type", 14, (void**) &z_timezone_type) == SUCCESS) {
|
||||
convert_to_long(*z_timezone_type);
|
||||
if (zend_hash_find(myht, "timezone", 9, (void**) &z_timezone) == SUCCESS) {
|
||||
convert_to_string(*z_timezone);
|
||||
|
||||
switch (Z_LVAL_PP(z_timezone_type)) {
|
||||
case TIMELIB_ZONETYPE_OFFSET:
|
||||
@@ -2592,13 +2583,10 @@ static int php_date_initialize_from_hash(php_date_obj **dateobj, HashTable *myht
|
||||
|
||||
case TIMELIB_ZONETYPE_ID: {
|
||||
int ret;
|
||||
convert_to_string(*z_timezone);
|
||||
|
||||
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;
|
||||
@@ -2632,7 +2620,7 @@ PHP_METHOD(DateTime, __set_state)
|
||||
|
||||
php_date_instantiate(date_ce_date, return_value TSRMLS_CC);
|
||||
dateobj = (php_date_obj *) zend_object_store_get_object(return_value TSRMLS_CC);
|
||||
if (!php_date_initialize_from_hash(&dateobj, myht TSRMLS_CC)) {
|
||||
if (!php_date_initialize_from_hash(&return_value, &dateobj, myht TSRMLS_CC)) {
|
||||
php_error(E_ERROR, "Invalid serialization data for DateTime object");
|
||||
}
|
||||
}
|
||||
@@ -2650,7 +2638,7 @@ PHP_METHOD(DateTime, __wakeup)
|
||||
|
||||
myht = Z_OBJPROP_P(object);
|
||||
|
||||
if (!php_date_initialize_from_hash(&dateobj, myht TSRMLS_CC)) {
|
||||
if (!php_date_initialize_from_hash(&return_value, &dateobj, myht TSRMLS_CC)) {
|
||||
php_error(E_ERROR, "Invalid serialization data for DateTime object");
|
||||
}
|
||||
}
|
||||
@@ -2710,7 +2698,7 @@ void php_date_do_return_parsed_time(INTERNAL_FUNCTION_PARAMETERS, timelib_time *
|
||||
PHP_DATE_PARSE_DATE_SET_TIME_ELEMENT(hour, h);
|
||||
PHP_DATE_PARSE_DATE_SET_TIME_ELEMENT(minute, i);
|
||||
PHP_DATE_PARSE_DATE_SET_TIME_ELEMENT(second, s);
|
||||
|
||||
|
||||
if (parsed_time->f == -99999) {
|
||||
add_assoc_bool(return_value, "fraction", 0);
|
||||
} else {
|
||||
@@ -2777,7 +2765,7 @@ PHP_FUNCTION(date_parse)
|
||||
int date_len;
|
||||
struct timelib_error_container *error;
|
||||
timelib_time *parsed_time;
|
||||
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &date, &date_len) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
@@ -2796,7 +2784,7 @@ PHP_FUNCTION(date_parse_from_format)
|
||||
int date_len, format_len;
|
||||
struct timelib_error_container *error;
|
||||
timelib_time *parsed_time;
|
||||
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", &format, &format_len, &date, &date_len) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
@@ -3123,7 +3111,7 @@ PHP_FUNCTION(date_isodate_set)
|
||||
memset(&dateobj->time->relative, 0, sizeof(dateobj->time->relative));
|
||||
dateobj->time->relative.d = timelib_daynr_from_weeknr(y, w, d);
|
||||
dateobj->time->have_relative = 1;
|
||||
|
||||
|
||||
timelib_update_ts(dateobj->time, NULL);
|
||||
|
||||
RETURN_ZVAL(object, 1, 0);
|
||||
@@ -3210,15 +3198,15 @@ PHP_FUNCTION(date_diff)
|
||||
static int timezone_initialize(timelib_tzinfo **tzi, /*const*/ char *tz TSRMLS_DC)
|
||||
{
|
||||
char *tzid;
|
||||
|
||||
|
||||
*tzi = NULL;
|
||||
|
||||
|
||||
if ((tzid = timelib_timezone_id_from_abbr(tz, -1, 0))) {
|
||||
*tzi = php_date_parse_tzfile(tzid, DATE_TIMEZONEDB TSRMLS_CC);
|
||||
} else {
|
||||
*tzi = php_date_parse_tzfile(tz, DATE_TIMEZONEDB TSRMLS_CC);
|
||||
}
|
||||
|
||||
|
||||
if (*tzi) {
|
||||
return SUCCESS;
|
||||
} else {
|
||||
@@ -3260,7 +3248,7 @@ PHP_METHOD(DateTimeZone, __construct)
|
||||
timelib_tzinfo *tzi = NULL;
|
||||
php_timezone_obj *tzobj;
|
||||
zend_error_handling error_handling;
|
||||
|
||||
|
||||
zend_replace_error_handling(EH_THROW, NULL, &error_handling TSRMLS_CC);
|
||||
if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &tz, &tz_len)) {
|
||||
if (SUCCESS == timezone_initialize(&tzi, tz TSRMLS_CC)) {
|
||||
@@ -3487,7 +3475,7 @@ static int date_interval_initialize(timelib_rel_time **rt, /*const*/ char *forma
|
||||
struct timelib_error_container *errors;
|
||||
|
||||
timelib_strtointerval(format, format_length, &b, &e, &p, &r, &errors);
|
||||
|
||||
|
||||
if (errors->error_count > 0) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown or bad format (%s)", format);
|
||||
retval = FAILURE;
|
||||
@@ -3646,7 +3634,7 @@ PHP_METHOD(DateInterval, __construct)
|
||||
php_interval_obj *diobj;
|
||||
timelib_rel_time *reltime;
|
||||
zend_error_handling error_handling;
|
||||
|
||||
|
||||
zend_replace_error_handling(EH_THROW, NULL, &error_handling TSRMLS_CC);
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &interval_string, &interval_string_length) == SUCCESS) {
|
||||
if (date_interval_initialize(&reltime, interval_string, interval_string_length TSRMLS_CC) == SUCCESS) {
|
||||
@@ -3669,7 +3657,8 @@ static int php_date_interval_initialize_from_hash(zval **return_value, php_inter
|
||||
#define PHP_DATE_INTERVAL_READ_PROPERTY(element, member, itype, def) \
|
||||
do { \
|
||||
zval **z_arg = NULL; \
|
||||
if (zend_hash_find(myht, element, strlen(element) + 1, (void**) &z_arg) == SUCCESS && Z_TYPE_PP(z_arg) == IS_LONG) { \
|
||||
if (zend_hash_find(myht, element, strlen(element) + 1, (void**) &z_arg) == SUCCESS) { \
|
||||
convert_to_long(*z_arg); \
|
||||
(*intobj)->diff->member = (itype)Z_LVAL_PP(z_arg); \
|
||||
} else { \
|
||||
(*intobj)->diff->member = (itype)def; \
|
||||
@@ -3680,15 +3669,8 @@ static int php_date_interval_initialize_from_hash(zval **return_value, php_inter
|
||||
do { \
|
||||
zval **z_arg = NULL; \
|
||||
if (zend_hash_find(myht, element, strlen(element) + 1, (void**) &z_arg) == SUCCESS) { \
|
||||
if (Z_TYPE_PP(z_arg) == IS_STRING) { \
|
||||
DATE_A64I((*intobj)->diff->member, Z_STRVAL_PP(z_arg)); \
|
||||
} else if (Z_TYPE_PP(z_arg) == IS_LONG || Z_TYPE_PP(z_arg) == IS_BOOL) { \
|
||||
(*intobj)->diff->member = (timelib_sll)Z_LVAL_PP(z_arg); \
|
||||
} else if (Z_TYPE_PP(z_arg) == IS_DOUBLE) { \
|
||||
(*intobj)->diff->member = (timelib_sll)Z_DVAL_PP(z_arg); \
|
||||
} else { \
|
||||
(*intobj)->diff->member = -1LL; \
|
||||
} \
|
||||
convert_to_string(*z_arg); \
|
||||
DATE_A64I((*intobj)->diff->member, Z_STRVAL_PP(z_arg)); \
|
||||
} else { \
|
||||
(*intobj)->diff->member = -1LL; \
|
||||
} \
|
||||
@@ -3866,7 +3848,7 @@ static int date_period_initialize(timelib_time **st, timelib_time **et, timelib_
|
||||
struct timelib_error_container *errors;
|
||||
|
||||
timelib_strtointerval(format, format_length, &b, &e, &p, &r, &errors);
|
||||
|
||||
|
||||
if (errors->error_count > 0) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown or bad format (%s)", format);
|
||||
retval = FAILURE;
|
||||
@@ -3895,7 +3877,7 @@ PHP_METHOD(DatePeriod, __construct)
|
||||
int isostr_len = 0;
|
||||
timelib_time *clone;
|
||||
zend_error_handling error_handling;
|
||||
|
||||
|
||||
zend_replace_error_handling(EH_THROW, NULL, &error_handling TSRMLS_CC);
|
||||
if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "OOl|l", &start, date_ce_date, &interval, date_ce_interval, &recurrences, &options) == FAILURE) {
|
||||
if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "OOO|l", &start, date_ce_date, &interval, date_ce_interval, &end, date_ce_date, &options) == FAILURE) {
|
||||
@@ -4008,7 +3990,7 @@ PHP_FUNCTION(timezone_identifiers_list)
|
||||
tzdb = DATE_TIMEZONEDB;
|
||||
item_count = tzdb->index_size;
|
||||
table = tzdb->index;
|
||||
|
||||
|
||||
array_init(return_value);
|
||||
|
||||
for (i = 0; i < item_count; ++i) {
|
||||
@@ -4042,7 +4024,7 @@ PHP_FUNCTION(timezone_abbreviations_list)
|
||||
{
|
||||
const timelib_tz_lookup_table *table, *entry;
|
||||
zval *element, **abbr_array_pp, *abbr_array;
|
||||
|
||||
|
||||
table = timelib_timezone_abbreviations_list();
|
||||
array_init(return_value);
|
||||
entry = table;
|
||||
@@ -4118,11 +4100,11 @@ static void php_do_date_sunrise_sunset(INTERNAL_FUNCTION_PARAMETERS, int calc_su
|
||||
timelib_time *t;
|
||||
timelib_tzinfo *tzi;
|
||||
char *retstr;
|
||||
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l|ldddd", &time, &retformat, &latitude, &longitude, &zenith, &gmt_offset) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
|
||||
switch (ZEND_NUM_ARGS()) {
|
||||
case 1:
|
||||
retformat = SUNFUNCS_RET_STRING;
|
||||
@@ -4166,7 +4148,7 @@ static void php_do_date_sunrise_sunset(INTERNAL_FUNCTION_PARAMETERS, int calc_su
|
||||
timelib_unixtime2local(t, time);
|
||||
rs = timelib_astro_rise_set_altitude(t, longitude, latitude, altitude, 1, &h_rise, &h_set, &rise, &set, &transit);
|
||||
timelib_time_dtor(t);
|
||||
|
||||
|
||||
if (rs != 0) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
@@ -4220,7 +4202,7 @@ PHP_FUNCTION(date_sun_info)
|
||||
timelib_sll rise, set, transit;
|
||||
int dummy;
|
||||
double ddummy;
|
||||
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ldd", &time, &latitude, &longitude) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
@@ -4234,7 +4216,7 @@ PHP_FUNCTION(date_sun_info)
|
||||
/* Setup */
|
||||
t2 = timelib_time_ctor();
|
||||
array_init(return_value);
|
||||
|
||||
|
||||
/* Get sun up/down and transit */
|
||||
rs = timelib_astro_rise_set_altitude(t, longitude, latitude, -35.0/60, 1, &ddummy, &ddummy, &rise, &set, &transit);
|
||||
switch (rs) {
|
||||
@@ -4378,7 +4360,7 @@ static HashTable *date_object_get_properties_period(zval *object TSRMLS_DC)
|
||||
ZVAL_NULL(zv);
|
||||
}
|
||||
zend_hash_update(props, "interval", sizeof("interval"), &zv, sizeof(zv), NULL);
|
||||
|
||||
|
||||
/* converted to larger type (int->long); must check when unserializing */
|
||||
MAKE_STD_ZVAL(zv);
|
||||
ZVAL_LONG(zv, (long) period_obj->recurrences);
|
||||
@@ -4460,7 +4442,7 @@ static int php_date_period_initialize_from_hash(php_period_obj *period_obj, Hash
|
||||
}
|
||||
|
||||
period_obj->initialized = 1;
|
||||
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -4477,7 +4459,7 @@ PHP_METHOD(DatePeriod, __set_state)
|
||||
}
|
||||
|
||||
myht = Z_ARRVAL_P(array);
|
||||
|
||||
|
||||
object_init_ex(return_value, date_ce_period);
|
||||
period_obj = zend_object_store_get_object(return_value TSRMLS_CC);
|
||||
if (!php_date_period_initialize_from_hash(period_obj, myht TSRMLS_CC)) {
|
||||
|
||||
@@ -21,7 +21,7 @@ echo "Done\n";
|
||||
--EXPECTF--
|
||||
object(DateTime)#1 (3) {
|
||||
["date"]=>
|
||||
string(26) "2006-01-23 00:00:00.000000"
|
||||
string(19) "2006-01-23 00:00:00"
|
||||
["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(26) "2006-01-30 00:00:00.000000"
|
||||
string(19) "2006-01-30 00:00:00"
|
||||
["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(26) "2007-12-10 00:00:00.000000"
|
||||
string(19) "2007-12-10 00:00:00"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
|
||||
@@ -21,7 +21,7 @@ echo "Done\n";
|
||||
--EXPECTF--
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "2006-12-12 00:00:00.000000"
|
||||
string(19) "2006-12-12 00:00:00"
|
||||
["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(26) "2006-02-15 00:00:00.000000"
|
||||
string(19) "2006-02-15 00:00:00"
|
||||
["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(26) "2008-01-29 00:00:00.000000"
|
||||
string(19) "2008-01-29 00:00:00"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
|
||||
@@ -20,7 +20,7 @@ echo "Done\n";
|
||||
--EXPECTF--
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "2006-12-12 00:00:00.000000"
|
||||
string(19) "2006-12-12 00:00:00"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
|
||||
@@ -37,7 +37,7 @@ object(DateTimeExt1)#%d (5) {
|
||||
["property2"]=>
|
||||
string(5) "Hello"
|
||||
["date"]=>
|
||||
string(26) "2009-02-03 12:34:41.000000"
|
||||
string(19) "2009-02-03 12:34:41"
|
||||
["timezone_type"]=>
|
||||
int(2)
|
||||
["timezone"]=>
|
||||
@@ -49,7 +49,7 @@ object(DateTimeExt1)#%d (5) {
|
||||
["property2"]=>
|
||||
string(5) "Hello"
|
||||
["date"]=>
|
||||
string(26) "2009-02-03 12:34:41.000000"
|
||||
string(19) "2009-02-03 12:34:41"
|
||||
["timezone_type"]=>
|
||||
int(2)
|
||||
["timezone"]=>
|
||||
@@ -65,7 +65,7 @@ object(DateTimeExt2)#%d (7) {
|
||||
["property2"]=>
|
||||
string(5) "Hello"
|
||||
["date"]=>
|
||||
string(26) "2009-02-03 12:34:41.000000"
|
||||
string(19) "2009-02-03 12:34:41"
|
||||
["timezone_type"]=>
|
||||
int(2)
|
||||
["timezone"]=>
|
||||
@@ -81,7 +81,7 @@ object(DateTimeExt2)#%d (7) {
|
||||
["property2"]=>
|
||||
string(5) "Hello"
|
||||
["date"]=>
|
||||
string(26) "2009-02-03 12:34:41.000000"
|
||||
string(19) "2009-02-03 12:34:41"
|
||||
["timezone_type"]=>
|
||||
int(2)
|
||||
["timezone"]=>
|
||||
|
||||
@@ -32,7 +32,7 @@ var_dump($d2_clone);
|
||||
-- Create a DateTime object --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "2009-02-03 12:34:41.000000"
|
||||
string(19) "2009-02-03 12:34:41"
|
||||
["timezone_type"]=>
|
||||
int(2)
|
||||
["timezone"]=>
|
||||
@@ -42,7 +42,7 @@ object(DateTime)#%d (3) {
|
||||
-- Add some properties --
|
||||
object(DateTime)#%d (5) {
|
||||
["date"]=>
|
||||
string(26) "2009-02-03 12:34:41.000000"
|
||||
string(19) "2009-02-03 12:34:41"
|
||||
["timezone_type"]=>
|
||||
int(2)
|
||||
["timezone"]=>
|
||||
@@ -56,7 +56,7 @@ object(DateTime)#%d (5) {
|
||||
-- clone it --
|
||||
object(DateTime)#%d (5) {
|
||||
["date"]=>
|
||||
string(26) "2009-02-03 12:34:41.000000"
|
||||
string(19) "2009-02-03 12:34:41"
|
||||
["timezone_type"]=>
|
||||
int(2)
|
||||
["timezone"]=>
|
||||
@@ -70,7 +70,7 @@ object(DateTime)#%d (5) {
|
||||
-- Add some more properties --
|
||||
object(DateTime)#%d (7) {
|
||||
["date"]=>
|
||||
string(26) "2009-02-03 12:34:41.000000"
|
||||
string(19) "2009-02-03 12:34:41"
|
||||
["timezone_type"]=>
|
||||
int(2)
|
||||
["timezone"]=>
|
||||
@@ -88,7 +88,7 @@ object(DateTime)#%d (7) {
|
||||
-- clone it --
|
||||
object(DateTime)#%d (7) {
|
||||
["date"]=>
|
||||
string(26) "2009-02-03 12:34:41.000000"
|
||||
string(19) "2009-02-03 12:34:41"
|
||||
["timezone_type"]=>
|
||||
int(2)
|
||||
["timezone"]=>
|
||||
|
||||
@@ -41,7 +41,7 @@ object(DateTime)#%d (3) {
|
||||
}
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "2005-07-14 22:30:41.000000"
|
||||
string(19) "2005-07-14 22:30:41"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -49,7 +49,7 @@ object(DateTime)#%d (3) {
|
||||
}
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "2005-07-14 22:30:41.000000"
|
||||
string(19) "2005-07-14 22:30:41"
|
||||
["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(26) "%s"
|
||||
string(19) "%s"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -150,7 +150,7 @@ object(DateTime)#%d (3) {
|
||||
}
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "%s"
|
||||
string(19) "%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(26) "%s"
|
||||
string(19) "%s"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -172,7 +172,7 @@ object(DateTime)#%d (3) {
|
||||
}
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "%s"
|
||||
string(19) "%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(26) "%s"
|
||||
string(19) "%s"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -206,7 +206,7 @@ object(DateTime)#%d (3) {
|
||||
}
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "%s"
|
||||
string(19) "%s"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -216,7 +216,7 @@ object(DateTime)#%d (3) {
|
||||
-- lowercase null --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "%s"
|
||||
string(19) "%s"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -224,7 +224,7 @@ object(DateTime)#%d (3) {
|
||||
}
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "%s"
|
||||
string(19) "%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(26) "%s"
|
||||
string(19) "%s"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -246,7 +246,7 @@ object(DateTime)#%d (3) {
|
||||
}
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "%s"
|
||||
string(19) "%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(26) "%s"
|
||||
string(19) "%s"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -268,7 +268,7 @@ object(DateTime)#%d (3) {
|
||||
}
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "%s"
|
||||
string(19) "%s"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -278,7 +278,7 @@ object(DateTime)#%d (3) {
|
||||
-- empty string DQ --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "%s"
|
||||
string(19) "%s"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -286,7 +286,7 @@ object(DateTime)#%d (3) {
|
||||
}
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "%s"
|
||||
string(19) "%s"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -296,7 +296,7 @@ object(DateTime)#%d (3) {
|
||||
-- empty string SQ --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "%s"
|
||||
string(19) "%s"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -304,7 +304,7 @@ object(DateTime)#%d (3) {
|
||||
}
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "%s"
|
||||
string(19) "%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(26) "%s"
|
||||
string(19) "%s"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -346,7 +346,7 @@ object(DateTime)#%d (3) {
|
||||
}
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "%s"
|
||||
string(19) "%s"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -356,7 +356,7 @@ object(DateTime)#%d (3) {
|
||||
-- unset var --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "%s"
|
||||
string(19) "%s"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -364,7 +364,7 @@ object(DateTime)#%d (3) {
|
||||
}
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "%s"
|
||||
string(19) "%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(26) "2005-07-14 22:30:41.000000"
|
||||
string(19) "2005-07-14 22:30:41"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -163,7 +163,7 @@ object(DateTime)#%d (3) {
|
||||
-- lowercase null --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "2005-07-14 22:30:41.000000"
|
||||
string(19) "2005-07-14 22:30:41"
|
||||
["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(26) "2005-07-14 22:30:41.000000"
|
||||
string(19) "2005-07-14 22:30:41"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -219,7 +219,7 @@ object(DateTime)#%d (3) {
|
||||
-- unset var --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "2005-07-14 22:30:41.000000"
|
||||
string(19) "2005-07-14 22:30:41"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
|
||||
@@ -133,7 +133,7 @@ bool(false)
|
||||
-- float 10.5 --
|
||||
object(DateTime)#3 (3) {
|
||||
["date"]=>
|
||||
string(26) "2009-01-31 10:05:00.000000"
|
||||
string(19) "2009-01-31 10:05:00"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -148,7 +148,7 @@ bool(false)
|
||||
-- float .5 --
|
||||
object(DateTime)#3 (3) {
|
||||
["date"]=>
|
||||
string(26) "2009-01-31 00:05:00.000000"
|
||||
string(19) "2009-01-31 00:05:00"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
|
||||
@@ -20,20 +20,20 @@ var_dump( $date2->format( "F j, Y, g:i a") );
|
||||
--EXPECTF--
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "2005-07-14 22:30:41.000000"
|
||||
string(19) "2005-07-14 22:30:41"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
string(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";}"
|
||||
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";}"
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "2005-07-14 22:30:41.000000"
|
||||
string(19) "2005-07-14 22:30:41"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
string(13) "Europe/London"
|
||||
}
|
||||
string(23) "July 14, 2005, 10:30 pm"
|
||||
===DONE===
|
||||
===DONE===
|
||||
@@ -115,7 +115,7 @@ fclose( $file_handle );
|
||||
-- int 0 --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "0000-07-02 08:34:10.000000"
|
||||
string(19) "0000-07-02 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -125,7 +125,7 @@ object(DateTime)#%d (3) {
|
||||
-- int 1 --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "0001-07-02 08:34:10.000000"
|
||||
string(19) "0001-07-02 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -135,7 +135,7 @@ object(DateTime)#%d (3) {
|
||||
-- int 12345 --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(27) "12345-07-02 08:34:10.000000"
|
||||
string(20) "12345-07-02 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -145,7 +145,7 @@ object(DateTime)#%d (3) {
|
||||
-- int -12345 --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(28) "-12345-07-02 08:34:10.000000"
|
||||
string(21) "-12345-07-02 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -155,7 +155,7 @@ object(DateTime)#%d (3) {
|
||||
-- float 10.5 --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "0010-07-02 08:34:10.000000"
|
||||
string(19) "0010-07-02 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -165,7 +165,7 @@ object(DateTime)#%d (3) {
|
||||
-- float -10.5 --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(27) "-0010-07-02 08:34:10.000000"
|
||||
string(20) "-0010-07-02 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -175,7 +175,7 @@ object(DateTime)#%d (3) {
|
||||
-- float .5 --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "0000-07-02 08:34:10.000000"
|
||||
string(19) "0000-07-02 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -205,7 +205,7 @@ bool(false)
|
||||
-- uppercase NULL --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "0000-07-02 08:34:10.000000"
|
||||
string(19) "0000-07-02 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -215,7 +215,7 @@ object(DateTime)#%d (3) {
|
||||
-- lowercase null --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "0000-07-02 08:34:10.000000"
|
||||
string(19) "0000-07-02 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -225,7 +225,7 @@ object(DateTime)#%d (3) {
|
||||
-- lowercase true --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "0001-07-02 08:34:10.000000"
|
||||
string(19) "0001-07-02 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -235,7 +235,7 @@ object(DateTime)#%d (3) {
|
||||
-- lowercase false --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "0000-07-02 08:34:10.000000"
|
||||
string(19) "0000-07-02 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -245,7 +245,7 @@ object(DateTime)#%d (3) {
|
||||
-- uppercase TRUE --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "0001-07-02 08:34:10.000000"
|
||||
string(19) "0001-07-02 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -255,7 +255,7 @@ object(DateTime)#%d (3) {
|
||||
-- uppercase FALSE --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "0000-07-02 08:34:10.000000"
|
||||
string(19) "0000-07-02 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -305,7 +305,7 @@ bool(false)
|
||||
-- undefined var --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "0000-07-02 08:34:10.000000"
|
||||
string(19) "0000-07-02 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -315,7 +315,7 @@ object(DateTime)#%d (3) {
|
||||
-- unset var --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "0000-07-02 08:34:10.000000"
|
||||
string(19) "0000-07-02 08:34:10"
|
||||
["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===
|
||||
@@ -115,7 +115,7 @@ fclose( $file_handle );
|
||||
-- int 0 --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "1962-12-02 08:34:10.000000"
|
||||
string(19) "1962-12-02 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -125,7 +125,7 @@ object(DateTime)#%d (3) {
|
||||
-- int 1 --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "1963-01-02 08:34:10.000000"
|
||||
string(19) "1963-01-02 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -135,7 +135,7 @@ object(DateTime)#%d (3) {
|
||||
-- int 12345 --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "2991-09-02 08:34:10.000000"
|
||||
string(19) "2991-09-02 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -145,7 +145,7 @@ object(DateTime)#%d (3) {
|
||||
-- int -12345 --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "0934-03-02 08:34:10.000000"
|
||||
string(19) "0934-03-02 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -155,7 +155,7 @@ object(DateTime)#%d (3) {
|
||||
-- float 10.5 --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "1963-10-02 08:34:10.000000"
|
||||
string(19) "1963-10-02 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -165,7 +165,7 @@ object(DateTime)#%d (3) {
|
||||
-- float -10.5 --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "1962-02-02 08:34:10.000000"
|
||||
string(19) "1962-02-02 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -175,7 +175,7 @@ object(DateTime)#%d (3) {
|
||||
-- float .5 --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "1962-12-02 08:34:10.000000"
|
||||
string(19) "1962-12-02 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -205,7 +205,7 @@ bool(false)
|
||||
-- uppercase NULL --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "1962-12-02 08:34:10.000000"
|
||||
string(19) "1962-12-02 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -215,7 +215,7 @@ object(DateTime)#%d (3) {
|
||||
-- lowercase null --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "1962-12-02 08:34:10.000000"
|
||||
string(19) "1962-12-02 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -225,7 +225,7 @@ object(DateTime)#%d (3) {
|
||||
-- lowercase true --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "1963-01-02 08:34:10.000000"
|
||||
string(19) "1963-01-02 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -235,7 +235,7 @@ object(DateTime)#%d (3) {
|
||||
-- lowercase false --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "1962-12-02 08:34:10.000000"
|
||||
string(19) "1962-12-02 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -245,7 +245,7 @@ object(DateTime)#%d (3) {
|
||||
-- uppercase TRUE --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "1963-01-02 08:34:10.000000"
|
||||
string(19) "1963-01-02 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -255,7 +255,7 @@ object(DateTime)#%d (3) {
|
||||
-- uppercase FALSE --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "1962-12-02 08:34:10.000000"
|
||||
string(19) "1962-12-02 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -305,7 +305,7 @@ bool(false)
|
||||
-- undefined var --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "1962-12-02 08:34:10.000000"
|
||||
string(19) "1962-12-02 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -315,7 +315,7 @@ object(DateTime)#%d (3) {
|
||||
-- unset var --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "1962-12-02 08:34:10.000000"
|
||||
string(19) "1962-12-02 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
|
||||
@@ -115,7 +115,7 @@ fclose( $file_handle );
|
||||
-- int 0 --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "1963-06-30 08:34:10.000000"
|
||||
string(19) "1963-06-30 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -125,7 +125,7 @@ object(DateTime)#%d (3) {
|
||||
-- int 1 --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "1963-07-01 08:34:10.000000"
|
||||
string(19) "1963-07-01 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -135,7 +135,7 @@ object(DateTime)#%d (3) {
|
||||
-- int 12345 --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "1997-04-17 08:34:10.000000"
|
||||
string(19) "1997-04-17 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -145,7 +145,7 @@ object(DateTime)#%d (3) {
|
||||
-- int -12345 --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "1929-09-11 08:34:10.000000"
|
||||
string(19) "1929-09-11 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -155,7 +155,7 @@ object(DateTime)#%d (3) {
|
||||
-- float 10.5 --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "1963-07-10 08:34:10.000000"
|
||||
string(19) "1963-07-10 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -165,7 +165,7 @@ object(DateTime)#%d (3) {
|
||||
-- float -10.5 --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "1963-06-20 08:34:10.000000"
|
||||
string(19) "1963-06-20 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -175,7 +175,7 @@ object(DateTime)#%d (3) {
|
||||
-- float .5 --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "1963-06-30 08:34:10.000000"
|
||||
string(19) "1963-06-30 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -205,7 +205,7 @@ bool(false)
|
||||
-- uppercase NULL --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "1963-06-30 08:34:10.000000"
|
||||
string(19) "1963-06-30 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -215,7 +215,7 @@ object(DateTime)#%d (3) {
|
||||
-- lowercase null --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "1963-06-30 08:34:10.000000"
|
||||
string(19) "1963-06-30 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -225,7 +225,7 @@ object(DateTime)#%d (3) {
|
||||
-- lowercase true --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "1963-07-01 08:34:10.000000"
|
||||
string(19) "1963-07-01 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -235,7 +235,7 @@ object(DateTime)#%d (3) {
|
||||
-- lowercase false --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "1963-06-30 08:34:10.000000"
|
||||
string(19) "1963-06-30 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -245,7 +245,7 @@ object(DateTime)#%d (3) {
|
||||
-- uppercase TRUE --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "1963-07-01 08:34:10.000000"
|
||||
string(19) "1963-07-01 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -255,7 +255,7 @@ object(DateTime)#%d (3) {
|
||||
-- uppercase FALSE --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "1963-06-30 08:34:10.000000"
|
||||
string(19) "1963-06-30 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -305,7 +305,7 @@ bool(false)
|
||||
-- undefined var --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "1963-06-30 08:34:10.000000"
|
||||
string(19) "1963-06-30 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -315,7 +315,7 @@ object(DateTime)#%d (3) {
|
||||
-- unset var --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "1963-06-30 08:34:10.000000"
|
||||
string(19) "1963-06-30 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
|
||||
@@ -115,7 +115,7 @@ fclose( $file_handle );
|
||||
-- int 0 --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "0000-02-15 08:34:10.000000"
|
||||
string(19) "0000-02-15 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -125,7 +125,7 @@ object(DateTime)#%d (3) {
|
||||
-- int 1 --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "0001-02-13 08:34:10.000000"
|
||||
string(19) "0001-02-13 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -135,7 +135,7 @@ object(DateTime)#%d (3) {
|
||||
-- int 12345 --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(27) "12345-02-13 08:34:10.000000"
|
||||
string(20) "12345-02-13 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -145,7 +145,7 @@ object(DateTime)#%d (3) {
|
||||
-- int -12345 --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(28) "-12345-02-15 08:34:10.000000"
|
||||
string(21) "-12345-02-15 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -155,7 +155,7 @@ object(DateTime)#%d (3) {
|
||||
-- float 10.5 --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "0010-02-16 08:34:10.000000"
|
||||
string(19) "0010-02-16 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -165,7 +165,7 @@ object(DateTime)#%d (3) {
|
||||
-- float -10.5 --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(27) "-0010-02-19 08:34:10.000000"
|
||||
string(20) "-0010-02-19 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -175,7 +175,7 @@ object(DateTime)#%d (3) {
|
||||
-- float .5 --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "0000-02-15 08:34:10.000000"
|
||||
string(19) "0000-02-15 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -205,7 +205,7 @@ bool(false)
|
||||
-- uppercase NULL --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "0000-02-15 08:34:10.000000"
|
||||
string(19) "0000-02-15 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -215,7 +215,7 @@ object(DateTime)#%d (3) {
|
||||
-- lowercase null --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "0000-02-15 08:34:10.000000"
|
||||
string(19) "0000-02-15 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -225,7 +225,7 @@ object(DateTime)#%d (3) {
|
||||
-- lowercase true --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "0001-02-13 08:34:10.000000"
|
||||
string(19) "0001-02-13 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -235,7 +235,7 @@ object(DateTime)#%d (3) {
|
||||
-- lowercase false --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "0000-02-15 08:34:10.000000"
|
||||
string(19) "0000-02-15 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -245,7 +245,7 @@ object(DateTime)#%d (3) {
|
||||
-- uppercase TRUE --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "0001-02-13 08:34:10.000000"
|
||||
string(19) "0001-02-13 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -255,7 +255,7 @@ object(DateTime)#%d (3) {
|
||||
-- uppercase FALSE --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "0000-02-15 08:34:10.000000"
|
||||
string(19) "0000-02-15 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -305,7 +305,7 @@ bool(false)
|
||||
-- undefined var --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "0000-02-15 08:34:10.000000"
|
||||
string(19) "0000-02-15 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -315,7 +315,7 @@ object(DateTime)#%d (3) {
|
||||
-- unset var --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "0000-02-15 08:34:10.000000"
|
||||
string(19) "0000-02-15 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
|
||||
@@ -115,7 +115,7 @@ fclose( $file_handle );
|
||||
-- int 0 --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "1962-12-25 08:34:10.000000"
|
||||
string(19) "1962-12-25 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -125,7 +125,7 @@ object(DateTime)#%d (3) {
|
||||
-- int 1 --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "1963-01-01 08:34:10.000000"
|
||||
string(19) "1963-01-01 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -135,7 +135,7 @@ object(DateTime)#%d (3) {
|
||||
-- int 12345 --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "2199-07-30 08:34:10.000000"
|
||||
string(19) "2199-07-30 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -145,7 +145,7 @@ object(DateTime)#%d (3) {
|
||||
-- int -12345 --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "1726-05-21 08:34:10.000000"
|
||||
string(19) "1726-05-21 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -155,7 +155,7 @@ object(DateTime)#%d (3) {
|
||||
-- float 10.5 --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "1963-03-05 08:34:10.000000"
|
||||
string(19) "1963-03-05 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -165,7 +165,7 @@ object(DateTime)#%d (3) {
|
||||
-- float -10.5 --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "1962-10-16 08:34:10.000000"
|
||||
string(19) "1962-10-16 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -175,7 +175,7 @@ object(DateTime)#%d (3) {
|
||||
-- float .5 --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "1962-12-25 08:34:10.000000"
|
||||
string(19) "1962-12-25 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -205,7 +205,7 @@ bool(false)
|
||||
-- uppercase NULL --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "1962-12-25 08:34:10.000000"
|
||||
string(19) "1962-12-25 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -215,7 +215,7 @@ object(DateTime)#%d (3) {
|
||||
-- lowercase null --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "1962-12-25 08:34:10.000000"
|
||||
string(19) "1962-12-25 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -225,7 +225,7 @@ object(DateTime)#%d (3) {
|
||||
-- lowercase true --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "1963-01-01 08:34:10.000000"
|
||||
string(19) "1963-01-01 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -235,7 +235,7 @@ object(DateTime)#%d (3) {
|
||||
-- lowercase false --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "1962-12-25 08:34:10.000000"
|
||||
string(19) "1962-12-25 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -245,7 +245,7 @@ object(DateTime)#%d (3) {
|
||||
-- uppercase TRUE --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "1963-01-01 08:34:10.000000"
|
||||
string(19) "1963-01-01 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -255,7 +255,7 @@ object(DateTime)#%d (3) {
|
||||
-- uppercase FALSE --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "1962-12-25 08:34:10.000000"
|
||||
string(19) "1962-12-25 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -305,7 +305,7 @@ bool(false)
|
||||
-- undefined var --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "1962-12-25 08:34:10.000000"
|
||||
string(19) "1962-12-25 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -315,7 +315,7 @@ object(DateTime)#%d (3) {
|
||||
-- unset var --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "1962-12-25 08:34:10.000000"
|
||||
string(19) "1962-12-25 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
|
||||
@@ -115,7 +115,7 @@ fclose( $file_handle );
|
||||
-- int 0 --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "1963-02-10 08:34:10.000000"
|
||||
string(19) "1963-02-10 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -125,7 +125,7 @@ object(DateTime)#%d (3) {
|
||||
-- int 1 --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "1963-02-11 08:34:10.000000"
|
||||
string(19) "1963-02-11 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -135,7 +135,7 @@ object(DateTime)#%d (3) {
|
||||
-- int 12345 --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "1996-11-28 08:34:10.000000"
|
||||
string(19) "1996-11-28 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -145,7 +145,7 @@ object(DateTime)#%d (3) {
|
||||
-- int -12345 --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "1929-04-24 08:34:10.000000"
|
||||
string(19) "1929-04-24 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -155,7 +155,7 @@ object(DateTime)#%d (3) {
|
||||
-- float 10.5 --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "1963-02-20 08:34:10.000000"
|
||||
string(19) "1963-02-20 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -165,7 +165,7 @@ object(DateTime)#%d (3) {
|
||||
-- float -10.5 --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "1963-01-31 08:34:10.000000"
|
||||
string(19) "1963-01-31 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -175,7 +175,7 @@ object(DateTime)#%d (3) {
|
||||
-- float .5 --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "1963-02-10 08:34:10.000000"
|
||||
string(19) "1963-02-10 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -205,7 +205,7 @@ bool(false)
|
||||
-- uppercase NULL --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "1963-02-10 08:34:10.000000"
|
||||
string(19) "1963-02-10 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -215,7 +215,7 @@ object(DateTime)#%d (3) {
|
||||
-- lowercase null --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "1963-02-10 08:34:10.000000"
|
||||
string(19) "1963-02-10 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -225,7 +225,7 @@ object(DateTime)#%d (3) {
|
||||
-- lowercase true --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "1963-02-11 08:34:10.000000"
|
||||
string(19) "1963-02-11 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -235,7 +235,7 @@ object(DateTime)#%d (3) {
|
||||
-- lowercase false --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "1963-02-10 08:34:10.000000"
|
||||
string(19) "1963-02-10 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -245,7 +245,7 @@ object(DateTime)#%d (3) {
|
||||
-- uppercase TRUE --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "1963-02-11 08:34:10.000000"
|
||||
string(19) "1963-02-11 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -255,7 +255,7 @@ object(DateTime)#%d (3) {
|
||||
-- uppercase FALSE --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "1963-02-10 08:34:10.000000"
|
||||
string(19) "1963-02-10 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -305,7 +305,7 @@ bool(false)
|
||||
-- undefined var --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "1963-02-10 08:34:10.000000"
|
||||
string(19) "1963-02-10 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -315,7 +315,7 @@ object(DateTime)#%d (3) {
|
||||
-- unset var --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "1963-02-10 08:34:10.000000"
|
||||
string(19) "1963-02-10 08:34:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
|
||||
@@ -115,7 +115,7 @@ fclose( $file_handle );
|
||||
-- int 0 --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "2009-01-31 00:13:45.000000"
|
||||
string(19) "2009-01-31 00:13:45"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -125,7 +125,7 @@ object(DateTime)#%d (3) {
|
||||
-- int 1 --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "2009-01-31 01:13:45.000000"
|
||||
string(19) "2009-01-31 01:13:45"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -135,7 +135,7 @@ object(DateTime)#%d (3) {
|
||||
-- int 12345 --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "2010-06-29 09:13:45.000000"
|
||||
string(19) "2010-06-29 09:13:45"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -145,7 +145,7 @@ object(DateTime)#%d (3) {
|
||||
-- int -12345 --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "2009-01-30 15:13:45.000000"
|
||||
string(19) "2009-01-30 15:13:45"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -155,7 +155,7 @@ object(DateTime)#%d (3) {
|
||||
-- float 10.5 --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "2009-01-30 10:13:45.000000"
|
||||
string(19) "2009-01-30 10:13:45"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -165,7 +165,7 @@ object(DateTime)#%d (3) {
|
||||
-- float -10.5 --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "2009-01-29 14:13:45.000000"
|
||||
string(19) "2009-01-29 14:13:45"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -175,7 +175,7 @@ object(DateTime)#%d (3) {
|
||||
-- float .5 --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "2009-01-29 00:13:45.000000"
|
||||
string(19) "2009-01-29 00:13:45"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -205,7 +205,7 @@ bool(false)
|
||||
-- uppercase NULL --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "2009-01-29 00:13:45.000000"
|
||||
string(19) "2009-01-29 00:13:45"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -215,7 +215,7 @@ object(DateTime)#%d (3) {
|
||||
-- lowercase null --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "2009-01-29 00:13:45.000000"
|
||||
string(19) "2009-01-29 00:13:45"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -225,7 +225,7 @@ object(DateTime)#%d (3) {
|
||||
-- lowercase true --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "2009-01-29 01:13:45.000000"
|
||||
string(19) "2009-01-29 01:13:45"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -235,7 +235,7 @@ object(DateTime)#%d (3) {
|
||||
-- lowercase false --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "2009-01-29 00:13:45.000000"
|
||||
string(19) "2009-01-29 00:13:45"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -245,7 +245,7 @@ object(DateTime)#%d (3) {
|
||||
-- uppercase TRUE --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "2009-01-29 01:13:45.000000"
|
||||
string(19) "2009-01-29 01:13:45"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -255,7 +255,7 @@ object(DateTime)#%d (3) {
|
||||
-- uppercase FALSE --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "2009-01-29 00:13:45.000000"
|
||||
string(19) "2009-01-29 00:13:45"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -305,7 +305,7 @@ bool(false)
|
||||
-- undefined var --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "2009-01-29 00:13:45.000000"
|
||||
string(19) "2009-01-29 00:13:45"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -315,7 +315,7 @@ object(DateTime)#%d (3) {
|
||||
-- unset var --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "2009-01-29 00:13:45.000000"
|
||||
string(19) "2009-01-29 00:13:45"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
|
||||
@@ -115,7 +115,7 @@ fclose( $file_handle );
|
||||
-- int 0 --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "2009-01-31 10:00:45.000000"
|
||||
string(19) "2009-01-31 10:00:45"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -125,7 +125,7 @@ object(DateTime)#%d (3) {
|
||||
-- int 1 --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "2009-01-31 10:01:45.000000"
|
||||
string(19) "2009-01-31 10:01:45"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -135,7 +135,7 @@ object(DateTime)#%d (3) {
|
||||
-- int 12345 --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "2009-02-08 23:45:45.000000"
|
||||
string(19) "2009-02-08 23:45:45"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -145,7 +145,7 @@ object(DateTime)#%d (3) {
|
||||
-- int -12345 --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "2009-01-30 20:15:45.000000"
|
||||
string(19) "2009-01-30 20:15:45"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -155,7 +155,7 @@ object(DateTime)#%d (3) {
|
||||
-- float 10.5 --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "2009-01-30 10:10:45.000000"
|
||||
string(19) "2009-01-30 10:10:45"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -165,7 +165,7 @@ object(DateTime)#%d (3) {
|
||||
-- float -10.5 --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "2009-01-30 09:50:45.000000"
|
||||
string(19) "2009-01-30 09:50:45"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -175,7 +175,7 @@ object(DateTime)#%d (3) {
|
||||
-- float .5 --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "2009-01-30 10:00:45.000000"
|
||||
string(19) "2009-01-30 10:00:45"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -205,7 +205,7 @@ bool(false)
|
||||
-- uppercase NULL --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "2009-01-30 10:00:45.000000"
|
||||
string(19) "2009-01-30 10:00:45"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -215,7 +215,7 @@ object(DateTime)#%d (3) {
|
||||
-- lowercase null --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "2009-01-30 10:00:45.000000"
|
||||
string(19) "2009-01-30 10:00:45"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -225,7 +225,7 @@ object(DateTime)#%d (3) {
|
||||
-- lowercase true --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "2009-01-30 10:01:45.000000"
|
||||
string(19) "2009-01-30 10:01:45"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -235,7 +235,7 @@ object(DateTime)#%d (3) {
|
||||
-- lowercase false --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "2009-01-30 10:00:45.000000"
|
||||
string(19) "2009-01-30 10:00:45"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -245,7 +245,7 @@ object(DateTime)#%d (3) {
|
||||
-- uppercase TRUE --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "2009-01-30 10:01:45.000000"
|
||||
string(19) "2009-01-30 10:01:45"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -255,7 +255,7 @@ object(DateTime)#%d (3) {
|
||||
-- uppercase FALSE --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "2009-01-30 10:00:45.000000"
|
||||
string(19) "2009-01-30 10:00:45"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -305,7 +305,7 @@ bool(false)
|
||||
-- undefined var --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "2009-01-30 10:00:45.000000"
|
||||
string(19) "2009-01-30 10:00:45"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -315,7 +315,7 @@ object(DateTime)#%d (3) {
|
||||
-- unset var --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "2009-01-30 10:00:45.000000"
|
||||
string(19) "2009-01-30 10:00:45"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
|
||||
@@ -115,7 +115,7 @@ fclose( $file_handle );
|
||||
-- int 0 --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "2009-01-31 10:13:00.000000"
|
||||
string(19) "2009-01-31 10:13:00"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -125,7 +125,7 @@ object(DateTime)#%d (3) {
|
||||
-- int 1 --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "2009-01-31 10:13:01.000000"
|
||||
string(19) "2009-01-31 10:13:01"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -135,7 +135,7 @@ object(DateTime)#%d (3) {
|
||||
-- int 12345 --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "2009-01-31 13:38:45.000000"
|
||||
string(19) "2009-01-31 13:38:45"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -145,7 +145,7 @@ object(DateTime)#%d (3) {
|
||||
-- int -12345 --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "2009-01-31 06:47:15.000000"
|
||||
string(19) "2009-01-31 06:47:15"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -155,7 +155,7 @@ object(DateTime)#%d (3) {
|
||||
-- float 10.5 --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "2009-01-31 10:13:10.000000"
|
||||
string(19) "2009-01-31 10:13:10"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -165,7 +165,7 @@ object(DateTime)#%d (3) {
|
||||
-- float -10.5 --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "2009-01-31 10:12:50.000000"
|
||||
string(19) "2009-01-31 10:12:50"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -175,7 +175,7 @@ object(DateTime)#%d (3) {
|
||||
-- float .5 --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "2009-01-31 10:13:00.000000"
|
||||
string(19) "2009-01-31 10:13:00"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -205,7 +205,7 @@ bool(false)
|
||||
-- uppercase NULL --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "2009-01-31 10:13:00.000000"
|
||||
string(19) "2009-01-31 10:13:00"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -215,7 +215,7 @@ object(DateTime)#%d (3) {
|
||||
-- lowercase null --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "2009-01-31 10:13:00.000000"
|
||||
string(19) "2009-01-31 10:13:00"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -225,7 +225,7 @@ object(DateTime)#%d (3) {
|
||||
-- lowercase true --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "2009-01-31 10:13:01.000000"
|
||||
string(19) "2009-01-31 10:13:01"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -235,7 +235,7 @@ object(DateTime)#%d (3) {
|
||||
-- lowercase false --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "2009-01-31 10:13:00.000000"
|
||||
string(19) "2009-01-31 10:13:00"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -245,7 +245,7 @@ object(DateTime)#%d (3) {
|
||||
-- uppercase TRUE --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "2009-01-31 10:13:01.000000"
|
||||
string(19) "2009-01-31 10:13:01"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -255,7 +255,7 @@ object(DateTime)#%d (3) {
|
||||
-- uppercase FALSE --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "2009-01-31 10:13:00.000000"
|
||||
string(19) "2009-01-31 10:13:00"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -305,7 +305,7 @@ bool(false)
|
||||
-- undefined var --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "2009-01-31 10:13:00.000000"
|
||||
string(19) "2009-01-31 10:13:00"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -315,7 +315,7 @@ object(DateTime)#%d (3) {
|
||||
-- unset var --
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "2009-01-31 10:13:00.000000"
|
||||
string(19) "2009-01-31 10:13:00"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
|
||||
@@ -95,18 +95,18 @@ result = Monday 2037-10-05 00:00:00 NZDT
|
||||
wanted = Monday 00:00:00
|
||||
|
||||
Australia/Adelaide
|
||||
ts = Friday 1971-01-01 17:17:17 ACST
|
||||
result = Monday 1971-01-04 00:00:00 ACST
|
||||
ts = Friday 1971-01-01 17:17:17 CST
|
||||
result = Monday 1971-01-04 00:00:00 CST
|
||||
wanted = Monday 00:00:00
|
||||
|
||||
Australia/Darwin
|
||||
ts = Monday 1971-03-29 17:17:17 ACST
|
||||
result = Monday 1971-04-05 00:00:00 ACST
|
||||
ts = Monday 1971-03-29 17:17:17 CST
|
||||
result = Monday 1971-04-05 00:00:00 CST
|
||||
wanted = Monday 00:00:00
|
||||
|
||||
Australia/Perth
|
||||
ts = Friday 1971-01-01 17:17:17 AWST
|
||||
result = Monday 1971-01-04 00:00:00 AWST
|
||||
ts = Friday 1971-01-01 17:17:17 WST
|
||||
result = Monday 1971-01-04 00:00:00 WST
|
||||
wanted = Monday 00:00:00
|
||||
|
||||
America/Aruba
|
||||
|
||||
@@ -233,8 +233,8 @@ result=Saturday 1970-01-03 00:00:00 CAT 0
|
||||
wanted=Saturday 00:00:00
|
||||
|
||||
TZ=Asia/Kashgar - Is it OK for this to be 3 AM? yes
|
||||
tStamp=Thursday 1980-04-24 17:17:17 XJT 0
|
||||
result=Thursday 1980-05-01 00:00:00 XJT 0
|
||||
tStamp=Thursday 1980-04-24 17:17:17 KAST 0
|
||||
result=Thursday 1980-05-01 03:00:00 CST 0
|
||||
wanted=Thursday 03:00:00
|
||||
|
||||
TZ=Indian/Christmas - Is it OK for this to be 7 AM? Note: does
|
||||
|
||||
@@ -39,5 +39,5 @@ datestr 10:00:00 AM July 1 2005 UTC
|
||||
|
||||
Setting TZ
|
||||
input 10:00:00 AM July 1 2005
|
||||
strftime 10:00:00 AM July 1 2005 AEST +1000
|
||||
datestr 10:00:00 AM July 1 2005 AEST
|
||||
strftime 10:00:00 AM July 1 2005 EST +1000
|
||||
datestr 10:00:00 AM July 1 2005 EST
|
||||
@@ -46,7 +46,7 @@ array(12) {
|
||||
int(-62169984000)
|
||||
object(DateTime)#1 (3) {
|
||||
["date"]=>
|
||||
string(27) "-0001-11-30 00:00:00.000000"
|
||||
string(20) "-0001-11-30 00:00:00"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
|
||||
@@ -46,7 +46,7 @@ array(12) {
|
||||
bool(false)
|
||||
object(DateTime)#1 (3) {
|
||||
["date"]=>
|
||||
string(20) "-0001-11-30 00:00:00.000000"
|
||||
string(20) "-0001-11-30 00:00:00"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
|
||||
@@ -16,7 +16,7 @@ echo $d->format( 'U' ), "\n\n";
|
||||
--EXPECT--
|
||||
object(DateTime)#1 (3) {
|
||||
["date"]=>
|
||||
string(26) "1955-05-23 00:00:00.000000"
|
||||
string(19) "1955-05-23 00:00:00"
|
||||
["timezone_type"]=>
|
||||
int(1)
|
||||
["timezone"]=>
|
||||
@@ -27,7 +27,7 @@ object(DateTime)#1 (3) {
|
||||
|
||||
object(DateTime)#1 (3) {
|
||||
["date"]=>
|
||||
string(26) "1955-05-22 23:00:00.000000"
|
||||
string(19) "1955-05-22 23:00:00"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
|
||||
@@ -44,9 +44,9 @@ array(4) {
|
||||
|
||||
string(6) "Y-m-d+"
|
||||
string(19) "2001-11-29 13:20:01"
|
||||
object(DateTime)#%d (3) {
|
||||
object(DateTime)#2 (3) {
|
||||
["date"]=>
|
||||
string(26) "2001-11-29 %d:%d:%d.%d"
|
||||
string(19) "2001-11-29 %d:%d:%d"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -70,9 +70,9 @@ array(4) {
|
||||
|
||||
string(7) "Y-m-d +"
|
||||
string(19) "2001-11-29 13:20:01"
|
||||
object(DateTime)#%d (3) {
|
||||
object(DateTime)#3 (3) {
|
||||
["date"]=>
|
||||
string(26) "2001-11-29 %d:%d:%d.%d"
|
||||
string(19) "2001-11-29 %d:%d:%d"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -96,9 +96,9 @@ array(4) {
|
||||
|
||||
string(6) "Y-m-d+"
|
||||
string(10) "2001-11-29"
|
||||
object(DateTime)#%d (3) {
|
||||
object(DateTime)#2 (3) {
|
||||
["date"]=>
|
||||
string(26) "2001-11-29 %d:%d:%d.%d"
|
||||
string(19) "2001-11-29 %d:%d:%d"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -139,9 +139,9 @@ array(4) {
|
||||
|
||||
string(7) "Y-m-d +"
|
||||
string(11) "2001-11-29 "
|
||||
object(DateTime)#%d (3) {
|
||||
object(DateTime)#2 (3) {
|
||||
["date"]=>
|
||||
string(26) "2001-11-29 %d:%d:%d.%d"
|
||||
string(19) "2001-11-29 %d:%d:%d"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
|
||||
@@ -117,7 +117,7 @@ object(DatePeriod)#6 (6) {
|
||||
["start"]=>
|
||||
object(DateTime)#4 (3) {
|
||||
["date"]=>
|
||||
string(26) "2003-01-02 08:00:00.000000"
|
||||
string(19) "2003-01-02 08:00:00"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -201,7 +201,7 @@ object(DatePeriod)#9 (6) {
|
||||
["start"]=>
|
||||
object(DateTime)#6 (3) {
|
||||
["date"]=>
|
||||
string(26) "2003-01-02 08:00:00.000000"
|
||||
string(19) "2003-01-02 08:00:00"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
|
||||
@@ -33,7 +33,7 @@ object(DatePeriod)#1 (6) {
|
||||
["start"]=>
|
||||
object(DateTime)#2 (3) {
|
||||
["date"]=>
|
||||
string(26) "2010-01-01 00:00:00.000000"
|
||||
string(19) "2010-01-01 00:00:00"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -42,7 +42,7 @@ object(DatePeriod)#1 (6) {
|
||||
["current"]=>
|
||||
object(DateTime)#4 (3) {
|
||||
["date"]=>
|
||||
string(26) "2010-01-04 00:00:00.000000"
|
||||
string(19) "2010-01-04 00:00:00"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -92,7 +92,7 @@ object(DatePeriod)#5 (6) {
|
||||
["start"]=>
|
||||
object(DateTime)#10 (3) {
|
||||
["date"]=>
|
||||
string(26) "2010-01-01 00:00:00.000000"
|
||||
string(19) "2010-01-01 00:00:00"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -101,7 +101,7 @@ object(DatePeriod)#5 (6) {
|
||||
["current"]=>
|
||||
object(DateTime)#7 (3) {
|
||||
["date"]=>
|
||||
string(26) "2010-01-04 00:00:00.000000"
|
||||
string(19) "2010-01-04 00:00:00"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
|
||||
@@ -14,17 +14,17 @@ var_dump($di);
|
||||
--EXPECTF--
|
||||
object(DateInterval)#%d (15) {
|
||||
["y"]=>
|
||||
int(-1)
|
||||
int(2)
|
||||
["m"]=>
|
||||
int(-1)
|
||||
int(0)
|
||||
["d"]=>
|
||||
int(-1)
|
||||
int(0)
|
||||
["h"]=>
|
||||
int(-1)
|
||||
int(6)
|
||||
["i"]=>
|
||||
int(-1)
|
||||
int(8)
|
||||
["s"]=>
|
||||
int(-1)
|
||||
int(0)
|
||||
["weekday"]=>
|
||||
int(10)
|
||||
["weekday_behavior"]=>
|
||||
|
||||
@@ -14,17 +14,17 @@ var_dump($di);
|
||||
--EXPECTF--
|
||||
object(DateInterval)#%d (15) {
|
||||
["y"]=>
|
||||
int(-1)
|
||||
int(2)
|
||||
["m"]=>
|
||||
int(-1)
|
||||
int(0)
|
||||
["d"]=>
|
||||
int(-1)
|
||||
int(0)
|
||||
["h"]=>
|
||||
int(-1)
|
||||
int(6)
|
||||
["i"]=>
|
||||
int(-1)
|
||||
int(8)
|
||||
["s"]=>
|
||||
int(-1)
|
||||
int(0)
|
||||
["weekday"]=>
|
||||
int(10)
|
||||
["weekday_behavior"]=>
|
||||
|
||||
@@ -10,7 +10,7 @@ print_r($date);
|
||||
--EXPECTF--
|
||||
DateTime Object
|
||||
(
|
||||
[date] => 2041-01-21 15:24:52.000000
|
||||
[date] => 2041-01-21 15:24:52
|
||||
[timezone_type] => 2
|
||||
[timezone] => GMT
|
||||
)
|
||||
@@ -12,7 +12,7 @@ var_dump($dt);
|
||||
--EXPECT--
|
||||
object(DateTime)#1 (3) {
|
||||
["date"]=>
|
||||
string(26) "2011-02-02 00:00:00.000000"
|
||||
string(19) "2011-02-02 00:00:00"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -20,7 +20,7 @@ object(DateTime)#1 (3) {
|
||||
}
|
||||
object(DateTime)#2 (3) {
|
||||
["date"]=>
|
||||
string(26) "1970-01-01 00:00:00.000000"
|
||||
string(19) "1970-01-01 00:00:00"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
|
||||
@@ -19,7 +19,7 @@ var_dump($dt);
|
||||
--EXPECT--
|
||||
object(DateTime)#2 (3) {
|
||||
["date"]=>
|
||||
string(26) "2011-01-01 00:00:00.000000"
|
||||
string(19) "2011-01-01 00:00:00"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -27,7 +27,7 @@ object(DateTime)#2 (3) {
|
||||
}
|
||||
object(DateTime)#2 (3) {
|
||||
["date"]=>
|
||||
string(26) "2011-01-02 00:00:00.000000"
|
||||
string(19) "2011-01-02 00:00:00"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -35,7 +35,7 @@ object(DateTime)#2 (3) {
|
||||
}
|
||||
object(DateTime)#3 (3) {
|
||||
["date"]=>
|
||||
string(26) "2010-12-31 00:00:00.000000"
|
||||
string(19) "2010-12-31 00:00:00"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
|
||||
@@ -14,7 +14,7 @@ var_dump($t);
|
||||
string(10) "1278455908"
|
||||
object(DateTime)#1 (3) {
|
||||
["date"]=>
|
||||
string(26) "2010-07-06 18:38:28.000000"
|
||||
string(19) "2010-07-06 18:38:28"
|
||||
["timezone_type"]=>
|
||||
int(2)
|
||||
["timezone"]=>
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
--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
|
||||
@@ -1,27 +0,0 @@
|
||||
--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
|
||||
@@ -1,35 +0,0 @@
|
||||
--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
|
||||
@@ -1,38 +0,0 @@
|
||||
--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)
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
--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)
|
||||
}
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
--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"
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
--TEST--
|
||||
Bug #68942 (Use after free vulnerability in unserialize() with DateTime).
|
||||
--FILE--
|
||||
<?php
|
||||
$data = unserialize('a:2:{i:0;O:8:"DateTime":3:{s:4:"date";s:26:"2000-01-01 00:00:00.000000";s:13:"timezone_type";a:2:{i:0;i:1;i:1;i:2;}s:8:"timezone";s:1:"A";}i:1;R:5;}');
|
||||
var_dump($data);
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Invalid serialization data for DateTime object in %s/bug68942_2.php on line %d
|
||||
@@ -46,7 +46,7 @@ Array
|
||||
==
|
||||
DateTime Object
|
||||
(
|
||||
[date] => 2004-06-08 00:00:00.000000
|
||||
[date] => 2004-06-08 00:00:00
|
||||
[timezone_type] => 3
|
||||
[timezone] => UTC
|
||||
)
|
||||
@@ -67,7 +67,7 @@ Array
|
||||
==
|
||||
DateTime Object
|
||||
(
|
||||
[date] => 2004-06-08 00:00:00.000000
|
||||
[date] => 2004-06-08 00:00:00
|
||||
[timezone_type] => 3
|
||||
[timezone] => UTC
|
||||
)
|
||||
@@ -88,7 +88,7 @@ Array
|
||||
==
|
||||
DateTime Object
|
||||
(
|
||||
[date] => 2004-06-08 00:00:00.000000
|
||||
[date] => 2004-06-08 00:00:00
|
||||
[timezone_type] => 3
|
||||
[timezone] => UTC
|
||||
)
|
||||
@@ -109,7 +109,7 @@ Array
|
||||
==
|
||||
DateTime Object
|
||||
(
|
||||
[date] => 2004-06-08 00:00:00.000000
|
||||
[date] => 2004-06-08 00:00:00
|
||||
[timezone_type] => 3
|
||||
[timezone] => UTC
|
||||
)
|
||||
@@ -129,7 +129,7 @@ Array
|
||||
==
|
||||
DateTime Object
|
||||
(
|
||||
[date] => 2004-06-08 00:00:00.000000
|
||||
[date] => 2004-06-08 00:00:00
|
||||
[timezone_type] => 3
|
||||
[timezone] => UTC
|
||||
)
|
||||
|
||||
@@ -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(26) "%s"
|
||||
string(19) "%s"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -33,7 +33,7 @@ object(DateTime)#%d (3) {
|
||||
}
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "%s"
|
||||
string(19) "%s"
|
||||
["timezone_type"]=>
|
||||
int(2)
|
||||
["timezone"]=>
|
||||
@@ -41,7 +41,7 @@ object(DateTime)#%d (3) {
|
||||
}
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "2005-07-14 22:30:41.000000"
|
||||
string(19) "2005-07-14 22:30:41"
|
||||
["timezone_type"]=>
|
||||
int(3)
|
||||
["timezone"]=>
|
||||
@@ -49,10 +49,10 @@ object(DateTime)#%d (3) {
|
||||
}
|
||||
object(DateTime)#%d (3) {
|
||||
["date"]=>
|
||||
string(26) "2005-07-14 22:30:41.000000"
|
||||
string(19) "2005-07-14 22:30:41"
|
||||
["timezone_type"]=>
|
||||
int(2)
|
||||
["timezone"]=>
|
||||
string(3) "GMT"
|
||||
}
|
||||
===DONE===
|
||||
===DONE===
|
||||
Loaded 100 of 654 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user