Compare commits

..
Author SHA1 Message Date
Johannes Schlüter 7d14f70776 PHP 5.3.4 2010-12-08 21:41:22 +00:00
Johannes Schlüter 3d76289c59 PHP 5.3.4 2010-12-08 21:38:51 +00:00
Eyal Teutsch eabb9be2ac curl_setopt() arg: using DIRECTORY_SEPARATOR rather then "/" to make windows tests pass too 2010-12-08 14:16:17 +00:00
Pierre Joye f9207e3187 - new warning in imagepstext 2010-12-08 09:38:47 +00:00
Pierre Joye a0eb5848b5 - Fix #53492, fix crash if aa steps are invalid 2010-12-08 08:45:56 +00:00
Pierre Joye cba0322c81 - not anymore in core or builtin 2010-12-07 23:53:51 +00:00
Andrey Hristov fc6e70d8e4 switch this off for the release 2010-12-07 11:13:55 +00:00
Pierre Joye 1504071cb1 - add CVE 2010-12-07 01:22:23 +00:00
Andrey Hristov 5efdfee8c6 Skip additional result sets sent by MySQL 5.5 servers
which break the Protocol API 
(see http://bugs.mysql.com/bug.php?id=58700)
2010-12-06 13:59:14 +00:00
Andrey Hristov 03fd10c479 don't crash if the API is used incorrectly 2010-12-06 13:50:51 +00:00
Felipe Pena 75eeee8f24 - Fixed test (Eyal Teutsch) 2010-12-04 15:57:08 +00:00
Felipe Pena 0aa36e2d97 - Fixed test 2010-12-04 15:48:45 +00:00
Felipe Pena 0f53b4e515 - Fixed tests 2010-12-04 12:28:23 +00:00
Felipe Pena 76ba9b44b4 - Fixed test 2010-12-03 23:25:27 +00:00
Felipe Pena 3dc4f14c6b - Fixed test 2010-12-03 22:58:21 +00:00
Felipe Pena 3e0b63312e - Order 2010-12-03 21:09:47 +00:00
Felipe Pena 689d1d9e4b - Fixed bug #53463 (sqlite3 columnName() segfaults on bad column_number) 2010-12-03 21:05:44 +00:00
Jani Taskinen 686c7fec26 - CS + reorder to match trunk better, removed trailing dots from error messages 2010-12-03 16:04:24 +00:00
Jani Taskinen 85ef85a0b4 - Fix test 2010-12-03 16:02:47 +00:00
Jani Taskinen f561727ee0 - Add test for the ob_start($foo); leak/crash bug 2010-12-03 15:30:21 +00:00
Jani Taskinen c8e40e49d7 - Fix leaks and crash bug when passing the callback as variable 2010-12-03 13:20:13 +00:00
Pierre Joye 63d87a0adb - Fix #29085, bad default include_path on Windows 2010-12-02 23:23:14 +00:00
Felipe Pena 06c183b761 - Cosmetics 2010-12-02 23:01:04 +00:00
Pierre Joye aef55bc5f3 - some missing entries 2010-12-02 22:56:57 +00:00
Andrey Hristov 9f045cd40e fix test after newly introduced constant 2010-12-02 19:11:41 +00:00
Johannes Schlüter 094bcdff8b - Back to -dev 2010-12-02 14:34:32 +00:00
Andrey Hristov 334e62a77d and export the new constant 2010-12-02 14:21:23 +00:00
Andrey Hristov 3da811a124 new server constant as of 5.5 2010-12-02 13:59:56 +00:00
Johannes Schlüter f915973c1e - PHP 5.3.4RC2 2010-12-02 13:59:38 +00:00
Pierre Joye cd62a70863 - not TS and useless on server, also not required anymore with the supported windows versions 2010-12-02 11:37:43 +00:00
Adam Harvey 92fa280b96 Minimal fix for bug #53440 (INSTALL file refers to php.ini-dist, should refer
to php.ini-production). There are a lot more issues with the INSTALL file,
though, which I'll file another bug for.
2010-12-02 03:26:37 +00:00
Christopher Jones 24c87d760d Remove OCI8 devel status in preparation for PHP 5.3.4 release 2010-12-01 23:30:28 +00:00
Christopher Jones 2024790fd2 Add Berkeley DB 5.1 support to the DBA extension 2010-12-01 19:20:16 +00:00
Ilia Alshanetsky d506ce8d94 Fixed bug #51250 (iconv_mime_decode() does not ignore malformed Q-encoded words) 2010-12-01 14:03:36 +00:00
Andrey Hristov 4adcc3c7bc add a comment 2010-12-01 10:16:51 +00:00
Jérôme Loyet 4c76006fe3 - Fixed bug #53412 (segfault when using -y) 2010-11-30 19:37:10 +00:00
Ilia Alshanetsky 964eff5276 Missing bits from last commit 2010-11-30 16:11:27 +00:00
Ilia Alshanetsky 085e8b781c Fixed bug #52202 (CURLOPT_PRIVATE gets corrupted). 2010-11-30 13:40:02 +00:00
Pierre Joye 761c62267f Fixed crash in zip extract method (possible CWE-170) 2010-11-30 11:04:06 +00:00
Ilia Alshanetsky f719d3707d Fixed bug #52656 (DOMCdataSection does not work with splitText). 2010-11-29 14:48:53 +00:00
Ilia Alshanetsky dd92188d76 Fixed bug #52828 (curl_setopt does not accept persistent streams). 2010-11-29 14:40:59 +00:00
Adam Harvey 7111501381 Update INI files per doc bug #53420 (mail.log is poorly documented). 2010-11-29 03:44:56 +00:00
Derick Rethans e16265aa0e - Reorganize slightly as there was already a date and an intl extension
header/section.
2010-11-28 16:33:07 +00:00
Derick Rethans 688b347d84 - Fixed two more test cases. 2010-11-28 16:27:49 +00:00
Derick Rethans 8cf9513bb9 - Fixed a few test cases. 2010-11-28 13:41:06 +00:00
Ilia Alshanetsky 3239a25e53 Missing bit from previous commit 2010-11-26 21:00:03 +00:00
Ilia Alshanetsky f28cff1925 Fixed bug #52327 (base64_decode() improper handling of leading padding in strict mode) 2010-11-26 20:59:13 +00:00
Pierre Joye c70397b3a9 - Fixed #53409, sleep() return NULL on Windows 2010-11-26 18:25:13 +00:00
Jérôme Loyet f13f4bc872 - Fixed bug #52501 (libevent made FPM crashed when forking -- libevent has been removed) 2010-11-26 13:46:15 +00:00
Johannes Schlüter 222e0bc0f6 - Remove outdated, unmaintained, misleading ChangeLog files 2010-11-26 13:21:25 +00:00
Ilia Alshanetsky 523da85c11 Fixed bug #53304 (quot_print_decode does not handle lower-case hex digits) 2010-11-25 21:38:06 +00:00
Gustavo André dos Santos Lopes 05abc63d14 - Fixed bug #53403 (use of unitialized values). Fixes the fix for bug #46587.
- Added test for bug #46587.
2010-11-25 16:44:20 +00:00
Felipe Pena dbeef88661 - Ordering 2010-11-25 00:05:03 +00:00
Pierre Joye 2ba369cdfa - fixed #53352 2010-11-23 22:14:54 +00:00
Felipe Pena a9a2eb4a14 - Fixed compile warnings 2010-11-23 21:49:18 +00:00
Felipe Pena ac15afe9c1 - Fixed test 2010-11-23 21:45:22 +00:00
Ilia Alshanetsky 4f3ab10786 Fixed bug #46587 (mt_rand() does not check that max is greater than min). 2010-11-23 13:09:15 +00:00
Christopher Jones 8ed386997f Explicitly name the added constant 2010-11-22 22:18:30 +00:00
Ilia Alshanetsky a40667d756 Fixed bug #51003 (unaligned memory access in ext/hash/hash_tiger.c). 2010-11-22 13:12:28 +00:00
Ilia Alshanetsky 534395e4ae Fixed bug #51003 (unaligned memory access in ext/hash/hash_tiger.c) 2010-11-22 13:10:13 +00:00
Gustavo André dos Santos Lopes 2a545be57f - Fix tests for \0 patch in PHP 5.3.
- Fix constants_error_004.phpt (closes bug #51901)
2010-11-22 05:10:14 +00:00
Felipe Pena 167e51f36c - Fixed ZTS build 2010-11-21 17:41:33 +00:00
Felipe Pena abb7038cbf - New NEWS structure (to be improved) 2010-11-21 14:07:22 +00:00
Johannes Schlüter ac4f3422bc - Improve test 2010-11-21 12:28:10 +00:00
Johannes Schlüter 9ea04e1e46 - Fix #52854 (ReflectionClass::newInstanceArgs does not work for classes without constructors 2010-11-21 12:24:09 +00:00
Felipe Pena 1ac484d1a1 - Fixed bug #53366 (Reflection doesnt get dynamic property value from getProperty()) 2010-11-20 22:53:55 +00:00
Kalle Sommer Nielsen 78f10489ca Added second fix from #50987 that wasn't apart of Ilia's commit 2010-11-20 20:59:28 +00:00
Ilia Alshanetsky 5f1b91a6bf Fixed bug #50987 (unaligned memory access in phar.c) 2010-11-20 19:27:31 +00:00
Stanislav Malyshev 4415b3af51 Add support for DateTime in datefmt_format 2010-11-20 02:09:04 +00:00
Christopher Jones c8462df127 Remove unreverted duplicate fix for nulls 2010-11-20 01:29:03 +00:00
Stanislav Malyshev f061627899 report intl fix 2010-11-19 23:27:52 +00:00
Stanislav Malyshev e6c213b8ea Fix invalid args bugs by Maksymilian Arciemowicz 2010-11-19 23:22:55 +00:00
Felipe Pena 93a4e0d1fa - Fixed extract() to do not overwrite $GLOBALS and $this when using EXTR_OVERWRITE.
patch by: jorto at redhat dot com
2010-11-19 22:06:44 +00:00
Felipe Pena f16059d697 - Fixed bug #53362 (Segmentation fault when extending SplFixedArray) 2010-11-19 20:07:32 +00:00
Martin Jansen 61d97af18b Fixed two typos in NEWS. 2010-11-19 18:38:23 +00:00
Ilia Alshanetsky a8b4724747 Fixed bug #47168 (printf of floating point variable prints maximum of 40 decimal places). 2010-11-19 16:36:10 +00:00
Jani Taskinen caf792940f - Merged check from trunk to prevent building multiple SAPIs (bug #52419) 2010-11-19 08:26:47 +00:00
Christopher Jones 64f21f63ad Update fix proviso now the mentioned Oracle bugfix is available in an Oracle patchset 2010-11-19 00:14:58 +00:00
Gustavo André dos Santos Lopes cdab5577c0 - Fixed borked test bug52820.phpt.
- Synced htmlentities17.phpt with trunk; there's no ≀ entity
  in HTML 4.01.
2010-11-18 21:44:42 +00:00
Johannes Schlüter 63f65b6e8f Back to -dev 2010-11-18 19:03:59 +00:00
138 changed files with 1867 additions and 16117 deletions

No files matched your search

-14191
View File
File diff suppressed because it is too large. Load diff
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
+24 -12
View File
@@ -279,7 +279,15 @@ ir if
it is your first install then you need to "make install" as well)
13. cd ../php-5.x.y
14. cp php.ini-dist /usr/local/lib/php.ini
14. The PHP distribution provides two sample php.ini files, you can use them
by
cp php.ini-development /usr/local/lib/php.ini
or
cp php.ini-production /usr/local/lib/php.ini
If you choose one of these php.ini files be certain to read the list
of changes within, as they affect how PHP behaves.
15. You can edit /usr/local/lib/php.ini file to set PHP options.
Edit your httpd.conf or srm.conf file and add:
@@ -451,15 +459,19 @@ Apache 2.0 on Unix systems
13. Setup your php.ini
cp php.ini-dist /usr/local/lib/php.ini
The PHP distribution provides two sample php.ini files, you can use them
by
cp php.ini-development /usr/local/lib/php.ini
or
cp php.ini-production /usr/local/lib/php.ini
If you choose one of these php.ini files be certain to read the list
of changes within, as they affect how PHP behaves.
You may edit your .ini file to set PHP options. If you prefer having
php.ini in another location, use --with-config-file-path=/some/path in
step 10.
If you instead choose php.ini-recommended, be certain to read the list
of changes within, as they affect how PHP behaves.
14. Edit your httpd.conf to load the PHP module. The path on the right hand
side of the LoadModule statement must point to the path of the PHP
module on your system. The make install from above may have already
@@ -858,7 +870,7 @@ Using Binary Packages
Example 2-6. OpenBSD Package Install Example
# pkg_add php4-core-4.3.8.tgz
# /usr/local/sbin/phpxs -s
# cp /usr/local/share/doc/php4/php.ini-recommended /var/www/conf/php.ini
# cp /usr/local/share/doc/php4/php.ini-development /var/www/conf/php.ini
(add in mysql)
# pkg_add php4-mysql-4.3.8.tgz
# /usr/local/sbin/phpxs -a mysql
@@ -1242,10 +1254,10 @@ setenv OPTIM=-O2
back to the root of the Apache source directory and run the above
configure command again. That'll bring the link table up to date.
Run make and make install again.
7. Copy and rename the php.ini-dist file to your bin directory from
your PHP 4 source directory: cp php.ini-dist /usr/local/bin/php.ini
or (if your don't have a local directory) cp php.ini-dist
/usr/bin/php.ini.
7. Copy and rename the php.ini-development or php.ini-production file to
your bin directory from your PHP 4 source directory:
cp php.ini-development /usr/local/bin/php.ini or (if your don't have a
local directory) cp php.ini-development /usr/bin/php.ini.
__________________________________________________________________
Compiling for MacOS X Client
@@ -1735,8 +1747,8 @@ cgi error:
example, set it with something like:
--with-config-file-path=/etc
And then you would copy php.ini-dist from the distribution to
/etc/php.ini and edit it to make any local changes you want.
And then you would copy php.ini-development or php.ini-production from the
distribution to /etc/php.ini and edit it to make any local changes you want.
--with-config-file-scan-dir=PATH
On Windows the default path for the php.ini file is the Windows
+345 -218
View File
@@ -1,230 +1,357 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
18 Nov 2010, PHP 5.3.4RC1
09 Dec 2010, PHP 5.3.4
- Upgraded bundled Sqlite3 to version 3.7.3. (Ilia)
- Upgraded bundled PCRE to version 8.10. (Ilia)
- Reverted fix for bug #51176 (Static calling in non-static method behaves
like $this->). (Felipe)
- Security enhancements:
. Fixed crash in zip extract method (possible CWE-170).
(Maksymilian Arciemowicz, Pierre)
. Paths with NULL in them (foo\0bar.txt) are now considered as invalid. (Rasmus)
. Fixed a possible double free in imap extension (Identified by Mateusz
Kocielski). (CVE-2010-4150). (Ilia)
. Fixed NULL pointer dereference in ZipArchive::getArchiveComment.
(CVE-2010-3709). (Maksymilian Arciemowicz)
. Fixed possible flaw in open_basedir (CVE-2010-3436). (Pierre)
. Fixed MOPS-2010-24, fix string validation. (CVE-2010-2950). (Pierre)
. Fixed symbolic resolution support when the target is a DFS share. (Pierre)
. Fixed bug #52929 (Segfault in filter_var with FILTER_VALIDATE_EMAIL with
large amount of data) (CVE-2010-3710). (Adam)
- Added stat support for zip stream. (Pierre)
- Added follow_location (enabled by default) option for the http stream
support. (Pierre)
- Added new character sets to mysqlnd, which are available in MySQL 5.5
(Andrey)
- Improved support for is_link and related functions on Windows. (Pierre)
- General improvements:
. Added stat support for zip stream. (Pierre)
. Added follow_location (enabled by default) option for the http stream
support. (Pierre)
. Improved support for is_link and related functions on Windows. (Pierre)
. Added a 3rd parameter to get_html_translation_table. It now takes a charset
hint, like htmlentities et al. (Gustavo)
- Implemented feature requests:
. Implemented FR #52348, added new constant ZEND_MULTIBYTE to detect
zend multibyte at runtime. (Kalle)
. Implemented FR #52173, added functions pcntl_get_last_error() and
pcntl_strerror(). (nick dot telford at gmail dot com, Arnaud)
. Implemented symbolic links support for open_basedir checks. (Pierre)
. Implemented FR #51804, SplFileInfo::getLinkTarget on Windows. (Pierre)
. Implemented FR #50692, not uploaded files don't count towards
max_file_uploads limit. As a side improvement, temporary files are not opened
for empty uploads and, in debug mode, 0-length uploads. (Gustavo)
- Improved MySQLnd:
. Added new character sets to mysqlnd, which are available in MySQL 5.5
(Andrey)
- Added '-p/--prefix' to php-fpm to use a custom prefix and run multiple
instances. (fat)
- Added support for the ( and ) delimiters/separators to
DateTime::createFromFormat(). (Derick)
- Added custom process title for FPM. (fat)
- Added '-t/--test' to php-fpm to check and validate FPM conf file. (fat)
- Added statistics about listening socket queue length for FPM.
(andrei dot nigmatulin at gmail dot com, fat)
- Implemented FR #52348, Ability to detect zend multibyte at runtime. (Kalle)
- Implemented FR #52173, added functions pcntl_get_last_error() and
pcntl_strerror(). (nick dot telford at gmail dot com, Arnaud)
- Implemented symbolic links support for open_basedir checks. (Pierre)
- Implemented FR #51804, SplFileInfo::getLinkTarget on Windows. (Pierre)
- Implemented FR #50692, not uploaded files don't count towards
max_file_uploads limit. As a side improvement, temporary files are not opened
for empty uploads and, in debug mode, 0-length uploads. (Gustavo)
- Added a 3rd parameter to get_html_translation_table. It now takes a charset
hint, like htmlentities et al. (Gustavo)
- Improved PHP-FPM SAPI:
. Added '-p/--prefix' to php-fpm to use a custom prefix and run multiple
instances. (fat)
. Added custom process title for FPM. (fat)
. Added '-t/--test' to php-fpm to check and validate FPM conf file. (fat)
. Added statistics about listening socket queue length for FPM.
(andrei dot nigmatulin at gmail dot com, fat)
- Core:
. Fixed extract() to do not overwrite $GLOBALS and $this when using
EXTR_OVERWRITE. (jorto at redhat dot com)
. Fixed bug in the Windows implementation of dns_get_record, where the two
last parameters wouldn't be filled unless the type were DNS_ANY (Gustavo).
. Changed the $context parameter on copy() to actually have an effect. (Kalle)
. Fixed htmlentities/htmlspecialchars accepting certain ill-formed UTF-8
sequences. (Gustavo)
. Fixed bug #53409 (sleep() returns NULL on Windows). (Pierre)
. Fixed bug #53319 (strip_tags() may strip '<br />' incorrectly). (Felipe)
. Fixed bug #53304 (quot_print_decode does not handle lower-case hex digits).
(Ilia, daniel dot mueller at inexio dot net)
. Fixed bug #53248 (rawurlencode RFC 3986 EBCDIC support misses tilde char).
(Justin Martin)
. Fixed bug #53226 (file_exists fails on big filenames). (Adam)
. Fixed bug #53198 (changing INI setting "from" with ini_set did not have any
effect). (Gustavo)
. Fixed bug #53180 (post_max_size=0 not disabling the limit when the content
type is application/x-www-form-urlencoded or is not registered with PHP).
(gm at tlink dot de, Gustavo)
. Fixed bug #53141 (autoload misbehaves if called from closing session).
(ladislav at marek dot su)
. Fixed bug #53021 (In html_entity_decode, failure to convert numeric entities
with ENT_NOQUOTES and ISO-8859-1). Fixed and extended the fix of ENT_NOQUOTES
in html_entity_decode that had introduced the bug (rev #185591) to other
encodings. Additionaly, html_entity_decode() now doesn't decode &#34; if
ENT_NOQUOTES is given. (Gustavo)
. Fixed bug #52931 (strripos not overloaded with function overloading enabled).
(Felipe)
. Fixed bug #52772 (var_dump() doesn't check for the existence of
get_class_name before calling it). (Kalle, Gustavo)
. Fixed bug #52534 (var_export array with negative key). (Felipe)
. Fixed bug #52327 (base64_decode() improper handling of leading padding in
strict mode). (Ilia)
. Fixed bug #52260 (dns_get_record fails with non-existing domain on Windows).
(a_jelly_doughnut at phpbb dot com, Pierre)
. Fixed bug #50953 (socket will not connect to IPv4 address when the host has
both IPv4 and IPv6 addresses, on Windows). (Gustavo, Pierre)
. Fixed bug #50524 (proc_open on Windows does not respect cwd as it does on
other platforms). (Pierre)
. Fixed bug #49687 (utf8_decode vulnerabilities and deficiencies in the number
of reported malformed sequences). (CVE-2010-3870) (Gustavo)
. Fixed bug #49407 (get_html_translation_table doesn't handle UTF-8). (Gustavo)
. Fixed bug #48831 (php -i has different output to php --ini). (Richard,
Pierre)
. Fixed bug #47643 (array_diff() takes over 3000 times longer than php 5.2.4).
(Felipe)
. Fixed bug #47168 (printf of floating point variable prints maximum of 40
decimal places). (Ilia)
. Fixed bug #46587 (mt_rand() does not check that max is greater than min).
(Ilia)
. Fixed bug #29085 (bad default include_path on Windows). (Pierre)
. Fixed bug #25927 (get_html_translation_table calls the ' &#39; instead of
&#039;). (Gustavo)
- Zend engine:
. Reverted fix for bug #51176 (Static calling in non-static method behaves
like $this->). (Felipe)
. Changed deprecated ini options on startup from E_WARNING to E_DEPRECATED.
(Kalle)
. Fixed NULL dereference in lex_scan on zend multibyte builds where the script
had a flex incompatible encoding and there was no converter. (Gustavo)
. Fixed covariance of return-by-ref constraints. (Etienne)
. Fixed bug #53305 (E_NOTICE when defining a constant starts with
__COMPILER_HALT_OFFSET__). (Felipe)
. Fixed bug #52939 (zend_call_function does not respect ZEND_SEND_PREFER_REF).
(Dmitry)
. Fixed bug #52879 (Objects unreferenced in __get, __set, __isset or __unset
can be freed too early). (mail_ben_schmidt at yahoo dot com dot au, Dmitry)
. Fixed bug #52786 (PHP should reset section to [PHP] after ini sections).
(Fedora at famillecollet dot com)
. Fixed bug #52508 (newline problem with parse_ini_file+INI_SCANNER_RAW).
(Felipe)
. Fixed bug #52484 (__set() ignores setting properties with empty names).
(Felipe)
. Fixed bug #52361 (Throwing an exception in a destructor causes invalid
catching). (Dmitry)
. Fixed bug #51008 (Zend/tests/bug45877.phpt fails). (Dmitry)
- Build issues:
. Fixed bug #52436 (Compile error if systems do not have stdint.h)
(Sriram Natarajan)
. Fixed bug #50345 (nanosleep not detected properly on some solaris versions).
(Ulf, Tony)
. Fixed bug #49215 (make fails on glob_wrapper). (Felipe)
- Path with NULL in them (foo\obar.txt) are now considered as invalid. (Rasmus)
- Fixed a possible double free in imap extension (Identified by Mateusz
Kocielski). (CVE-2010-4150). (Ilia)
- Fixed NULL pointer dereference in ZipArchive::getArchiveComment.
(CVE-2010-3709). (Maksymilian Arciemowicz)
- Fixed possible flaw in open_basedir (CVE-2010-3436). (Pierre)
- Fixed MOPS-2010-24, fix string validation. (CVE-2010-2950). (Pierre)
- Fixed symbolic resolution support when the target is a DFS share. (Pierre)
- Changed deprecated ini options on startup from E_WARNING to E_DEPRECATED.
(Kalle)
- Changed the $context parameter on copy() to actually have an effect. (Kalle)
- Fixed possible crash in mssql_fetch_batch(). (Kalle)
- Fixed inconsistent backlog default value (-1) in FPM on many systems. (fat)
- Fixed bug in the Windows implementation of dns_get_record, where the two
last parameters wouldn't be filled unless the type were DNS_ANY (Gustavo).
- Fixed forward stream seeking emulation in streams that don't support seeking
in situations where the read operation gives back less data than requested
and when there was data in the buffer before the emulation started. Also made
more consistent its behavior -- should return failure every time less data
than was requested was skipped. (Gustavo)
- Fixed htmlentities/htmlspecialchars accepting certain ill-formed UTF-8
sequences. (Gustavo)
- Fixed bug #52929 (Segfault in filter_var with FILTER_VALIDATE_EMAIL with
large amount of data) (CVE-2010-3710). (Adam)
- Fixed ReflectionProperty::isDefault() giving a wrong result for properties
obtained with ReflectionClass::getProperties(). (Gustavo)
- Fixed covariance of return-by-ref constraints. (Etienne)
- Fixed the filter extension accepting IPv4 octets with a leading 0 as that
belongs to the unsupported "dotted octal" representation. (Gustavo)
- Fixed NULL dereference in lex_scan on zend multibyte builds where the script
had a flex incompatible encoding and there was no converter. (Gustavo)
- Calendar extension:
. Fixed bug #52744 (cal_days_in_month incorrect for December 1 BCE).
(gpap at internet dot gr, Adam)
- cURL extension:
. Fixed bug #52828 (curl_setopt does not accept persistent streams).
(Gustavo, Ilia)
. Fixed bug #52827 (cURL leaks handle and causes assertion error
(CURLOPT_STDERR)). (Gustavo)
. Fixed bug #52202 (CURLOPT_PRIVATE gets corrupted). (Ilia)
. Fixed bug #50410 (curl extension slows down PHP on Windows). (Pierre)
- DateTime extension:
. Fixed bug #53297 (gettimeofday implementation in php/win32/time.c can return
1 million microsecs). (ped at 7gods dot org)
. Fixed bug #52668 (Iterating over a dateperiod twice is broken). (Derick)
. Fixed bug #52454 (Relative dates and getTimestamp increments by one day).
(Derick)
. Fixed bug #52430 (date_parse parse 24:xx:xx as valid time). (Derick)
. Added support for the ( and ) delimiters/separators to
DateTime::createFromFormat(). (Derick)
- Fixed bug #53335 (pdo_firebird did not implement rowCount()).
(preeves at ibphoenix dot com)
- Fixed bug #53323 (pdo_firebird getAttribute() crash).
(preeves at ibphoenix dot com)
- Fixed Bug #53319 (strip_tags() may strip '<br />' incorrectly). (Felipe)
- Fixed bug #53305 (E_NOTICE when defining a constant starts with
__COMPILER_HALT_OFFSET__). (Felipe)
- Fixed bug #53297 (gettimeofday implementation in php/win32/time.c can return
1 million microsecs). (ped at 7gods dot org)
- Fixed bug #53284 (Valgrind warnings in oci_set_* functions) (Oracle Corp.)
- Fixed bug #53279 (SplFileObject doesn't initialise default CSV escape
character). (Adam)
- Fixed bug #53273 (mb_strcut() returns garbage with the excessive length
parameter). (CVE-2010-4156) (Mateusz Kocielski, Pierre, Moriyoshi)
- Fixed bug #53248 (rawurlencode RFC 3986 EBCDIC support misses tilde char).
(Justin Martin)
- Fixed bug #53241 (stream casting that relies on fdopen/fopencookie fails
with streams opened with, inter alia, the 'xb' mode). (Gustavo)
- Fixed bug #53236 (problems in the validation of IPv6 addresses with leading
and trailing :: in the filter extension). (Gustavo)
- Fixed bug #53226 (file_exists fails on big filenames). (Adam)
- Fixed bug #53198 (changing INI setting "from" with ini_set did not have any
effect). (Gustavo)
- Fixed bug #53180 (post_max_size=0 not disabling the limit when the content
type is application/x-www-form-urlencoded or is not registered with PHP).
(gm at tlink dot de, Gustavo)
- Fixed bug #53144 (Segfault in SplObjectStorage::removeAll()). (Felipe)
- Fixed bug #53141 (autoload misbehaves if called from closing session).
(ladislav at marek dot su)
- Fixed bug #53136 (Invalid read on openssl_csr_new()). (Felipe)
- Fixed bug #53071 (SPLObjectStorage defeats gc_collect_cycles). (Gustavo)
- Fixed bug #53006 (stream_get_contents has an unpredictable behavior when the
underlying stream does not support seeking). (Gustavo)
- Fixed bug #53021 (In html_entity_decode, failure to convert numeric entities
with ENT_NOQUOTES and ISO-8859-1). Fixed and extended the fix of ENT_NOQUOTES
in html_entity_decode that had introduced the bug (rev #185591) to other
encodings. Additionaly, html_entity_decode() now doesn't decode &#34; if
ENT_NOQUOTES is given. (Gustavo)
- Fixed bug #52939 (zend_call_function does not respect ZEND_SEND_PREFER_REF).
(Dmitry)
- Fixed bug #52981 (Unicode casing table was out-of-date. Updated with
UnicodeData-6.0.0d7.txt and included the source of the generator program with
the distribution) (Gustavo).
- Fixed bug #52971 (PCRE-Meta-Characters not working with utf-8). (Felipe)
- Fixed bug #52947 (segfault when ssl stream option capture_peer_cert_chain
used). (Felipe)
- Fixed bug #52944 (Invalid write on second and subsequent reads with an
inflate filter fed invalid data). (Gustavo)
- Fixed bug #52941 (The 'iconv_mime_decode_headers' function is skipping
headers). (Adam)
- Fixed bug #52931 (strripos not overloaded with function overloading enabled).
(Felipe)
- Fixed bug #52926 (zlib fopen wrapper does not use context). (Gustavo)
- Fixed bug #52906 (gmp_mod returns negative result when non-negative is
expected). (Stas)
- Fixed bug #52891 (Wrong data inserted with mysqli/mysqlnd when using
mysqli_stmt_bind_param and value> PHP_INT_MAX). (Andrey)
- Fixed bug #52879 (Objects unreferenced in __get, __set, __isset or __unset
can be freed too early). (mail_ben_schmidt at yahoo dot com dot au, Dmitry)
- Fixed bug #52849 (GNU MP invalid version match). (Adam)
- Fixed bug #52843 (Segfault when optional parameters are not passed in to
mssql_connect). (Felipe)
- Fixed bug #52827 (cURL leaks handle and causes assertion error
(CURLOPT_STDERR)). (Gustavo)
- Fixed bug #52820 (writes to fopencookie FILE* not commited when seeking the
stream). (Gustavo)
- Fixed bug #52786 (PHP should reset section to [PHP] after ini sections).
(Fedora at famillecollet dot com)
- Fixed bug #52784 (Race condition when handling many concurrent signals).
(nick dot telford at gmail dot com, Arnaud)
- Fixed bug #52772 (var_dump() doesn't check for the existence of
get_class_name before calling it). (Kalle, Gustavo)
- Fixed bug #52744 (cal_days_in_month incorrect for December 1 BCE).
(gpap at internet dot gr, Adam)
- Fixed bug #52732 (Docs say preg_match() returns FALSE on error, but it
returns int(0)). (slugonamission at gmail dot com)
- Fixed bug #52725 (gcc builtin atomic functions were sometimes used when they
were not available). (fat)
- Fixed bug #52745 (Binding params doesn't work when selecting a date inside a
CASE-WHEN). (Andrey)
- Fixed bug #52699 (PDO bindValue writes long int 32bit enum).
(rein at basefarm dot no)
- Fixed bug #52693 (configuration file errors are not logged to stderr). (fat)
- Fixed bug #52686 (mysql_stmt_attr_[gs]et argument points to incorrect type).
(rein at basefarm dot no)
- Fixed bug #52681 (mb_send_mail() appends an extra MIME-Version header).
(Adam)
- Fixed bug #52674 (FPM Status page returns inconsistent Content-Type headers).
(fat)
- Fixed bug #52668 (Iterating over a dateperiod twice is broken). (Derick)
- Fixed bug #52654 (mysqli doesn't install headers with structures it uses).
(Andrey)
- Fixed bug #52636 (php_mysql_fetch_hash writes long value into int).
(Kalle, rein at basefarm dot no)
- Fixed bug #52613 (crash in mysqlnd after hitting memory limit). (Andrey)
- Fixed bug #52599 (iconv output handler outputs incorrect content type
when flags are used). (Ilia)
- Fixed bug #52573 (SplFileObject::fscanf Segmentation fault). (Felipe)
- Fixed bug #52546 (pdo_dblib segmentation fault when iterating MONEY values).
(Felipe)
- Fixed bug #52534 (var_export array with negative key). (Felipe)
- Fixed bug #52512 (Broken error handling in odbc_execute).
(mkoegler at auto dot tuwien dot ac dot at)
- Fixed bug #52508 (newline problem with parse_ini_file+INI_SCANNER_RAW).
(Felipe)
- Fixed bug #52498 (libevent was not only linked to php-fpm). (fat)
- Fixed bug #52487 (PDO::FETCH_INTO leaks memory). (Felipe)
- Fixed bug #52484 (__set() ignores setting properties with empty names).
(Felipe)
- Fixed bug #52468 (wddx_deserialize corrupts integer field value when left
empty). (Felipe)
- Fixed bug #52454 (Relative dates and getTimestamp increments by one day).
(Derick)
- Fixed bug #52436 (Compile error if systems do not have stdint.h)
(Sriram Natarajan)
- Fixed bug #52433 (Call to undefined method mysqli::poll() - must be static).
(Andrey)
- Fixed bug #52430 (date_parse parse 24:xx:xx as valid time). (Derick)
- Fixed bug #52417 (MySQLi build failure with mysqlnd on MacOS X). (Andrey)
- Fixed bug #52413 (MySQLi/libmysql build failure on OS X, FreeBSD). (Andrey)
- Fixed bug #52390 (mysqli_report() should be per-request setting). (Kalle)
- Fixed bug #52361 (Throwing an exception in a destructor causes invalid
catching). (Dmitry)
- Fixed bug #52302 (mysqli_fetch_all does not work with MYSQLI_USE_RESULT).
(Andrey)
- Fixed bug #52221 (Misbehaviour of magic_quotes_runtime (get/set)). (Andrey)
- Fixed bug #51763 (SplFileInfo::getType() does not work symbolic link
and directory). (Pierre)
- Fixed bug #51610 (Using oci_connect causes PHP to take a long time to
exit). Requires Oracle bug fix 9891199 for this patch to have an
effect. (Oracle Corp.)
- Fixed bug #51008 (Zend/tests/bug45877.phpt fails). (Dmitry)
- Fixed bug #50590 (IntlDateFormatter::parse result is limited to the integer
range). (Stas)
- Fixed bug #50481 (Storing many SPLFixedArray in an array crashes). (Felipe)
- Fixed bug #52260 (dns_get_record fails with non-existing domain on Windows).
(a_jelly_doughnut at phpbb dot com, Pierre)
- Fixed bug #50953 (socket will not connect to IPv4 address when the host has
both IPv4 and IPv6 addresses, on Windows). (Gustavo, Pierre)
- Fixed bug #50579 (RegexIterator::REPLACE doesn't work). (Felipe)
- Fixed bug #50524 (proc_open on Windows does not respect cwd as it does on
other platforms). (Pierre)
- Fixed bug #50345 (nanosleep not detected properly on some solaris versions).
(Ulf, Tony)
- Fixed bug #50117 (problems in the validation of IPv6 addresses with IPv4
addresses and ::). (Gustavo)
- Fixed bug #49687 (utf8_decode vulnerabilities and deficiencies in the number
of reported malformed sequences). (CVE-2010-3870) (Gustavo)
- Fixed bug #49407 (get_html_translation_table doesn't handle UTF-8). (Gustavo)
- Fixed bug #49215 (make fails on glob_wrapper). (Felipe)
- Fixed bug #48831 (php -i has different output to php --ini). (Richard,
Pierre)
- Fixed bug #47643 (array_diff() takes over 3000 times longer than php 5.2.4).
(Felipe)
- Fixed bug #47199 (pg_delete() fails on NULL). (ewgraf at gmail dot com)
- Fixed bug #45921 (Can't initialize character set hebrew). (Andrey)
- Fixed bug #44248 (RFC2616 transgression while HTTPS request through proxy
with SoapClient object). (Dmitry)
- Fixed bug #25927 (get_html_translation_table calls the ' &#39; instead of
&#039;). (Gustavo)
- DBA extension:
. Added Berkeley DB 5.1 support to the DBA extension. (Oracle Corp.)
- DOM extension:
. Fixed bug #52656 (DOMCdataSection does not work with splitText). (Ilia)
- Filter extension:
. Fixed the filter extension accepting IPv4 octets with a leading 0 as that
belongs to the unsupported "dotted octal" representation. (Gustavo)
. Fixed bug #53236 (problems in the validation of IPv6 addresses with leading
and trailing :: in the filter extension). (Gustavo)
. Fixed bug #50117 (problems in the validation of IPv6 addresses with IPv4
addresses and ::). (Gustavo)
- GD extension:
. Fixed bug #53492 (fix crash if anti-aliasing steps are invalid). (Pierre)
- GMP extension:
. Fixed bug #52906 (gmp_mod returns negative result when non-negative is
expected). (Stas)
. Fixed bug #52849 (GNU MP invalid version match). (Adam)
- Hash extension:
. Fixed bug #51003 (unaligned memory access in ext/hash/hash_tiger.c).
(Mike, Ilia)
- Iconv extension:
. Fixed bug #52941 (The 'iconv_mime_decode_headers' function is skipping
headers). (Adam)
. Fixed bug #52599 (iconv output handler outputs incorrect content type
when flags are used). (Ilia)
. Fixed bug #51250 (iconv_mime_decode() does not ignore malformed Q-encoded
words). (Ilia)
- Intl extension:
. Fixed crashes on invalid parameters in intl extension. (CVE-2010-4409). (Stas, Maksymilian
Arciemowicz)
. Added support for formatting the timestamp stored in a DateTime object.
(Stas)
. Fixed bug #50590 (IntlDateFormatter::parse result is limited to the integer
range). (Stas)
- Mbstring extension:
. Fixed bug #53273 (mb_strcut() returns garbage with the excessive length
parameter). (CVE-2010-4156) (Mateusz Kocielski, Pierre, Moriyoshi)
. Fixed bug #52981 (Unicode casing table was out-of-date. Updated with
UnicodeData-6.0.0d7.txt and included the source of the generator program with
the distribution) (Gustavo).
. Fixed bug #52681 (mb_send_mail() appends an extra MIME-Version header).
(Adam)
- MSSQL extension:
. Fixed possible crash in mssql_fetch_batch(). (Kalle)
. Fixed bug #52843 (Segfault when optional parameters are not passed in to
mssql_connect). (Felipe)
- MySQL extension:
. Fixed bug #52636 (php_mysql_fetch_hash writes long value into int).
(Kalle, rein at basefarm dot no)
- MySQLi extension:
. Fixed bug #52891 (Wrong data inserted with mysqli/mysqlnd when using
mysqli_stmt_bind_param and value> PHP_INT_MAX). (Andrey)
. Fixed bug #52686 (mysql_stmt_attr_[gs]et argument points to incorrect type).
(rein at basefarm dot no)
. Fixed bug #52654 (mysqli doesn't install headers with structures it uses).
(Andrey)
. Fixed bug #52433 (Call to undefined method mysqli::poll() - must be static).
(Andrey)
. Fixed bug #52417 (MySQLi build failure with mysqlnd on MacOS X). (Andrey)
. Fixed bug #52413 (MySQLi/libmysql build failure on OS X, FreeBSD). (Andrey)
. Fixed bug #52390 (mysqli_report() should be per-request setting). (Kalle)
. Fixed bug #52302 (mysqli_fetch_all does not work with MYSQLI_USE_RESULT).
(Andrey)
. Fixed bug #52221 (Misbehaviour of magic_quotes_runtime (get/set)). (Andrey)
. Fixed bug #45921 (Can't initialize character set hebrew). (Andrey)
- MySQLnd:
. Fixed bug #52613 (crash in mysqlnd after hitting memory limit). (Andrey)
- ODBC extension:
- Fixed bug #52512 (Broken error handling in odbc_execute).
(mkoegler at auto dot tuwien dot ac dot at)
- Openssl extension:
. Fixed possible blocking behavior in openssl_random_pseudo_bytes on Windows.
(Pierre)
. Fixed bug #53136 (Invalid read on openssl_csr_new()). (Felipe)
. Fixed bug #52947 (segfault when ssl stream option capture_peer_cert_chain
used). (Felipe)
- Oracle Database extension (OCI8):
. Fixed bug #53284 (Valgrind warnings in oci_set_* functions) (Oracle Corp.)
. Fixed bug #51610 (Using oci_connect causes PHP to take a long time to
exit). Requires Oracle 11.2.0.2 client libraries (or Oracle bug fix
9891199) for this patch to have an effect. (Oracle Corp.)
- PCNTL extension:
. Fixed bug #52784 (Race condition when handling many concurrent signals).
(nick dot telford at gmail dot com, Arnaud)
- PCRE extension:
. Fixed bug #52971 (PCRE-Meta-Characters not working with utf-8). (Felipe)
. Fixed bug #52732 (Docs say preg_match() returns FALSE on error, but it
returns int(0)). (slugonamission at gmail dot com)
- PHAR extension:
. Fixed bug #50987 (unaligned memory access in phar.c).
(geissert at debian dot org, Ilia)
- PHP-FPM SAPI:
. Fixed bug #53412 (segfault when using -y). (fat)
. Fixed inconsistent backlog default value (-1) in FPM on many systems. (fat)
. Fixed bug #52501 (libevent made FPM crashed when forking -- libevent has
been removed). (fat)
. Fixed bug #52725 (gcc builtin atomic functions were sometimes used when they
were not available). (fat)
. Fixed bug #52693 (configuration file errors are not logged to stderr). (fat)
. Fixed bug #52674 (FPM Status page returns inconsistent Content-Type headers).
(fat)
. Fixed bug #52498 (libevent was not only linked to php-fpm). (fat)
- PDO:
. Fixed bug #52699 (PDO bindValue writes long int 32bit enum).
(rein at basefarm dot no)
. Fixed bug #52487 (PDO::FETCH_INTO leaks memory). (Felipe)
- PDO DBLib driver:
. Fixed bug #52546 (pdo_dblib segmentation fault when iterating MONEY values).
(Felipe)
- PDO Firebird driver:
. Restored firebird support (VC9 builds only). (Pierre)
. Fixed bug #53335 (pdo_firebird did not implement rowCount()).
(preeves at ibphoenix dot com)
. Fixed bug #53323 (pdo_firebird getAttribute() crash).
(preeves at ibphoenix dot com)
- PDO MySQL driver:
. Fixed bug #52745 (Binding params doesn't work when selecting a date inside a
CASE-WHEN). (Andrey)
- PostgreSQL extension:
. Fixed bug #47199 (pg_delete() fails on NULL). (ewgraf at gmail dot com)
- Reflection extension:
. Fixed ReflectionProperty::isDefault() giving a wrong result for properties
obtained with ReflectionClass::getProperties(). (Gustavo)
- Reflection extension:
. Fixed bug #53366 (Reflection doesnt get dynamic property value from
getProperty()). (Felipe)
. Fixed bug #52854 (ReflectionClass::newInstanceArgs does not work for classes
without constructors). (Johannes)
- SOAP extension:
. Fixed bug #44248 (RFC2616 transgression while HTTPS request through proxy
with SoapClient object). (Dmitry)
- SPL extension:
. Fixed bug #53362 (Segmentation fault when extending SplFixedArray). (Felipe)
. Fixed bug #53279 (SplFileObject doesn't initialise default CSV escape
character). (Adam)
. Fixed bug #53144 (Segfault in SplObjectStorage::removeAll()). (Felipe)
. Fixed bug #53071 (SPLObjectStorage defeats gc_collect_cycles). (Gustavo)
. Fixed bug #52573 (SplFileObject::fscanf Segmentation fault). (Felipe)
. Fixed bug #51763 (SplFileInfo::getType() does not work symbolic link
and directory). (Pierre)
. Fixed bug #50481 (Storing many SPLFixedArray in an array crashes). (Felipe)
. Fixed bug #50579 (RegexIterator::REPLACE doesn't work). (Felipe)
- SQLite3 extension:
. Fixed bug #53463 (sqlite3 columnName() segfaults on bad column_number).
(Felipe)
- Streams:
. Fixed forward stream seeking emulation in streams that don't support seeking
in situations where the read operation gives back less data than requested
and when there was data in the buffer before the emulation started. Also made
more consistent its behavior -- should return failure every time less data
than was requested was skipped. (Gustavo)
. Fixed bug #53241 (stream casting that relies on fdopen/fopencookie fails
with streams opened with, inter alia, the 'xb' mode). (Gustavo)
. Fixed bug #53006 (stream_get_contents has an unpredictable behavior when the
underlying stream does not support seeking). (Gustavo)
. Fixed bug #52944 (Invalid write on second and subsequent reads with an
inflate filter fed invalid data). (Gustavo)
. Fixed bug #52820 (writes to fopencookie FILE* not commited when seeking the
stream). (Gustavo)
- WDDX extension:
. Fixed bug #52468 (wddx_deserialize corrupts integer field value when left
empty). (Felipe)
- Zlib extension:
. Fixed bug #52926 (zlib fopen wrapper does not use context). (Gustavo)
22 Jul 2010, PHP 5.3.3
- Upgraded bundled sqlite to version 3.6.23.1. (Ilia)
+2
View File
@@ -276,6 +276,8 @@ UPGRADE NOTES - PHP 5.3
- MySQLi: Now supports persistent connections by prepending the hostname
with "p:".
- imagepstext now rejects invalid antialiasing steps and raises a warning.
d. no longer possible to disable
- PCRE
+6
View File
@@ -1,5 +1,11 @@
--TEST--
Testing declare statement with several type values
--SKIPIF--
<?php
if (in_array("detect_unicode", array_keys(ini_get_all()))) {
die("skip");
}
?>
--FILE--
<?php
+11
View File
@@ -878,6 +878,17 @@ dnl and optionally also the source-files for the SAPI-specific
dnl objects.
dnl
AC_DEFUN([PHP_SELECT_SAPI],[
if test "$PHP_SAPI" != "default"; then
AC_MSG_ERROR([
+--------------------------------------------------------------------+
| *** ATTENTION *** |
| |
| You've configured multiple SAPIs to be build. You can build only |
| one SAPI module and CLI binary at the same time. |
+--------------------------------------------------------------------+
])
fi
PHP_SAPI=$1
case "$2" in
+1 -1
View File
@@ -42,7 +42,7 @@ AC_CONFIG_HEADER(main/php_config.h)
PHP_MAJOR_VERSION=5
PHP_MINOR_VERSION=3
PHP_RELEASE_VERSION=4
PHP_EXTRA_VERSION="RC1"
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`
+17 -16
View File
@@ -1252,7 +1252,6 @@ static size_t curl_passwd(void *ctx, char *prompt, char *buf, int buflen)
/* }}} */
#endif
#if LIBCURL_VERSION_NUM < 0x071101
/* {{{ curl_free_string
*/
static void curl_free_string(void **string)
@@ -1260,7 +1259,6 @@ static void curl_free_string(void **string)
efree(*string);
}
/* }}} */
#endif
/* {{{ curl_free_post
*/
@@ -1337,9 +1335,7 @@ static void alloc_curl_handle(php_curl **ch)
memset(&(*ch)->err, 0, sizeof((*ch)->err));
#if LIBCURL_VERSION_NUM < 0x071101
zend_llist_init(&(*ch)->to_free.str, sizeof(char *), (llist_dtor_func_t) curl_free_string, 0);
#endif
zend_llist_init(&(*ch)->to_free.slist, sizeof(struct curl_slist), (llist_dtor_func_t) curl_free_slist, 0);
zend_llist_init(&(*ch)->to_free.post, sizeof(struct HttpPost), (llist_dtor_func_t) curl_free_post, 0);
}
@@ -1556,11 +1552,10 @@ PHP_FUNCTION(curl_copy_handle)
curl_easy_setopt(dupch->cp, CURLOPT_INFILE, (void *) dupch);
curl_easy_setopt(dupch->cp, CURLOPT_WRITEHEADER, (void *) dupch);
#if LIBCURL_VERSION_NUM < 0x071101
zend_llist_copy(&dupch->to_free.str, &ch->to_free.str);
/* Don't try to free copied strings, they're free'd when the original handle is destroyed */
dupch->to_free.str.dtor = NULL;
#endif
zend_llist_copy(&dupch->to_free.slist, &ch->to_free.slist);
zend_llist_copy(&dupch->to_free.post, &ch->to_free.post);
@@ -1742,14 +1737,22 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu
return 1;
}
} else {
#if LIBCURL_VERSION_NUM >= 0x071100
/* Strings passed to libcurl as ’char *’ arguments, are copied by the library... NOTE: before 7.17.0 strings were not copied. */
error = curl_easy_setopt(ch->cp, option, Z_STRVAL_PP(zvalue));
#else
copystr = estrndup(Z_STRVAL_PP(zvalue), Z_STRLEN_PP(zvalue));
error = curl_easy_setopt(ch->cp, option, copystr);
zend_llist_add_element(&ch->to_free.str, &copystr);
if (option == CURLOPT_PRIVATE) {
char *copystr;
#if LIBCURL_VERSION_NUM < 0x071100
string_copy:
#endif
copystr = estrndup(Z_STRVAL_PP(zvalue), Z_STRLEN_PP(zvalue));
error = curl_easy_setopt(ch->cp, option, copystr);
zend_llist_add_element(&ch->to_free.str, &copystr);
} else {
#if LIBCURL_VERSION_NUM >= 0x071100
/* Strings passed to libcurl as ’char *’ arguments, are copied by the library... NOTE: before 7.17.0 strings were not copied. */
error = curl_easy_setopt(ch->cp, option, Z_STRVAL_PP(zvalue));
#else
goto string_copy;
#endif
}
}
break;
}
@@ -1761,7 +1764,7 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu
int type;
void * what;
what = zend_fetch_resource(zvalue TSRMLS_CC, -1, "File-Handle", &type, 1, php_file_le_stream());
what = zend_fetch_resource(zvalue TSRMLS_CC, -1, "File-Handle", &type, 1, php_file_le_stream(), php_file_le_pstream());
if (!what) {
RETVAL_FALSE;
return 1;
@@ -2456,9 +2459,7 @@ static void _php_curl_close_ex(php_curl *ch TSRMLS_DC)
}
curl_easy_cleanup(ch->cp);
#if LIBCURL_VERSION_NUM < 0x071101
zend_llist_clean(&ch->to_free.str);
#endif
/* cURL destructors should be invoked only by last curl handle */
if (Z_REFCOUNT_P(ch->clone) <= 1) {
-2
View File
@@ -124,9 +124,7 @@ struct _php_curl_send_headers {
};
struct _php_curl_free {
#if LIBCURL_VERSION_NUM < 0x071100
zend_llist str;
#endif
zend_llist post;
zend_llist slist;
};
+16
View File
@@ -0,0 +1,16 @@
--TEST--
Bug #52202 (CURLOPT_PRIVATE gets clobbered)
--SKIPIF--
<?php
if (!extension_loaded('curl')) exit("skip curl extension not loaded");
?>
--FILE--
<?php
$curl = curl_init("http://www.google.com");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_PRIVATE, "123");
curl_exec($curl);
var_dump(curl_getinfo($curl, CURLINFO_PRIVATE));
--EXPECT--
string(3) "123"
@@ -17,7 +17,7 @@ if (!extension_loaded('curl')) print 'skip';
//SET URL AND OTHER OPTIONS
curl_setopt($ch1, CURLOPT_URL, "http://php.net/robots.txt");
curl_setopt($ch2, CURLOPT_URL, "file://".dirname(__FILE__)."/curl_testdata2.txt");
curl_setopt($ch2, CURLOPT_URL, "file://".dirname(__FILE__). DIRECTORY_SEPARATOR . "curl_testdata2.txt");
curl_setopt($ch1, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch2, CURLOPT_RETURNTRANSFER, true);
@@ -16,8 +16,8 @@ if (!extension_loaded('curl')) print 'skip';
$ch2=curl_init();
//SET URL AND OTHER OPTIONS
curl_setopt($ch1, CURLOPT_URL, "file://".dirname(__FILE__)."/curl_testdata1.txt");
curl_setopt($ch2, CURLOPT_URL, "file://".dirname(__FILE__)."/curl_testdata2.txt");
curl_setopt($ch1, CURLOPT_URL, "file://".dirname(__FILE__). DIRECTORY_SEPARATOR . "curl_testdata1.txt");
curl_setopt($ch2, CURLOPT_URL, "file://".dirname(__FILE__). DIRECTORY_SEPARATOR . "curl_testdata2.txt");
curl_setopt($ch1, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch2, CURLOPT_RETURNTRANSFER, true);
@@ -16,8 +16,8 @@ if (!extension_loaded('curl')) print 'skip';
$ch2=curl_init();
//SET URL AND OTHER OPTIONS
curl_setopt($ch1, CURLOPT_URL, "file://".dirname(__FILE__)."/curl_testdata1.txt");
curl_setopt($ch2, CURLOPT_URL, "file://".dirname(__FILE__)."/curl_testdata2.txt");
curl_setopt($ch1, CURLOPT_URL, "file://".dirname(__FILE__). DIRECTORY_SEPARATOR . "curl_testdata1.txt");
curl_setopt($ch2, CURLOPT_URL, "file://".dirname(__FILE__). DIRECTORY_SEPARATOR . "curl_testdata2.txt");
curl_setopt($ch1, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch2, CURLOPT_RETURNTRANSFER, true);
@@ -16,8 +16,8 @@ if (!extension_loaded('curl')) print 'skip';
$ch2=curl_init();
//SET URL AND OTHER OPTIONS
curl_setopt($ch1, CURLOPT_URL, "file://".dirname(__FILE__)."/curl_testdata1.txt");
curl_setopt($ch2, CURLOPT_URL, "file://".dirname(__FILE__)."/curl_testdata2.txt");
curl_setopt($ch1, CURLOPT_URL, "file://".dirname(__FILE__). DIRECTORY_SEPARATOR . "curl_testdata1.txt");
curl_setopt($ch2, CURLOPT_URL, "file://".dirname(__FILE__). DIRECTORY_SEPARATOR . "curl_testdata2.txt");
curl_setopt($ch1, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch2, CURLOPT_RETURNTRANSFER, true);
@@ -16,8 +16,8 @@ if (!extension_loaded('curl')) print 'skip';
$ch2=curl_init();
//SET URL AND OTHER OPTIONS
curl_setopt($ch1, CURLOPT_URL, "file://".dirname(__FILE__)."/curl_testdata1.txt");
curl_setopt($ch2, CURLOPT_URL, "file://".dirname(__FILE__)."/curl_testdata2.txt");
curl_setopt($ch1, CURLOPT_URL, "file://".dirname(__FILE__). DIRECTORY_SEPARATOR . "curl_testdata1.txt");
curl_setopt($ch2, CURLOPT_URL, "file://".dirname(__FILE__). DIRECTORY_SEPARATOR . "curl_testdata2.txt");
curl_setopt($ch1, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch2, CURLOPT_RETURNTRANSFER, true);
+18 -585
View File
@@ -4,649 +4,82 @@ timezone_abbreviations_list() tests
<?php
date_default_timezone_set('UTC');
$timezone_abbreviations = timezone_abbreviations_list();
var_dump($timezone_abbreviations["est"]);
var_dump($timezone_abbreviations["utc"]);
echo "Done\n";
?>
--EXPECTF--
array(71) {
array(8) {
[0]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
int(0)
["timezone_id"]=>
string(16) "America/New_York"
string(13) "Etc/Universal"
}
[1]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
int(0)
["timezone_id"]=>
string(15) "America/Antigua"
string(7) "Etc/UTC"
}
[2]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
int(0)
["timezone_id"]=>
string(16) "America/Atikokan"
string(8) "Etc/Zulu"
}
[3]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
int(0)
["timezone_id"]=>
string(21) "America/Cambridge_Bay"
string(3) "GMT"
}
[4]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
int(0)
["timezone_id"]=>
string(14) "America/Cancun"
string(9) "Universal"
}
[5]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
int(0)
["timezone_id"]=>
string(14) "America/Cayman"
string(3) "UTC"
}
[6]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
int(0)
["timezone_id"]=>
string(15) "America/Chicago"
string(4) "Zulu"
}
[7]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
int(0)
["timezone_id"]=>
string(21) "America/Coral_Harbour"
}
[8]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(15) "America/Detroit"
}
[9]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(18) "America/Fort_Wayne"
}
[10]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(18) "America/Grand_Turk"
}
[11]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(28) "America/Indiana/Indianapolis"
}
[12]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(20) "America/Indiana/Knox"
}
[13]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(23) "America/Indiana/Marengo"
}
[14]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(26) "America/Indiana/Petersburg"
}
[15]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(21) "America/Indiana/Vevay"
}
[16]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(25) "America/Indiana/Vincennes"
}
[17]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(23) "America/Indiana/Winamac"
}
[18]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(20) "America/Indianapolis"
}
[19]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(15) "America/Iqaluit"
}
[20]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(15) "America/Jamaica"
}
[21]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(27) "America/Kentucky/Louisville"
}
[22]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(27) "America/Kentucky/Monticello"
}
[23]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(15) "America/Knox_IN"
}
[24]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(18) "America/Louisville"
}
[25]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(15) "America/Managua"
}
[26]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(17) "America/Menominee"
}
[27]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(14) "America/Merida"
}
[28]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(16) "America/Montreal"
}
[29]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(14) "America/Nassau"
}
[30]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(15) "America/Nipigon"
}
[31]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(14) "America/Panama"
}
[32]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(19) "America/Pangnirtung"
}
[33]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(22) "America/Port-au-Prince"
}
[34]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(20) "America/Rankin_Inlet"
}
[35]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(21) "America/Santo_Domingo"
}
[36]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(19) "America/Thunder_Bay"
}
[37]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(15) "America/Toronto"
}
[38]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(14) "Canada/Eastern"
}
[39]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(3) "EST"
}
[40]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(7) "EST5EDT"
}
[41]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(7) "Jamaica"
}
[42]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(10) "US/Central"
}
[43]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(15) "US/East-Indiana"
}
[44]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(10) "US/Eastern"
}
[45]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(17) "US/Indiana-Starke"
}
[46]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(-18000)
["timezone_id"]=>
string(11) "US/Michigan"
}
[47]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(36000)
["timezone_id"]=>
string(13) "Australia/ACT"
}
[48]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(36000)
["timezone_id"]=>
string(18) "Australia/Brisbane"
}
[49]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(36000)
["timezone_id"]=>
string(18) "Australia/Canberra"
}
[50]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(36000)
["timezone_id"]=>
string(16) "Australia/Currie"
}
[51]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(36000)
["timezone_id"]=>
string(16) "Australia/Hobart"
}
[52]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(36000)
["timezone_id"]=>
string(18) "Australia/Lindeman"
}
[53]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(36000)
["timezone_id"]=>
string(19) "Australia/Melbourne"
}
[54]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(36000)
["timezone_id"]=>
string(13) "Australia/NSW"
}
[55]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(36000)
["timezone_id"]=>
string(20) "Australia/Queensland"
}
[56]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(36000)
["timezone_id"]=>
string(16) "Australia/Sydney"
}
[57]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(36000)
["timezone_id"]=>
string(18) "Australia/Tasmania"
}
[58]=>
array(3) {
["dst"]=>
bool(false)
["offset"]=>
int(36000)
["timezone_id"]=>
string(18) "Australia/Victoria"
}
[59]=>
array(3) {
["dst"]=>
bool(true)
["offset"]=>
int(39600)
["timezone_id"]=>
string(19) "Australia/Melbourne"
}
[60]=>
array(3) {
["dst"]=>
bool(true)
["offset"]=>
int(39600)
["timezone_id"]=>
string(13) "Australia/ACT"
}
[61]=>
array(3) {
["dst"]=>
bool(true)
["offset"]=>
int(39600)
["timezone_id"]=>
string(18) "Australia/Brisbane"
}
[62]=>
array(3) {
["dst"]=>
bool(true)
["offset"]=>
int(39600)
["timezone_id"]=>
string(18) "Australia/Canberra"
}
[63]=>
array(3) {
["dst"]=>
bool(true)
["offset"]=>
int(39600)
["timezone_id"]=>
string(16) "Australia/Currie"
}
[64]=>
array(3) {
["dst"]=>
bool(true)
["offset"]=>
int(39600)
["timezone_id"]=>
string(16) "Australia/Hobart"
}
[65]=>
array(3) {
["dst"]=>
bool(true)
["offset"]=>
int(39600)
["timezone_id"]=>
string(18) "Australia/Lindeman"
}
[66]=>
array(3) {
["dst"]=>
bool(true)
["offset"]=>
int(39600)
["timezone_id"]=>
string(13) "Australia/NSW"
}
[67]=>
array(3) {
["dst"]=>
bool(true)
["offset"]=>
int(39600)
["timezone_id"]=>
string(20) "Australia/Queensland"
}
[68]=>
array(3) {
["dst"]=>
bool(true)
["offset"]=>
int(39600)
["timezone_id"]=>
string(16) "Australia/Sydney"
}
[69]=>
array(3) {
["dst"]=>
bool(true)
["offset"]=>
int(39600)
["timezone_id"]=>
string(18) "Australia/Tasmania"
}
[70]=>
array(3) {
["dst"]=>
bool(true)
["offset"]=>
int(39600)
["timezone_id"]=>
string(18) "Australia/Victoria"
string(3) "UTC"
}
}
Done
+66 -166
View File
@@ -111,44 +111,24 @@ fclose( $file_handle );
*** Testing DateTime::modify() : usage variation - unexpected values to first argument $modify***
-- int 0 --
object(DateTime)#3 (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: DateTime::modify(): Failed to parse time string (0) at position 0 (0): Unexpected character in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
bool(false)
-- int 1 --
object(DateTime)#3 (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: DateTime::modify(): Failed to parse time string (1) at position 0 (1): Unexpected character in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
bool(false)
-- int 12345 --
object(DateTime)#3 (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: DateTime::modify(): Failed to parse time string (12345) at position 4 (5): Unexpected character in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
bool(false)
-- int -12345 --
object(DateTime)#3 (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: DateTime::modify(): Failed to parse time string (-12345) at position 5 (5): Unexpected character in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
bool(false)
-- float 10.5 --
object(DateTime)#3 (3) {
@@ -161,14 +141,9 @@ object(DateTime)#3 (3) {
}
-- float -10.5 --
object(DateTime)#3 (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: DateTime::modify(): Failed to parse time string (-10.5) at position 4 (5): Unexpected character in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
bool(false)
-- float .5 --
object(DateTime)#3 (3) {
@@ -182,181 +157,106 @@ object(DateTime)#3 (3) {
-- empty array --
Warning: DateTime::modify() expects parameter 1 to be string, array given in %s on line %d
Warning: DateTime::modify() expects parameter 1 to be string, array given in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
bool(false)
-- int indexed array --
Warning: DateTime::modify() expects parameter 1 to be string, array given in %s on line %d
Warning: DateTime::modify() expects parameter 1 to be string, array given in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
bool(false)
-- associative array --
Warning: DateTime::modify() expects parameter 1 to be string, array given in %s on line %d
Warning: DateTime::modify() expects parameter 1 to be string, array given in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
bool(false)
-- nested arrays --
Warning: DateTime::modify() expects parameter 1 to be string, array given in %s on line %d
Warning: DateTime::modify() expects parameter 1 to be string, array given in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
bool(false)
-- uppercase NULL --
object(DateTime)#3 (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: DateTime::modify(): Failed to parse time string () at position 0 ( in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
bool(false)
-- lowercase null --
object(DateTime)#3 (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: DateTime::modify(): Failed to parse time string () at position 0 ( in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
bool(false)
-- lowercase true --
object(DateTime)#3 (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: DateTime::modify(): Failed to parse time string (1) at position 0 (1): Unexpected character in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
bool(false)
-- lowercase false --
object(DateTime)#3 (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: DateTime::modify(): Failed to parse time string () at position 0 ( in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
bool(false)
-- uppercase TRUE --
object(DateTime)#3 (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: DateTime::modify(): Failed to parse time string (1) at position 0 (1): Unexpected character in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
bool(false)
-- uppercase FALSE --
object(DateTime)#3 (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: DateTime::modify(): Failed to parse time string () at position 0 ( in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
bool(false)
-- empty string DQ --
object(DateTime)#3 (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: DateTime::modify(): Failed to parse time string () at position 0 ( in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
bool(false)
-- empty string SQ --
object(DateTime)#3 (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: DateTime::modify(): Failed to parse time string () at position 0 ( in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
bool(false)
-- string DQ --
object(DateTime)#3 (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: DateTime::modify(): Failed to parse time string (string) at position 0 (s): The timezone could not be found in the database in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
bool(false)
-- string SQ --
object(DateTime)#3 (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: DateTime::modify(): Failed to parse time string (string) at position 0 (s): The timezone could not be found in the database in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
bool(false)
-- mixed case string --
object(DateTime)#3 (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: DateTime::modify(): Failed to parse time string (sTrInG) at position 0 (s): The timezone could not be found in the database in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
bool(false)
-- heredoc --
object(DateTime)#3 (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: DateTime::modify(): Failed to parse time string (hello world) at position 0 (h): The timezone could not be found in the database in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
bool(false)
-- instance of classWithToString --
object(DateTime)#3 (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: DateTime::modify(): Failed to parse time string (Class A object) at position 0 (C): The timezone could not be found in the database in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
bool(false)
-- instance of classWithoutToString --
Warning: DateTime::modify() expects parameter 1 to be string, object given in %s on line %d
Warning: DateTime::modify() expects parameter 1 to be string, object given in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
bool(false)
-- undefined var --
object(DateTime)#3 (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: DateTime::modify(): Failed to parse time string () at position 0 ( in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
bool(false)
-- unset var --
object(DateTime)#3 (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: DateTime::modify(): Failed to parse time string () at position 0 ( in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
bool(false)
-- resource --
Warning: DateTime::modify() expects parameter 1 to be string, resource given in %s on line %d
Warning: DateTime::modify() expects parameter 1 to be string, resource given in /home/derick/dev/php/php-src/trunk/ext/date/tests/DateTime_modify_variation1.php on line 99
bool(false)
===DONE===
+2 -2
View File
@@ -250,8 +250,8 @@ wanted=Sunday 00:30:00
TZ=Pacific/Truk - Is it OK for this to be 10 AM? Note: does not
appear to have a DST or timezone transition.
tStamp=Thursday 1970-01-01 17:17:17 TRUT 0
result=Tuesday 1970-01-06 00:00:00 TRUT 0
tStamp=Thursday 1970-01-01 17:17:17 CHUT 0
result=Tuesday 1970-01-06 00:00:00 CHUT 0
wanted=Tuesday 00:00:00
TZ=Pacific/Ponape - Is it OK for this to be 11 AM? Note: does
+1 -1
View File
@@ -16,7 +16,7 @@ echo $from->getTimestamp(), "\n"; //B
echo date('d.m.Y H:i', $from->getTimestamp()), "\n"; //C
?>
--EXPECT--
12.07.2010
12.07.2010 00:00
1278885600
12.07.2010 00:00
1278885600
+66 -166
View File
@@ -111,44 +111,24 @@ fclose( $file_handle );
*** Testing date_modify() : usage variation - unexpected values to second argument $format***
-- int 0 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: date_modify(): Failed to parse time string (0) at position 0 (0): Unexpected character in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
bool(false)
-- int 1 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: date_modify(): Failed to parse time string (1) at position 0 (1): Unexpected character in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
bool(false)
-- int 12345 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: date_modify(): Failed to parse time string (12345) at position 4 (5): Unexpected character in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
bool(false)
-- int -12345 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: date_modify(): Failed to parse time string (-12345) at position 5 (5): Unexpected character in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
bool(false)
-- float 10.5 --
object(DateTime)#%d (3) {
@@ -161,14 +141,9 @@ object(DateTime)#%d (3) {
}
-- float -10.5 --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: date_modify(): Failed to parse time string (-10.5) at position 4 (5): Unexpected character in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
bool(false)
-- float .5 --
object(DateTime)#%d (3) {
@@ -182,181 +157,106 @@ object(DateTime)#%d (3) {
-- empty array --
Warning: date_modify() expects parameter 2 to be string, array given in %s on line %d
Warning: date_modify() expects parameter 2 to be string, array given in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
bool(false)
-- int indexed array --
Warning: date_modify() expects parameter 2 to be string, array given in %s on line %d
Warning: date_modify() expects parameter 2 to be string, array given in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
bool(false)
-- associative array --
Warning: date_modify() expects parameter 2 to be string, array given in %s on line %d
Warning: date_modify() expects parameter 2 to be string, array given in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
bool(false)
-- nested arrays --
Warning: date_modify() expects parameter 2 to be string, array given in %s on line %d
Warning: date_modify() expects parameter 2 to be string, array given in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
bool(false)
-- uppercase NULL --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: date_modify(): Failed to parse time string () at position 0 ( in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
bool(false)
-- lowercase null --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: date_modify(): Failed to parse time string () at position 0 ( in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
bool(false)
-- lowercase true --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: date_modify(): Failed to parse time string (1) at position 0 (1): Unexpected character in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
bool(false)
-- lowercase false --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: date_modify(): Failed to parse time string () at position 0 ( in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
bool(false)
-- uppercase TRUE --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: date_modify(): Failed to parse time string (1) at position 0 (1): Unexpected character in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
bool(false)
-- uppercase FALSE --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: date_modify(): Failed to parse time string () at position 0 ( in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
bool(false)
-- empty string DQ --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: date_modify(): Failed to parse time string () at position 0 ( in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
bool(false)
-- empty string SQ --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: date_modify(): Failed to parse time string () at position 0 ( in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
bool(false)
-- string DQ --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: date_modify(): Failed to parse time string (string) at position 0 (s): The timezone could not be found in the database in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
bool(false)
-- string SQ --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: date_modify(): Failed to parse time string (string) at position 0 (s): The timezone could not be found in the database in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
bool(false)
-- mixed case string --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: date_modify(): Failed to parse time string (sTrInG) at position 0 (s): The timezone could not be found in the database in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
bool(false)
-- heredoc --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: date_modify(): Failed to parse time string (hello world) at position 0 (h): The timezone could not be found in the database in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
bool(false)
-- instance of classWithToString --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: date_modify(): Failed to parse time string (Class A object) at position 0 (C): The timezone could not be found in the database in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
bool(false)
-- instance of classWithoutToString --
Warning: date_modify() expects parameter 2 to be string, object given in %s on line %d
Warning: date_modify() expects parameter 2 to be string, object given in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
bool(false)
-- undefined var --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: date_modify(): Failed to parse time string () at position 0 ( in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
bool(false)
-- unset var --
object(DateTime)#%d (3) {
["date"]=>
string(19) "2009-01-31 14:28:41"
["timezone_type"]=>
int(3)
["timezone"]=>
string(13) "Europe/London"
}
Warning: date_modify(): Failed to parse time string () at position 0 ( in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
bool(false)
-- resource --
Warning: date_modify() expects parameter 2 to be string, resource given in %s on line %d
Warning: date_modify() expects parameter 2 to be string, resource given in /home/derick/dev/php/php-src/trunk/ext/date/tests/date_modify_variation2.php on line 99
bool(false)
===DONE===
@@ -26,7 +26,7 @@ var_dump( $abbr["acst"] );
--EXPECT--
*** Testing timezone_abbreviations_list() : basic functionality ***
string(5) "array"
int(338)
int(399)
-- Format a sample entry --
array(4) {
@@ -67,4 +67,4 @@ array(4) {
string(11) "Brazil/Acre"
}
}
===DONE===
===DONE===
+1 -1
View File
@@ -233,7 +233,7 @@ AC_DEFUN([PHP_DBA_DB_CHECK],[
AC_MSG_CHECKING([for DB4 minor version and patch level])
AC_EGREP_CPP(yes,[
#include "$THIS_INCLUDE"
#if DB_VERSION_MINOR != 1 || (DB_VERSION_MINOR == 1 && DB_VERSION_PATCH >= 25)
#if DB_VERSION_MAJOR > 4 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR != 1) || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR == 1 && DB_VERSION_PATCH >= 25)
yes
#endif
],[
+14
View File
@@ -0,0 +1,14 @@
--TEST--
Bug #52656 (DOMCdataSection does not work with splitText).
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
$CData = new DOMCdataSection('splithere!');
$CDataSplit = $CData->splitText(5);
var_dump($CDataSplit, $CDataSplit->data);
?>
--EXPECT--
object(DOMText)#2 (0) {
}
string(5) "here!"
+1 -1
View File
@@ -160,7 +160,7 @@ PHP_FUNCTION(dom_text_split_text)
}
DOM_GET_OBJ(node, id, xmlNodePtr, intern);
if (node->type != XML_TEXT_NODE) {
if (node->type != XML_TEXT_NODE && node->type != XML_CDATA_SECTION_NODE) {
RETURN_FALSE;
}
+5
View File
@@ -4228,6 +4228,11 @@ PHP_FUNCTION(imagepstext)
return;
}
if (aa_steps != 4 || aa_steps != 16) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "AA steps must be 4 or 16");
RETURN_FALSE;
}
ZEND_FETCH_RESOURCE(bg_img, gdImagePtr, &img, -1, "Image", le_gd);
ZEND_FETCH_RESOURCE(f_ind, int *, &fnt, -1, "Type 1 font", le_ps_font);
+1 -1
View File
@@ -25,9 +25,9 @@
typedef struct {
php_hash_uint64 state[3];
php_hash_uint64 passed;
unsigned char buffer[64];
unsigned int passes:1;
unsigned int length:7;
unsigned char buffer[64];
} PHP_TIGER_CTX;
PHP_HASH_API void PHP_3TIGERInit(PHP_TIGER_CTX *context);
+3 -3
View File
@@ -1698,10 +1698,10 @@ static php_iconv_err_t _php_iconv_mime_decode(smart_str *pretval, const char *st
if ((mode & PHP_ICONV_MIME_DECODE_CONTINUE_ON_ERROR)) {
/* pass the entire chunk through the converter */
err = _php_iconv_appendl(pretval, encoded_word, (size_t)(p1 - encoded_word), cd_pl);
if (err != PHP_ICONV_ERR_SUCCESS) {
goto out;
}
encoded_word = NULL;
if (err != PHP_ICONV_ERR_SUCCESS) {
break;
}
} else {
goto out;
}
+29
View File
@@ -0,0 +1,29 @@
--TEST--
Bug #51250 (iconv_mime_decode() does not ignore malformed Q-encoded words)
--SKIPIF--
<?php extension_loaded('iconv') or die('skip iconv extension is not available'); ?>
--FILE--
<?php
$m = ICONV_MIME_DECODE_CONTINUE_ON_ERROR;
var_dump(iconv_mime_decode("Legal encoded-word: =?utf-8?B?Kg==?= .", $m));
var_dump(iconv_mime_decode("Legal encoded-word: =?utf-8?Q?*?= .", $m));
var_dump(iconv_mime_decode("Illegal encoded-word: =?utf-8?B?".chr(0xA1)."?= .", $m));
var_dump(iconv_mime_decode("Illegal encoded-word: =?utf-8?Q?".chr(0xA1)."?= .", $m));
var_dump(iconv_mime_decode("Legal encoded-word: =?utf-8?B?Kg==?= ."));
var_dump(iconv_mime_decode("Legal encoded-word: =?utf-8?Q?*?= ."));
var_dump(iconv_mime_decode("Illegal encoded-word: =?utf-8?B?".chr(0xA1)."?= ."));
var_dump(iconv_mime_decode("Illegal encoded-word: =?utf-8?Q?".chr(0xA1)."?= ."));
?>
--EXPECTF--
string(23) "Legal encoded-word: * ."
string(23) "Legal encoded-word: * ."
string(24) "Illegal encoded-word: ."
string(23) "Illegal encoded-word: ."
string(23) "Legal encoded-word: * ."
string(23) "Legal encoded-word: * ."
string(24) "Illegal encoded-word: ."
Notice: iconv_mime_decode(): Detected an illegal character in input string in %s on line %d
bool(false)
+13
View File
@@ -0,0 +1,13 @@
--TEST--
Bug #53304 (quot_print_decode does not handle lower-case hex digits)
--SKIPIF--
<?php extension_loaded('iconv') or die('skip iconv extension is not available'); ?>
--FILE--
<?php
echo iconv_mime_decode('=?utf-8?Q?Nachricht_=c3=bcber_Kontaktformular_www.inexio.net?=', 0, 'UTF-8') . "\n";
echo iconv_mime_decode('=?utf-8?Q?Nachricht_=C3=BCber_Kontaktformular_www.inexio.net?=', 0, 'UTF-8') . "\n";
?>
--EXPECT--
Nachricht über Kontaktformular www.inexio.net
Nachricht über Kontaktformular www.inexio.net
+1
View File
@@ -309,6 +309,7 @@ PHP_FUNCTION( datefmt_get_locale )
DATE_FORMAT_METHOD_FETCH_OBJECT;
loc = (char *)udat_getLocaleByType(DATE_FORMAT_OBJECT(dfo), loc_type,&INTL_DATA_ERROR_CODE(dfo));
INTL_METHOD_CHECK_STATUS(dfo, "Error getting locale");
RETURN_STRING(loc, 1);
}
/* }}} */
+24 -2
View File
@@ -27,6 +27,7 @@
#include "dateformat_class.h"
#include "dateformat_format.h"
#include "dateformat_data.h"
#include "ext/date/php_date.h"
/* {{{
* Internal function which calls the udat_format
@@ -158,9 +159,30 @@ PHP_FUNCTION(datefmt_format)
timestamp = internal_get_timestamp(dfo, hash_arr TSRMLS_CC);
INTL_METHOD_CHECK_STATUS( dfo, "datefmt_format: Date formatting failed" )
break;
case IS_OBJECT: {
zend_class_entry *date_ce = php_date_get_date_ce();
zval retval;
zval *zfuncname;
if(!instanceof_function(Z_OBJCE_P(zarg), date_ce TSRMLS_CC)) {
intl_errors_set(INTL_DATA_ERROR_P(dfo), U_ILLEGAL_ARGUMENT_ERROR, "datefmt_format: object must be an instance of DateTime", 0 TSRMLS_CC );
RETURN_FALSE;
}
INIT_ZVAL(retval);
MAKE_STD_ZVAL(zfuncname);
ZVAL_STRING(zfuncname, "getTimestamp", 1);
if(call_user_function(NULL, &zarg, zfuncname, &retval, 0, NULL TSRMLS_CC) != SUCCESS || Z_TYPE(retval) != IS_LONG) {
intl_errors_set(INTL_DATA_ERROR_P(dfo), U_ILLEGAL_ARGUMENT_ERROR, "datefmt_format: cannot get timestamp", 0 TSRMLS_CC );
zval_ptr_dtor(&zfuncname);
RETURN_FALSE;
}
zval_ptr_dtor(&zfuncname);
p_timestamp = Z_LVAL(retval);
timestamp = p_timestamp*1000;
}
break;
default:
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR,
"datefmt_format: takes either an array or an integer timestamp value ", 0 TSRMLS_CC );
intl_errors_set( INTL_DATA_ERROR_P(dfo), U_ILLEGAL_ARGUMENT_ERROR,
"datefmt_format: takes either an array or an integer timestamp value or a DateTime object", 0 TSRMLS_CC );
RETURN_FALSE;
}
+7 -2
View File
@@ -250,7 +250,7 @@ PHP_FUNCTION( numfmt_get_symbol )
long symbol;
UChar value_buf[4];
UChar *value = value_buf;
int length = USIZE(value);
int length = USIZE(value_buf);
FORMATTER_METHOD_INIT_VARS;
/* Parse parameters. */
@@ -262,12 +262,17 @@ PHP_FUNCTION( numfmt_get_symbol )
RETURN_FALSE;
}
if(symbol >= UNUM_FORMAT_SYMBOL_COUNT || symbol < 0) {
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, "numfmt_get_symbol: invalid symbol value", 0 TSRMLS_CC );
RETURN_FALSE;
}
/* Fetch the object. */
FORMATTER_METHOD_FETCH_OBJECT;
length = unum_getSymbol(FORMATTER_OBJECT(nfo), symbol, value_buf, length, &INTL_DATA_ERROR_CODE(nfo));
if(INTL_DATA_ERROR_CODE(nfo) == U_BUFFER_OVERFLOW_ERROR && length >= USIZE( value )) {
if(INTL_DATA_ERROR_CODE(nfo) == U_BUFFER_OVERFLOW_ERROR && length >= USIZE( value_buf )) {
++length; /* to avoid U_STRING_NOT_TERMINATED_WARNING */
INTL_DATA_ERROR_CODE(nfo) = U_ZERO_ERROR;
value = eumalloc(length);
+135 -3
View File
@@ -33,8 +33,8 @@ function ut_main()
0,
-1200000,
1200000,
2200000000,
-2200000000,
2200000000.0,
-2200000000.0,
90099999,
3600,
-3600
@@ -70,6 +70,15 @@ function ut_main()
$localtime_arr2,
$localtime_arr3
);
$d1 = new DateTime("2010-01-01 01:02:03", new DateTimeZone("UTC"));
$d2 = new DateTime("2000-12-31 03:04:05", new DateTimeZone("UTC"));
$d2->setTimezone(new DateTimeZone("PDT"));
$dates = array(
$d1,
$d2,
new StdClass(),
);
//Test format with input as a timestamp : integer
foreach( $time_arr as $timestamp_entry){
@@ -111,6 +120,24 @@ function ut_main()
}
}
foreach($dates as $date_entry) {
foreach( $locale_arr as $locale_entry ){
foreach( $datetype_arr as $datetype_entry ) {
$res_str .= "\n------------";
$res_str .= "\nDate is: ".var_export($date_entry, true);
$res_str .= "\n------------";
$fmt = ut_datefmt_create( $locale_entry , $datetype_entry ,$datetype_entry, $timezone, IntlDateFormatter::GREGORIAN );
$formatted1 = ut_datefmt_format( $fmt , $date_entry);
if( intl_get_error_code() == U_ZERO_ERROR){
$res_str .= "\nFormatted DateTime is : $formatted1";
}else{
$res_str .= "\nError while formatting as: '".intl_get_error_message()."'";
}
}
}
}
return $res_str;
}
@@ -285,4 +312,109 @@ Formatted localtime_array is : Dec 17, 1895 12:13:11 AM
IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3
Formatted localtime_array is : 12/17/95 12:13 AM
IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1
Formatted localtime_array is : 18951217 12:13 AM
Formatted localtime_array is : 18951217 12:13 AM
------------
Date is: DateTime::__set_state(array(
'date' => '2010-01-01 01:02:03',
'timezone_type' => 3,
'timezone' => 'UTC',
))
------------
Formatted DateTime is : Thursday, December 31, 2009 3:02:03 PM GMT-10:00
------------
Date is: DateTime::__set_state(array(
'date' => '2010-01-01 01:02:03',
'timezone_type' => 3,
'timezone' => 'UTC',
))
------------
Formatted DateTime is : December 31, 2009 3:02:03 PM GMT-10:00
------------
Date is: DateTime::__set_state(array(
'date' => '2010-01-01 01:02:03',
'timezone_type' => 3,
'timezone' => 'UTC',
))
------------
Formatted DateTime is : Dec 31, 2009 3:02:03 PM
------------
Date is: DateTime::__set_state(array(
'date' => '2010-01-01 01:02:03',
'timezone_type' => 3,
'timezone' => 'UTC',
))
------------
Formatted DateTime is : 12/31/09 3:02 PM
------------
Date is: DateTime::__set_state(array(
'date' => '2010-01-01 01:02:03',
'timezone_type' => 3,
'timezone' => 'UTC',
))
------------
Formatted DateTime is : 20091231 03:02 PM
------------
Date is: DateTime::__set_state(array(
'date' => '2000-12-30 19:04:05',
'timezone_type' => 3,
'timezone' => 'America/Los_Angeles',
))
------------
Formatted DateTime is : Saturday, December 30, 2000 5:04:05 PM GMT-10:00
------------
Date is: DateTime::__set_state(array(
'date' => '2000-12-30 19:04:05',
'timezone_type' => 3,
'timezone' => 'America/Los_Angeles',
))
------------
Formatted DateTime is : December 30, 2000 5:04:05 PM GMT-10:00
------------
Date is: DateTime::__set_state(array(
'date' => '2000-12-30 19:04:05',
'timezone_type' => 3,
'timezone' => 'America/Los_Angeles',
))
------------
Formatted DateTime is : Dec 30, 2000 5:04:05 PM
------------
Date is: DateTime::__set_state(array(
'date' => '2000-12-30 19:04:05',
'timezone_type' => 3,
'timezone' => 'America/Los_Angeles',
))
------------
Formatted DateTime is : 12/30/00 5:04 PM
------------
Date is: DateTime::__set_state(array(
'date' => '2000-12-30 19:04:05',
'timezone_type' => 3,
'timezone' => 'America/Los_Angeles',
))
------------
Formatted DateTime is : 20001230 05:04 PM
------------
Date is: stdClass::__set_state(array(
))
------------
Error while formatting as: 'datefmt_format: object must be an instance of DateTime: U_ILLEGAL_ARGUMENT_ERROR'
------------
Date is: stdClass::__set_state(array(
))
------------
Error while formatting as: 'datefmt_format: object must be an instance of DateTime: U_ILLEGAL_ARGUMENT_ERROR'
------------
Date is: stdClass::__set_state(array(
))
------------
Error while formatting as: 'datefmt_format: object must be an instance of DateTime: U_ILLEGAL_ARGUMENT_ERROR'
------------
Date is: stdClass::__set_state(array(
))
------------
Error while formatting as: 'datefmt_format: object must be an instance of DateTime: U_ILLEGAL_ARGUMENT_ERROR'
------------
Date is: stdClass::__set_state(array(
))
------------
Error while formatting as: 'datefmt_format: object must be an instance of DateTime: U_ILLEGAL_ARGUMENT_ERROR'
@@ -29,6 +29,12 @@ function ut_main()
$res_str .= "\nAfter call to get_locale : locale= $locale";
$res_str .= "\n";
}
$badvals = array(100, -1, 4294901761);
foreach($badvals as $badval) {
if(ut_datefmt_get_locale($fmt, $badval)) {
$res_str .= "datefmt_get_locale should return false for bad argument $badval\n";
}
}
return $res_str;
+6 -1
View File
@@ -73,7 +73,12 @@ function ut_main()
// Restore attribute's symbol.
ut_nfmt_set_symbol( $fmt, $symb, $orig_val );
}
$badvals = array(2147483648, -2147483648, -1, 4294901761);
foreach($badvals as $badval) {
if(ut_nfmt_get_symbol( $fmt, 2147483648 )) {
$res_str .= "Bad value $badval should return false!\n";
}
}
return $res_str;
}
+3
View File
@@ -795,6 +795,9 @@ PHP_MINIT_FUNCTION(mysqli)
#ifdef SERVER_QUERY_WAS_SLOW
REGISTER_LONG_CONSTANT("MYSQLI_SERVER_QUERY_WAS_SLOW", SERVER_QUERY_WAS_SLOW, CONST_CS | CONST_PERSISTENT);
#endif
#ifdef SERVER_PS_OUT_PARAMS
REGISTER_LONG_CONSTANT("MYSQLI_SERVER_PS_OUT_PARAMS", SERVER_PS_OUT_PARAMS, CONST_CS | CONST_PERSISTENT);
#endif
REGISTER_LONG_CONSTANT("MYSQLI_REFRESH_GRANT", REFRESH_GRANT, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("MYSQLI_REFRESH_LOG", REFRESH_LOG, CONST_CS | CONST_PERSISTENT);
+1
View File
@@ -111,6 +111,7 @@ require_once('skipifconnectfailure.inc');
$expected_constants['MYSQLI_OPT_NET_READ_BUFFER_SIZE'] = true;
$expected_constants['MYSQLI_ASYNC'] = true;
$expected_constants['MYSQLI_SERVER_PS_OUT_PARAMS'] = true;
} else {
$version = mysqli_get_client_version();
}
+6 -2
View File
@@ -1971,15 +1971,19 @@ MYSQLND_METHOD(mysqlnd_conn, change_user)(MYSQLND * const conn,
}
}
if (ret == PASS) {
char * tmp = NULL;
/* if we get conn->user as parameter and then we first free it, then estrndup it, we will crash */
tmp = mnd_pestrndup(user, user_len, conn->persistent);
if (conn->user) {
mnd_pefree(conn->user, conn->persistent);
}
conn->user = mnd_pestrndup(user, user_len, conn->persistent);
conn->user = tmp;
tmp = mnd_pestrdup(passwd, conn->persistent);
if (conn->passwd) {
mnd_pefree(conn->passwd, conn->persistent);
}
conn->passwd = mnd_pestrdup(passwd, conn->persistent);
conn->passwd = tmp;
if (conn->last_message) {
mnd_pefree(conn->last_message, conn->persistent);
+1 -1
View File
@@ -135,7 +135,7 @@ static inline void DBG_ENTER_EX(MYSQLND_DEBUG * dbg_obj, const char * const func
#define DBG_RETURN_EX(dbg_obj, value) return (value)
#define DBG_VOID_RETURN_EX(dbg_obj) return
#endif
#endif /* defined(__GNUC__) || (defined(_MSC_VER) && (_MSC_VER >= 1400)) */
#if MYSQLND_DBG_ENABLED == 1
+1
View File
@@ -64,6 +64,7 @@
#define SERVER_STATUS_DB_DROPPED 256 /* A database was dropped */
#define SERVER_STATUS_NO_BACKSLASH_ESCAPES 512
#define SERVER_QUERY_WAS_SLOW 2048
#define SERVER_PS_OUT_PARAMS 4096
#define MYSQLND_NO_DATA 100
#define MYSQLND_DATA_TRUNCATED 101
+18 -2
View File
@@ -225,10 +225,15 @@ MYSQLND_METHOD(mysqlnd_stmt, next_result)(MYSQLND_STMT * s TSRMLS_DC)
DBG_RETURN(FAIL);
}
DBG_INF_FMT("server_status=%u cursor=%u", stmt->upsert_status.server_status, stmt->upsert_status.server_status & SERVER_STATUS_CURSOR_EXISTS);
DBG_INF_FMT("server_status=%u cursor=%u", conn->upsert_status.server_status, conn->upsert_status.server_status & SERVER_STATUS_CURSOR_EXISTS);
/* Free space for next result */
s->m->free_stmt_content(s TSRMLS_CC);
DBG_RETURN(s->m->parse_execute_response(s TSRMLS_CC));
{
enum_func_status ret = s->m->parse_execute_response(s TSRMLS_CC);
DBG_RETURN(ret);
}
}
/* }}} */
@@ -556,6 +561,15 @@ mysqlnd_stmt_execute_parse_response(MYSQLND_STMT * const s TSRMLS_DC)
}
}
}
/* #ifndef MYSQLND_DONT_SKIP_OUT_PARAMS_RESULTSET */
#if A0
if (stmt->upsert_status.server_status & SERVER_PS_OUT_PARAMS) {
s->m->free_stmt_content(s TSRMLS_CC);
DBG_INF("PS OUT Variable RSet, skipping");
/* OUT params result set. Skip for now to retain compatibility */
ret = mysqlnd_stmt_execute_parse_response(s TSRMLS_CC);
}
#endif
DBG_INF(ret == PASS? "PASS":"FAIL");
DBG_RETURN(ret);
@@ -701,6 +715,8 @@ MYSQLND_METHOD(mysqlnd_stmt, execute)(MYSQLND_STMT * const s TSRMLS_DC)
ret = s->m->parse_execute_response(s TSRMLS_CC);
DBG_INF_FMT("server_status=%u cursor=%u", stmt->upsert_status.server_status, stmt->upsert_status.server_status & SERVER_STATUS_CURSOR_EXISTS);
if (ret == PASS && conn->last_query_type == QUERY_UPSERT && stmt->upsert_status.affected_rows) {
MYSQLND_INC_CONN_STATISTIC_W_VALUE(conn->stats, STAT_ROWS_AFFECTED_PS, stmt->upsert_status.affected_rows);
}
-4
View File
@@ -929,10 +929,6 @@ PHP_FUNCTION(oci_lob_export)
RETURN_FALSE;
}
if (strlen(filename) != filename_len) {
RETURN_FALSE;
}
if (PG(safe_mode) && (!php_checkuid(filename, NULL, CHECKUID_CHECK_FILE_AND_DIR))) {
RETURN_FALSE;
}
+1 -1
View File
@@ -46,7 +46,7 @@
*/
#undef PHP_OCI8_VERSION
#endif
#define PHP_OCI8_VERSION "1.4.5-devel"
#define PHP_OCI8_VERSION "1.4.5"
extern zend_module_entry oci8_module_entry;
#define phpext_oci8_ptr &oci8_module_entry
+1 -4
View File
@@ -868,10 +868,7 @@ static int php_openssl_load_rand_file(const char * file, int *egdsocket, int *se
*egdsocket = 0;
*seeded = 0;
#ifdef WINDOWS
RAND_screen();
#endif
if (file == NULL) {
file = RAND_file_name(buffer, sizeof(buffer));
} else if (RAND_egd(file) > 0) {
+7 -1
View File
@@ -24,7 +24,13 @@ var_dump($stmt->fetchAll());
$pdo = PDOTest::factory();
$pdo->exec ("create table test2 (id integer primary key, n text)");
if ($pdo->getAttribute(PDO::ATTR_DRIVER_NAME) == 'oci') {
$type = "clob";
} else{
$type = "text";
}
$pdo->exec ("create table test2 (id integer primary key, n $type)");
$pdo->exec ("INSERT INTO test2 (id, n) VALUES (1,'hi')");
$pdo->setAttribute (PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_FUNC);
+6 -1
View File
@@ -17,7 +17,12 @@ $db = PDOTest::factory();
$db->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC);
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);
var_dump($db->query('select 0 as abc, 1 as xyz, 2 as def')->fetchAll(PDO::FETCH_GROUP));
$from = '';
if ($db->getAttribute(PDO::ATTR_DRIVER_NAME) == 'oci') {
$from = 'from dual';
}
var_dump($db->query("select 0 as abc, 1 as xyz, 2 as def $from")->fetchAll(PDO::FETCH_GROUP));
?>
--EXPECT--
array(1) {
+7 -1
View File
@@ -127,7 +127,13 @@ foreach($objs as $idx => $obj)
unset($stmt);
echo "===DATA===\n";
var_dump($db->query('SELECT test.val FROM test')->fetchAll(PDO::FETCH_COLUMN));
$res = $db->query('SELECT test.val FROM test')->fetchAll(PDO::FETCH_COLUMN);
// For Oracle map NULL to empty string so the test doesn't diff
if ($db->getAttribute(PDO::ATTR_DRIVER_NAME) == 'oci' && $res[0] === null) {
$res[0] = "";
}
var_dump($res);
echo "===FAILURE===\n";
try
-2
View File
@@ -41,8 +41,6 @@ $select->execute();
$num = $select->fetchColumn();
echo 'There are ' . $num . " rows in the table.\n";
$select->closeCursor();
// Insert using named parameters
$stmt2 = $db->prepare("INSERT INTO test VALUES(:first, :second, :third)");
foreach ($data as $row) {
+1 -1
View File
@@ -17,7 +17,7 @@ echo "ATTR_CLIENT_VERSION: ";
$cv = $dbh->getAttribute(PDO::ATTR_CLIENT_VERSION);
var_dump($cv);
$s = split("\.", $cv);
$s = explode(".", $cv);
if ($s[0] >= 10 && count($s) > 1 && $s[1] >= 2) {
if (count($s) != 5) {
echo "Wrong number of values in array\nVersion was: ";
+2 -2
View File
@@ -512,7 +512,7 @@ void phar_entry_remove(phar_entry_data *idata, char **error TSRMLS_DC) /* {{{ */
(buffer) += 2
#else
# define PHAR_GET_32(buffer, var) \
var = *(php_uint32*)(buffer); \
memcpy(&var, buffer, sizeof(var)); \
buffer += 4
# define PHAR_GET_16(buffer, var) \
var = *(php_uint16*)(buffer); \
@@ -2491,7 +2491,7 @@ static inline void phar_set_32(char *buffer, int var) /* {{{ */
*((buffer) + 1) = (unsigned char) (((var) >> 8) & 0xFF);
*((buffer) + 0) = (unsigned char) ((var) & 0xFF);
#else
*(php_uint32 *)(buffer) = (php_uint32)(var);
memcpy(buffer, &var, sizeof(var));
#endif
} /* }}} */
+12 -3
View File
@@ -190,7 +190,8 @@ typedef enum {
REF_TYPE_OTHER, /* Must be 0 */
REF_TYPE_FUNCTION,
REF_TYPE_PARAMETER,
REF_TYPE_PROPERTY
REF_TYPE_PROPERTY,
REF_TYPE_DYNAMIC_PROPERTY
} reflection_type_t;
/* Struct for reflection objects */
@@ -272,6 +273,7 @@ static void reflection_free_objects_storage(void *object TSRMLS_DC)
{
reflection_object *intern = (reflection_object *) object;
parameter_reference *reference;
property_reference *prop_reference;
if (intern->ptr) {
switch (intern->ref_type) {
@@ -286,6 +288,11 @@ static void reflection_free_objects_storage(void *object TSRMLS_DC)
case REF_TYPE_PROPERTY:
efree(intern->ptr);
break;
case REF_TYPE_DYNAMIC_PROPERTY:
prop_reference = (property_reference*)intern->ptr;
efree(prop_reference->prop.name);
efree(intern->ptr);
break;
case REF_TYPE_OTHER:
break;
}
@@ -3583,13 +3590,15 @@ ZEND_METHOD(reflection_class, getProperty)
if (zend_hash_exists(Z_OBJ_HT_P(intern->obj)->get_properties(intern->obj TSRMLS_CC), name, name_len+1)) {
zend_property_info property_info_tmp;
property_info_tmp.flags = ZEND_ACC_IMPLICIT_PUBLIC;
property_info_tmp.name = name;
property_info_tmp.name = estrndup(name, name_len);
property_info_tmp.name_length = name_len;
property_info_tmp.h = zend_get_hash_value(name, name_len+1);
property_info_tmp.doc_comment = NULL;
property_info_tmp.ce = ce;
reflection_property_factory(ce, &property_info_tmp, return_value TSRMLS_CC);
intern = (reflection_object *) zend_object_store_get_object(return_value TSRMLS_CC);
intern->ref_type = REF_TYPE_DYNAMIC_PROPERTY;
return;
}
}
@@ -4004,7 +4013,7 @@ ZEND_METHOD(reflection_class, newInstanceArgs)
if (params) {
efree(params);
}
} else if (!ZEND_NUM_ARGS()) {
} else if (!ZEND_NUM_ARGS() || !argc) {
object_init_ex(return_value, ce);
} else {
zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Class %s does not have a constructor, so you cannot pass any constructor arguments", ce->name);
+28
View File
@@ -0,0 +1,28 @@
--TEST--
Bug #52854: ReflectionClass::newInstanceArgs does not work for classes without constructors
--FILE--
<?php
class Test {
}
$c = new ReflectionClass('Test');
var_dump(new Test);
var_dump(new Test());
var_dump($c->newInstance());
var_dump($c->newInstanceArgs(array()));
try {
var_dump($c->newInstanceArgs(array(1)));
} catch(ReflectionException $e) {
echo $e->getMessage()."\n";
}
?>
--EXPECTF--
object(Test)#%d (0) {
}
object(Test)#%d (0) {
}
object(Test)#%d (0) {
}
object(Test)#%d (0) {
}
Class Test does not have a constructor, so you cannot pass any constructor arguments
+25
View File
@@ -0,0 +1,25 @@
--TEST--
Bug #53366 (Reflection doesnt get dynamic property value from getProperty())
--FILE--
<?php
class UserClass {
}
$myClass = new UserClass;
$myClass->id = 1000;
$reflect = new ReflectionObject($myClass);
var_dump($reflect->getProperty('id'));
var_dump($reflect->getProperty('id')->getValue($myClass));
?>
--EXPECTF--
object(ReflectionProperty)#%d (2) {
["name"]=>
string(2) "id"
["class"]=>
string(9) "UserClass"
}
int(1000)
+5 -1
View File
@@ -409,7 +409,11 @@ static void spl_fixedarray_object_write_dimension(zval *object, zval *offset, zv
intern = (spl_fixedarray_object *)zend_object_store_get_object(object TSRMLS_CC);
if (intern->fptr_offset_set) {
SEPARATE_ARG_IF_REF(offset);
if (!offset) {
ALLOC_INIT_ZVAL(offset);
} else {
SEPARATE_ARG_IF_REF(offset);
}
SEPARATE_ARG_IF_REF(value);
zend_call_method_with_2_params(&object, intern->std.ce, &intern->fptr_offset_set, "offsetSet", NULL, offset, value);
zval_ptr_dtor(&value);
+22
View File
@@ -0,0 +1,22 @@
--TEST--
Bug #53362 (Segmentation fault when extending SplFixedArray)
--FILE--
<?php
class obj extends SplFixedArray{
public function offsetSet($offset, $value) {
var_dump($offset);
}
}
$obj = new obj;
$obj[]=2;
$obj[]=2;
$obj[]=2;
?>
--EXPECTF--
NULL
NULL
NULL
+7 -1
View File
@@ -1532,6 +1532,7 @@ PHP_METHOD(sqlite3result, columnName)
php_sqlite3_result *result_obj;
zval *object = getThis();
long column = 0;
char *column_name;
result_obj = (php_sqlite3_result *)zend_object_store_get_object(object TSRMLS_CC);
SQLITE3_CHECK_INITIALIZED(result_obj->db_obj, result_obj->stmt_obj->initialised, SQLite3Result)
@@ -1539,8 +1540,13 @@ PHP_METHOD(sqlite3result, columnName)
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &column) == FAILURE) {
return;
}
column_name = (char*) sqlite3_column_name(result_obj->stmt_obj->stmt, column);
RETVAL_STRING((char*)sqlite3_column_name(result_obj->stmt_obj->stmt, column), 1);
if (column_name == NULL) {
RETURN_FALSE;
}
RETVAL_STRING(column_name, 1);
}
/* }}} */
+28
View File
@@ -0,0 +1,28 @@
--TEST--
Bug #53463 (sqlite3 columnName() segfaults on bad column_number)
--FILE--
<?php
$db = new SQLite3(':memory:');
$db->exec('CREATE TABLE test (whatever INTEGER)');
$db->exec('INSERT INTO test (whatever) VALUES (1)');
$result = $db->query('SELECT * FROM test');
while ($row = $result->fetchArray(SQLITE3_NUM)) {
var_dump($result->columnName(0)); // string(8) "whatever"
// Seems returning false will be most appropriate.
var_dump($result->columnName(3)); // Segmentation fault
}
$result->finalize();
$db->close();
echo "Done\n";
?>
--EXPECT--
string(8) "whatever"
bool(false)
Done
+2 -2
View File
@@ -1389,10 +1389,10 @@ PHP_FUNCTION(extract)
case EXTR_OVERWRITE:
/* GLOBALS protection */
if (var_exists && var_name_len == sizeof("GLOBALS") && !strcmp(var_name, "GLOBALS")) {
if (var_exists && var_name_len == sizeof("GLOBALS")-1 && !strcmp(var_name, "GLOBALS")) {
break;
}
if (var_exists && var_name_len == sizeof("this") && !strcmp(var_name, "this") && EG(scope) && EG(scope)->name_length != 0) {
if (var_exists && var_name_len == sizeof("this")-1 && !strcmp(var_name, "this") && EG(scope) && EG(scope)->name_length != 0) {
break;
}
ZVAL_STRINGL(&final_name, var_name, var_name_len, 1);
+1 -1
View File
@@ -152,7 +152,7 @@ PHPAPI unsigned char *php_base64_decode_ex(const unsigned char *str, int length,
/* run through the whole string, converting as we go */
while ((ch = *current++) != '\0' && length-- > 0) {
if (ch == base64_pad) {
if (*current != '=' && (i % 4) == 1) {
if (*current != '=' && ((i % 4) == 1 || (strict && length > 0))) {
efree(result);
return NULL;
}
+1 -1
View File
@@ -41,7 +41,7 @@
#define FLOAT_DIGITS 6
#define FLOAT_PRECISION 6
#define MAX_FLOAT_DIGITS 38
#define MAX_FLOAT_PRECISION 40
#define MAX_FLOAT_PRECISION 53
#if 0
/* trick to control varargs functions through cpp */
+1 -1
View File
@@ -68,7 +68,7 @@ PHPAPI unsigned char *php_quot_print_decode(const unsigned char *str, size_t len
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 64, 64, 64, 64, 64, 64,
64, 10, 11, 12, 13, 14, 15, 64, 64, 64, 64, 64, 64, 64, 64, 64,
64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
64, 10, 11, 12, 13, 14, 15, 64, 64, 64, 64, 64, 64, 64, 64, 64,
64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
+8 -2
View File
@@ -315,8 +315,14 @@ PHP_FUNCTION(mt_rand)
long number;
int argc = ZEND_NUM_ARGS();
if (argc != 0 && zend_parse_parameters(argc TSRMLS_CC, "ll", &min, &max) == FAILURE)
return;
if (argc != 0) {
if (zend_parse_parameters(argc TSRMLS_CC, "ll", &min, &max) == FAILURE) {
return;
} else if (max < min) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "max(%ld) is smaller than min(%ld)", max, min);
RETURN_FALSE;
}
}
if (!BG(mt_rand_is_seeded)) {
php_mt_srand(GENERATE_SEED() TSRMLS_CC);
@@ -0,0 +1,24 @@
--TEST--
Test extract() for overwrite of GLOBALS
--FILE--
<?php
$str = "John";
debug_zval_dump($GLOBALS["str"]);
/* Extracting Global Variables */
$splat = array("foo" => "bar");
var_dump(extract(array("GLOBALS" => $splat, EXTR_OVERWRITE)));
unset ($splat);
debug_zval_dump($GLOBALS["str"]);
echo "\nDone";
?>
--EXPECTF--
string(4) "John" refcount(2)
int(0)
string(4) "John" refcount(2)
Done
-49
View File
@@ -47,52 +47,3 @@ About to rewind!
* Closing connection #0
Done.
--TEST--
Bug #52820 (writes to fopencookie FILE* not commited when seeking the stream)
--SKIPIF--
<?php
/* unfortunately no standard function does a cast to FILE*, so we need
* curl to test this */
if (!extension_loaded("curl")) exit("skip curl extension not loaded");
$handle=curl_init('http://127.0.0.1:37349/');
curl_setopt($handle, CURLOPT_VERBOSE, true);
curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
if (!curl_setopt($handle, CURLOPT_STDERR, fopen("php://memory", "w+")))
die("skip fopencookie not supported on this platform");
--FILE--
<?php
function do_stuff($url) {
$handle=curl_init('http://127.0.0.1:37349/');
curl_setopt($handle, CURLOPT_VERBOSE, true);
curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
curl_setopt($handle, CURLOPT_STDERR, $o = fopen($url, "w+"));
curl_exec($handle);
echo "About to rewind!\n";
rewind($o);
echo stream_get_contents($o);
return $o;
}
echo "temp stream (close after):\n";
fclose(do_stuff("php://temp"));
echo "\nmemory stream (close after):\n";
fclose(do_stuff("php://memory"));
echo "\nDone.\n";
--EXPECT--
temp stream (close after):
About to rewind!
* About to connect() to 127.0.0.1 port 37349 (#0)
* Trying 127.0.0.1... * Connection refused
* couldn't connect to host
* Closing connection #0
memory stream (close after):
About to rewind!
* About to connect() to 127.0.0.1 port 37349 (#0)
* Trying 127.0.0.1... * Connection refused
* couldn't connect to host
* Closing connection #0
Done.
Binary file not shown.
@@ -105,19 +105,19 @@ float(%d)
float(%d)
-- Iteration 9 --
float(%d)
float(%d)
bool(false)
bool(false)
-- Iteration 10 --
float(%d)
float(%d)
bool(false)
bool(false)
-- Iteration 11 --
float(%d)
float(%d)
bool(false)
bool(false)
-- Iteration 12 --
float(%d)
float(%d)
bool(false)
bool(false)
--- Done ---
@@ -76,8 +76,6 @@ Warning: file_get_contents( ): failed to open stream: Permission denied in %s on
bool(false)
-- Filename: \0 --
Warning: file_get_contents(): Filename cannot be empty in %s on line %d
bool(false)
-- Filename: array() --
@@ -68,8 +68,6 @@ bool(false)
Warning: file_get_contents( ): failed to open stream: No such file or directory in %s on line %d
bool(false)
-- Iteration 6 --
Warning: file_get_contents(): Filename cannot be empty in %s on line %d
bool(false)
-- Iteration 7 --
@@ -74,8 +74,8 @@ bool(false)
Warning: filegroup(): stat failed for %s/filegroup_variation3/filegroup*.tmp in %s on line %d
bool(false)
- Iteration 7 -
int(%d)
bool(false)
- Iteration 8 -
int(%d)
bool(false)
*** Done ***
@@ -75,8 +75,8 @@ bool(false)
Warning: fileinode(): stat failed for %s/fileinode_variation3/fileinode*.tmp in %s on line %d
bool(false)
- Iteration 7 -
int(%d)
bool(false)
- Iteration 8 -
int(%d)
bool(false)
*** Done ***
@@ -75,8 +75,8 @@ bool(false)
Warning: fileowner(): stat failed for %s/fileowner_variation3/fileowner*.tmp in %s on line %d
bool(false)
- Iteration 7 -
int(%d)
bool(false)
- Iteration 8 -
int(%d)
bool(false)
*** Done ***
@@ -74,8 +74,8 @@ bool(false)
Warning: fileperms(): stat failed for %s/fileperms_variation3/fileperms*.tmp in %s on line %d
bool(false)
- Iteration 7 -
int(%d)
bool(false)
- Iteration 8 -
int(%d)
bool(false)
*** Done ***
+15 -15
View File
@@ -259,21 +259,21 @@ bool(true)
--- With Strings ---
-- Iteration 0 --
bool(true)
bool(true)
bool(false)
bool(true)
bool(false)
bool(false)
bool(true)
-- Iteration 1 --
bool(true)
bool(true)
bool(true)
bool(false)
bool(false)
bool(true)
bool(false)
bool(false)
bool(false)
bool(false)
-- Iteration 2 --
bool(true)
bool(true)
bool(false)
bool(true)
bool(false)
bool(false)
@@ -282,7 +282,7 @@ bool(true)
bool(false)
bool(false)
bool(false)
bool(true)
bool(false)
bool(false)
bool(false)
-- Iteration 4 --
@@ -294,7 +294,7 @@ bool(true)
bool(false)
-- Iteration 5 --
bool(true)
bool(true)
bool(false)
bool(true)
bool(false)
bool(false)
@@ -397,28 +397,28 @@ bool(true)
bool(true)
bool(true)
bool(true)
bool(true)
bool(false)
bool(false)
bool(false)
-- Iteration 1 --
bool(true)
bool(true)
bool(true)
bool(true)
bool(false)
bool(false)
bool(false)
-- Iteration 2 --
bool(true)
bool(true)
bool(true)
bool(true)
bool(false)
bool(false)
bool(false)
-- Iteration 3 --
bool(true)
bool(true)
bool(true)
bool(true)
bool(false)
bool(false)
bool(false)
bool(false)
bool(false)
bool(false)
-- Iteration 4 --
+7 -16
View File
@@ -325,20 +325,12 @@ array(0) {
}
-- Iteration 8 --
array(0) {
}
array(0) {
}
array(0) {
}
array(1) {
[0]=>
string(%d) "%s/glob_variation/WONDER5"
}
array(0) {
}
array(0) {
}
bool(false)
bool(false)
bool(false)
bool(false)
bool(false)
bool(false)
-- Iteration 9 --
array(0) {
@@ -441,8 +433,7 @@ array(1) {
array(0) {
}
-- Iteration 8 --
array(0) {
}
bool(false)
-- Iteration 9 --
array(0) {
}
@@ -77,9 +77,9 @@ bool(true)
bool(false)
-- Iteration 9 --
bool(true)
bool(false)
-- Iteration 10 --
bool(true)
bool(false)
*** Done ***
@@ -76,9 +76,9 @@ bool(false)
-- Iteration 5 --
bool(false)
-- Iteration 6 --
bool(true)
bool(false)
-- Iteration 7 --
bool(true)
bool(false)
-- Iteration 8 --
bool(false)
-- Iteration 9 --
@@ -67,8 +67,8 @@ bool(false)
- Iteration 6 -
bool(false)
- Iteration 7 -
bool(true)
bool(false)
- Iteration 8 -
bool(true)
bool(false)
*** Done ***
@@ -87,11 +87,11 @@ bool(false)
-- Iteration 6 --
bool(false)
-- Iteration 7 --
bool(true)
bool(false)
-- Iteration 8 --
bool(true)
bool(false)
-- Iteration 9 --
bool(true)
bool(false)
-- Iteration 10 --
bool(true)
-- Iteration 11 --
@@ -96,14 +96,14 @@ bool(false)
bool(false)
bool(false)
-- Iteration 7 --
bool(true)
bool(true)
bool(false)
bool(false)
-- Iteration 8 --
bool(true)
bool(true)
bool(false)
bool(false)
-- Iteration 9 --
bool(true)
bool(true)
bool(false)
bool(false)
-- Iteration 10 --
bool(true)
bool(true)
@@ -64,8 +64,8 @@ Warning: rmdir(%s/mkdir_variation2/): %s on line %d
bool(false)
*** Testing mkdir() and rmdir() for binary safe functionality ***
bool(true)
bool(true)
bool(false)
bool(false)
*** Testing mkdir() with miscelleneous input ***
bool(true)
@@ -37,7 +37,7 @@ $names_arr = array(
foreach($names_arr as $key => $value) {
echo "\n-- Filename: $key --\n";
readfile($value);
var_dump(readfile($value));
};
?>
@@ -48,40 +48,48 @@ foreach($names_arr as $key => $value) {
-- Filename: -1 --
Warning: readfile(-1): failed to open stream: No such file or directory in %s on line %d
bool(false)
-- Filename: TRUE --
Warning: readfile(1): failed to open stream: No such file or directory in %s on line %d
bool(false)
-- Filename: FALSE --
Warning: readfile(): Filename cannot be empty in %s on line %d
bool(false)
-- Filename: NULL --
Warning: readfile(): Filename cannot be empty in %s on line %d
bool(false)
-- Filename: "" --
Warning: readfile(): Filename cannot be empty in %s on line %d
bool(false)
-- Filename: " " --
Warning: readfile( ): failed to open stream: Permission denied in %s on line %d
bool(false)
-- Filename: \0 --
Warning: readfile(): Filename cannot be empty in %s on line %d
bool(false)
-- Filename: array() --
Warning: readfile() expects parameter 1 to be string, array given in %s on line %d
bool(false)
-- Filename: /no/such/file/dir --
Warning: readfile(/no/such/file/dir): failed to open stream: No such file or directory in %s on line %d
bool(false)
-- Filename: php/php --
Warning: readfile(php/php): failed to open stream: No such file or directory in %s on line %d
bool(false)
===Done===
Binary file not shown.
@@ -98,11 +98,7 @@ bool(true)
Warning: rename( ,%s/renameVar13/afile.tmp): No such file or directory in %s on line %d
bool(false)
-- testing '%s' --
Warning: rename(%s/renameVar13/afile.tmp,): %s in %s on line %d
bool(false)
Warning: rename(,%s/renameVar13/afile.tmp): %s in %s on line %d
bool(false)
-- testing 'Array' --
@@ -21,8 +21,8 @@ foreach($streams as $stream)
===DONE===
<?php exit(0); ?>
--EXPECTF--
string(0) ""
string(6) "foobar"
bool(false)
bool(false)
string(13) "foobar foobar"
Warning: file_get_contents(data:;base64,#Zm9vYmFyIGZvb2Jhc=): failed to open stream: rfc2397: unable to decode in %sstream_rfc2397_006.php on line %d
@@ -31,8 +31,8 @@ $names_arr = array(
NULL,
"",
" ",
"\0",
/* Invalid args */
"\0",
array(),
/* Valid args*/
@@ -102,7 +102,8 @@ OK
Failed, not created in the correct directory %s vs %s
0
-- Iteration 6 --
OK
Failed, not created in the correct directory %s vs %s
0
-- Iteration 7 --
Warning: tempnam() expects parameter 2 to be string, array given in %s\ext\standard\tests\file\tempnam_variation3-win32.php on line %d
@@ -100,9 +100,9 @@ File name is => %s/%s
File permissions are => 100600
File created in => directory specified
-- Iteration 6 --
File name is => %s/%s
File permissions are => 100600
File created in => directory specified
-- File is not created --
Warning: unlink(): %s in %s on line %d
-- Iteration 7 --
Warning: tempnam() expects parameter 2 to be string, array given in %s on line %d
@@ -89,9 +89,9 @@ File name is => %s%et%s
File permissions are => 100666
File created in => temp dir
-- Iteration 6 --
File name is => %s%et%s
File permissions are => 100666
File created in => temp dir
-- File is not created --
Warning: unlink(): %s in %s on line %d
-- Iteration 7 --
Warning: tempnam() expects parameter 1 to be string, array given in %s on line %d
@@ -94,9 +94,9 @@ File name is => %s%etempnam_variation3.tmp%s
File permissions are => 100600
File created in => temp dir
-- Iteration 6 --
File name is => %s%etempnam_variation3.tmp%s
File permissions are => 100600
File created in => temp dir
-- File is not created --
Warning: unlink(): %s in %s on line %d
-- Iteration 7 --
Warning: tempnam() expects parameter 1 to be string, array given in %s on line %d
@@ -4,6 +4,7 @@ Bug #44394 (Last two bytes missing from output) with session.use_trans_id
<?php if (!extension_loaded("session")) print "skip"; ?>
--INI--
session.name=PHPSESSID
session.use_only_cookies=0
--FILE--
<?php
@@ -0,0 +1,16 @@
--TEST--
Bug #46587 (mt_rand() does not check that max is greater than min).
--FILE--
<?php
var_dump(mt_rand(3,8));
var_dump(mt_rand(8,3));
echo "Done.\n";
?>
--EXPECTF--
int(%d)
Warning: mt_rand(): max(3) is smaller than min(8) in %s on line %d
bool(false)
Done.
+1 -1
View File
@@ -1,7 +1,7 @@
--TEST--
Bug #46024 stream_select() doesn't return the correct number
--SKIPIF--
<?php if (!getenv('TEST_PHP_EXECUTABLE')) die("TEST_PHP_EXECUTABLE not defined"); ?>
<?php if (!getenv('TEST_PHP_EXECUTABLE')) die("skip TEST_PHP_EXECUTABLE not defined"); ?>
--FILE--
<?php
$php = getenv('TEST_PHP_EXECUTABLE');
+12
View File
@@ -0,0 +1,12 @@
--TEST--
Bug #47168 (printf of floating point variable prints maximum of 40 decimal places)
--FILE--
<?php
$dyadic = 0.00000000000045474735088646411895751953125;
var_dump(printf ("%1.41f\n",unserialize(serialize($dyadic))));
?>
--EXPECT--
0.00000000000045474735088646411895751953125
int(44)
Loaded 100 of 138 files, more files were not shown because too many files have changed in this diff. Show more