Compare commits

...
758 Commits
Author SHA1 Message Date
Stanislav Malyshev 3548b2e2c5 5.4.6 2012-08-14 21:26:05 -07:00
Stanislav Malyshev 1fc3514734 5.4.6rc1 2012-07-31 21:58:45 -07:00
Stanislav Malyshev ff729aabf7 sync NEWS 2012-07-31 21:51:46 -07:00
Stanislav Malyshev 4d6bae896d skip tests if ibase not present 2012-07-31 21:45:04 -07:00
Xinchen Hui 0988ae3c43 Implemented FR #62700 (have the console output 'Listening on http://localhost:8000') 2012-07-31 22:42:28 +08:00
Xinchen Hui 572d6437bc expect pass for 5.4 2012-07-31 10:51:18 +08:00
Xinchen Hui c730329bb0 Merge branch 'PHP-5.3' into PHP-5.4 2012-07-31 10:51:04 +08:00
Xinchen Hui 645f84e41b Test for bug #62680 2012-07-31 10:49:13 +08:00
Gustavo André dos Santos Lopes 86ca788cc7 Fix test title and limit it to ICU >= 4.8 2012-07-30 11:04:10 +02:00
Gustavo André dos Santos Lopes f8e693248f Remove executable bit from files 2012-07-30 10:32:27 +02:00
Gustavo André dos Santos Lopes dec7bad635 Merge branch '5.3' into 5.4
* 5.3:
  Limit test to ICU 49
  Remove executable bit from files
2012-07-30 10:31:10 +02:00
Gustavo André dos Santos Lopes 7e3e1837c8 Limit test to ICU 49 2012-07-30 10:27:41 +02:00
Gustavo André dos Santos Lopes 9762609cec Remove executable bit from files 2012-07-30 10:25:17 +02:00
Xinchen Hui e0c014dead Merge branch 'PHP-5.3' into PHP-5.4 2012-07-29 14:31:04 +08:00
Xinchen Hui f419d614ba Sike test while there is no zend mm max_size guard 2012-07-29 14:30:01 +08:00
Xinchen Hui c6ad98975e Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Skip test while zend mm is disabled
2012-07-29 13:26:05 +08:00
Xinchen Hui 880a6cee00 Skip test while zend mm is disabled 2012-07-29 13:25:31 +08:00
Xinchen Hui 11e84180ef Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Skip test while zend_mm is disabled
2012-07-29 12:19:28 +08:00
Xinchen Hui 14cebefb05 Merge branch 'PHP-5.3' of git.php.net:php-src into PHP-5.3 2012-07-29 12:18:07 +08:00
Xinchen Hui 015ee3b2c8 Skip test while zend_mm is disabled 2012-07-29 12:17:43 +08:00
Felipe Pena b26749b4e9 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  - Fixed bug #57933 (Wrong table type used in phpinfo output) patch by: selsky at columbia dot edu
2012-07-28 19:05:46 -03:00
Felipe Pena 068fc008c6 - Fixed bug #57933 (Wrong table type used in phpinfo output) patch by: selsky at columbia dot edu 2012-07-28 19:05:13 -03:00
Xinchen Hui b7d76b41e0 Merge branch 'PHP-5.3' into PHP-5.4 2012-07-28 17:01:29 +08:00
Xinchen Hui b477a84026 Fixed bug #60194 for eavl
same reason here
2012-07-28 17:00:05 +08:00
Xinchen Hui 61d80d75ba Merge branch 'PHP-5.3' into PHP-5.4 2012-07-28 00:54:17 +08:00
Xinchen Hui ef7286a42f Fixed bug #60194 (--with-zend-multibyte and --enable-debug reports LEAK with run-test.php)
It's not a big deal, just because lexer will read the char after cursor before leaving
2012-07-28 00:50:45 +08:00
Gustavo André dos Santos Lopes ccffec74d0 Fix bug #62651: source level BC break
Break for C++ extensions that don't wrap the includes of PHP libraries
in extern "C" {.
2012-07-26 23:37:02 +02:00
Stanislav Malyshev 7d890eef82 update 5.4.5 date 2012-07-25 23:46:15 -07:00
Xinchen Hui 302ad0d648 Fix test, committed in wrong folder 2012-07-26 13:57:04 +08:00
Xinchen Hui eae0610042 Fixed bug #62653: (unset($array[$float]) causes a crash)
the reason why jpauli and I can not reproduce is (it's silly):
I typo "USE_ZEND_ALLOC *&&* valgrind" at the first time, then I always ctrl+r
and jpauli copied my command from the pastbin :)

thanks
2012-07-26 13:53:06 +08:00
Xinchen Hui ba27e0888a Merge branch 'PHP-5.4' of git.php.net:php-src into PHP-5.4 2012-07-26 12:42:33 +08:00
Xinchen Hui b4b3a65f55 Fixed bug #62661 (Interactive php-cli crashes if include() is used in auto_prepend_file) 2012-07-26 12:40:47 +08:00
Rasmus Lerdorf 5799ebdb0c Fix bug #62654 2012-07-25 02:03:47 +02:00
Rasmus Lerdorf 5f224412fa Fix bug #62654 2012-07-24 16:28:49 -07:00
Felipe Pena 54cba5aa91 - Fixed ZTS build 2012-07-24 10:02:32 -03:00
Florian Anderiasch f2cef8afc4 Updated NES 2012-07-24 14:46:19 +02:00
Florian Anderiasch ddc8d16245 Add syslog support to mail.log #62356
Patch by Michael Orlitzky
2012-07-24 14:31:30 +02:00
Xinchen Hui 9fe8c58130 binary compatibility 2012-07-24 14:45:13 +08:00
Xinchen Hui 4c1e2bbd6f Re-fix bug #55544 2012-07-24 14:43:53 +08:00
Xinchen Hui 2abc4c2f6f Merge branch 'PHP-5.4' of git.php.net:php-src into PHP-5.4 2012-07-24 13:38:11 +08:00
Xinchen Hui c20b2ab0bd folders 2012-07-24 13:37:44 +08:00
Gustavo André dos Santos Lopes f3f824823d Duplicate test for ICU 49
The output in ICU < 49 actually seems wrong here; ICU 49 seems to
fix the data.
2012-07-23 02:08:12 +02:00
Johannes Schlüter 860b3ffe75 Fix Bug #62612 readline extension compilation fails 2012-07-22 23:28:32 +02:00
Johannes Schlüter 254d299d07 Merge branch 'PHP-5.3' into PHP-5.4 2012-07-22 22:46:09 +02:00
Johannes Schlüter ffa8461bfe merge 5.3.15 NEWS 2012-07-22 22:45:39 +02:00
Xinchen Hui a88eca53f7 Improve error message for ssl request 2012-07-22 19:20:23 +08:00
Xinchen Hui fd50bf2085 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  missed the test script
2012-07-21 23:33:24 +08:00
Xinchen Hui 777b6679a4 missed the test script 2012-07-21 23:30:32 +08:00
Xinchen Hui 52d8779c43 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix test failed
  Fixed bug #62616 (ArrayIterator::count() from IteratorIterator instance gives Segmentation fault)
2012-07-21 23:27:52 +08:00
Xinchen Hui ead076bac6 Fix test failed 2012-07-21 23:27:09 +08:00
Xinchen Hui cc30524c89 Fixed bug #62616 (ArrayIterator::count() from IteratorIterator instance gives Segmentation fault) 2012-07-21 23:26:18 +08:00
Xinchen Hui 0c996613c0 Fixed bug #62616 (ArrayIterator::count() from IteratorIterator instance gives Segmentation fault) 2012-07-21 22:45:16 +08:00
Xinchen Hui a6f1533789 Fixed bug #55544 (ob_gzhandler always conflicts with zlib.output_compression) 2012-07-21 02:57:36 +08:00
Xinchen Hui a2a1cef1a2 Merge branch 'PHP-5.3' into PHP-5.4 2012-07-21 00:47:54 +08:00
Xinchen Hui 683b4f7a2b merge 9eb5cb6571 to 5.3 2012-07-21 00:46:32 +08:00
Xinchen Hui b81b8bf77d this initialization is unnecessary anymore after commit 2d9d2cadad 2012-07-18 21:45:37 +08:00
Xinchen Hui 2d9d2cadad Fixed bug #62597 (segfault in php_stream_wrapper_log_error with ZTS build) 2012-07-18 20:16:27 +08:00
Xinchen Hui 8f89cfb548 Fix test (no charset outputed) 2012-07-18 19:50:30 +08:00
Xinchen Hui 11d0558928 skip for ZTS 2012-07-18 19:47:54 +08:00
Xinchen Hui 282a6659aa fix test (dos2unix, typo) 2012-07-18 19:25:22 +08:00
Xinchen Hui 41a9c681a0 fix test, the key may be a float value 2012-07-18 19:21:25 +08:00
Xinchen Hui 25be12a3bc Fixed bug #62594 (segfault in mysqlnd_res_meta::set_mode) 2012-07-18 19:06:27 +08:00
Xinchen Hui c7c939b5d8 Bug doesn't exists in any release 2012-07-18 18:00:09 +08:00
Gustavo André dos Santos Lopes c7614a8c19 NEWS for b47d6b32 2012-07-17 23:12:25 +02:00
Reeze Xia b47d6b32ba Fix test fails: ext/standard/tests/general_functions/bug27678.phpt
After commit 3e62aae1, number_format() returns string with length,
but _php_math_number_format_ex_len() didn't set string length
on nan and inf. This cause segfault when destruct the return value.
2012-07-17 23:08:11 +02:00
Anatoliy Belsky d0e58bf6eb Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix for bug #62379 was missing in 5.3
2012-07-17 17:52:25 +02:00
Anatoliy Belsky bd39495332 Fix for bug #62379 was missing in 5.3 2012-07-17 17:50:05 +02:00
Hannes Magnusson 5cf4f7395b Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Do not unload shared extensions when checking for leaks
2012-07-17 10:05:42 +01:00
Hannes Magnusson 88f7f3c00f Do not unload shared extensions when checking for leaks 2012-07-17 10:04:56 +01:00
Xinchen Hui c8f285d190 Update libmagic.patch 2012-07-15 18:25:58 +08:00
Stanislav Malyshev f4809424cd Merge branch 'pull-request/96' into PHP-5.4
* pull-request/96:
  Implemented FR #61602 Allow access to name of constant used as default value
2012-07-14 23:08:50 -07:00
Stanislav Malyshev 55dbd8cf46 update NEWS 2012-07-14 22:41:08 -07:00
Stanislav Malyshev a5d45bae85 Fixed bug #61527 (Recursive/ArrayIterator gives misleading notice when array empty or moved to the end) 2012-07-14 22:34:28 -07:00
Stanislav Malyshev cfdccdb805 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Typofix in test-description
2012-07-14 22:08:19 -07:00
Jille Timmermans 86b4252c8e Typofix in test-description 2012-07-14 22:07:50 -07:00
donnut 53ba768ed8 removed unneccesary arrat and ini settings 2012-07-14 19:22:03 -07:00
donnut 4539d799bb addition SplFileObject tests 2012-07-14 19:21:50 -07:00
donnut 2cb7a678a1 new tests from PHP TestFest June 2012 2012-07-14 19:21:34 -07:00
Adam Gegotek 8b70dd202a Fixing up closing tag 2012-07-14 18:59:04 -07:00
Adam Gegotek 152f73f92a Testing variation on input parameters of http_build_query() function 2012-07-14 18:58:52 -07:00
Stanislav Malyshev 1916bb223e Merge branch 'pull-request/91' into PHP-5.4
* pull-request/91:
  Fixed bug #61964 (finfo_open with directory cause invalid free)
2012-07-14 18:52:24 -07:00
Felipe Pena 3728e50e9f Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  - Fixed bug #62525 (sigabrt while converting floating point to string)
2012-07-14 15:15:24 -03:00
Felipe Pena 63f3962a90 - Fixed bug #62525 (sigabrt while converting floating point to string) 2012-07-14 15:15:11 -03:00
Felipe Pena d640e446ab - Fixed conflict 2012-07-14 13:16:35 -03:00
Felipe Pena 864575251a - Fixed memory leak when extending DOMXPath 2012-07-14 13:13:31 -03:00
Felipe Pena 9c28393067 - BFN 2012-07-14 12:27:44 -03:00
Felipe Pena 0bff7cfadd - Fixed bug #62565 (Crashes due non-initialized internal properties_table) 2012-07-14 12:16:16 -03:00
Felipe Pena 8b093dee21 - Fixed bug #62564 (Extending MessageFormatter and adding property causes crash) 2012-07-14 11:37:08 -03:00
Matt Ficken 10251b20c3 Fixed bug #62379 failing ODBC long column functionality 2012-07-13 15:34:00 +02:00
Anatoliy Belsky d9d21b2037 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed bug #61677 ext\zlib\tests\bug_52944.phpt fails
2012-07-13 11:46:14 +02:00
Anatoliy Belsky 02b8362ec2 Fixed bug #61677 ext\zlib\tests\bug_52944.phpt fails
The test is known to fail on windows with zlib version < 1.2.7 (current dep is 1.2.5),
with 1.2.7 it works. As it's primarily a zlib 1.2.5 issue on windows, skip it for now.
2012-07-13 11:39:57 +02:00
Anatoliy Belsky cf91b163e1 fixed the test for warnings changed 2012-07-12 18:24:38 +02:00
Anatoliy Belsky ec7e479562 reverted news about #62477 2012-07-12 10:57:56 +02:00
Anatoliy Belsky 86428169d3 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  reverted changes for #62477
2012-07-12 10:57:26 +02:00
Anatoliy Belsky ad7eeba3c1 reverted changes for #62477 2012-07-12 10:54:14 +02:00
Anatoliy Belsky be8f089a13 updated NEWS 2012-07-11 22:37:39 +02:00
Anatoliy Belsky 899c8f485a Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  updated NEWS
2012-07-11 22:35:00 +02:00
Anatoliy Belsky 896d0fcd41 updated NEWS 2012-07-11 22:33:42 +02:00
Anatoliy Belsky 40f8010a13 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed bug #62477 LimitIterator int overflow
2012-07-11 22:29:45 +02:00
Anatoliy Belsky b383ddf1e5 Fixed bug #62477 LimitIterator int overflow 2012-07-11 22:25:31 +02:00
Xinchen Hui 977ce78d82 Merge branch 'PHP-5.3' into PHP-5.4 2012-07-10 18:45:16 +08:00
Xinchen Hui bcf5853eaa Fixed Bug #62500 (Segfault in DateInterval class when extended) 2012-07-10 18:43:11 +08:00
Anatoliy Belsky 97b8798520 Fixed test bug #62312 (warnings changed one more time) 2012-07-09 18:21:51 +02:00
andrey 66e1ac23c1 Merge branch 'PHP-5.4' of ssh://git.php.net/php-src into PHP-5.4 2012-07-09 17:59:42 +03:00
andrey 555db7dc4e fix valgrind warning 2012-07-09 17:59:23 +03:00
Anatoliy Belsky 2032470e41 fixed #62433 test for win 2012-07-09 12:42:10 +02:00
Xinchen Hui 4323a7aced update NEWS 2012-07-09 08:44:59 +08:00
Xinchen Hui 0398cc22a9 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed bug #62499 (curl_setopt($ch, CURLOPT_COOKIEFILE, "") returns false)
  appease MSVC (doesnt like unary minus of unsigned ints)

Conflicts:
	ext/curl/interface.c
2012-07-09 08:38:03 +08:00
Xinchen Hui c819cf9d6b Fixed bug #62499 (curl_setopt($ch, CURLOPT_COOKIEFILE, "") returns false)
this bc break is caused by the fix for #61948
2012-07-09 08:32:40 +08:00
Nuno Lopes b2b018d5f7 appease MSVC (doesnt like unary minus of unsigned ints) 2012-07-08 15:28:29 -04:00
Nuno Lopes 5910d8d4f4 appease MSVC (doesnt like unary minus of unsigned ints) 2012-07-08 15:21:18 -04:00
Felipe Pena 2019062cfc - Fixed bug #62507 (['REQUEST_TIME'] under mod_php5 returns miliseconds instead of seconds) 2012-07-08 14:05:28 -03:00
Xinchen Hui e3b9b1e6dc Fixed Bug #62500 (Segfault in DateInterval class when extended)
This fix also fixed bug #62508  (Segfault while access a non-string
property of DateInterval object)
2012-07-09 00:25:48 +08:00
Stanislav Malyshev a213c10ef2 Merge branch 'pull-request/112' into PHP-5.4
* pull-request/112:
  Added in NEWS and UPGRADING for feature 55218
  Adding in test for feature 55218
  Implements feature 55218
2012-07-07 12:51:26 -07:00
Lonny Kapelushnik f0df7dbc8f Added in NEWS and UPGRADING for feature 55218 2012-07-07 09:10:08 -04:00
Anthony Ferrara 79ed100c19 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix two issues with run-tests.php
2012-07-06 22:38:15 -04:00
Anthony Ferrara 26b37f1792 Fix two issues with run-tests.php
1. E_STRICT error due to passing return of array_intersect() into reset() directly
2. Details in junit output can produce invalid UTF-8 and XML due to unescaped characters
2012-07-06 22:37:50 -04:00
Nikita Popov 5cf2f87fa7 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix potential integer overflow in nl2br
  Fix potential integer overflow in bin2hex

Conflicts:
	ext/standard/string.c
2012-07-05 20:59:18 +02:00
Nikita Popov 157ddd9577 Fix potential integer overflow in nl2br
The buffer size was calculated manually, thus creating integer overflows
for very large inputs, e.g. nl2br(str_repeat("\n", 613566757)).

The code now uses safe_emalloc, thus making the code throw an error
instead of crashing.
2012-07-05 20:41:54 +02:00
Nikita Popov 88f46b162b Fix potential integer overflow in bin2hex
The code was already using safe_emalloc but did the multiplication in
the first argument, thus making the use of safe_emalloc pretty useless.

The *2 is now moved to the second argument.
2012-07-05 20:14:49 +02:00
Johannes Schlüter 9a38ca8d50 Merge branch 'PHP-5.3' into PHP-5.4 2012-07-05 01:18:57 +02:00
Johannes Schlüter 6b2b195267 This wil be PHP 5.3.16 2012-07-05 01:15:27 +02:00
johannes bcc87ba68e Revert change 3f3ad30c50: There shouldn't be new features in 5.3, especially
not if they aren't in 5.4, too.
2012-07-05 00:55:47 +02:00
Nuno Lopes 91ce8041a3 fix (signed) integer overflow (part of bug #52550 2012-07-02 01:36:35 -04:00
Nuno Lopes d80ff39189 fix (signed) integer overflow (part of bug #52550 2012-07-02 01:35:28 -04:00
Xinchen Hui be4053cea0 Fixed bug #62433 (Inconsistent behavior of RecursiveDirectoryIterator to dot files). 2012-07-02 11:33:38 +08:00
Nikita Popov ff41bfc878 Fix accidential change of php_version.h
For some reason the merge reverts changed the version :/
2012-07-01 17:05:19 +02:00
Nikita Popov b7903f9778 Revert JSON merges to 5.4
This reverts the following merge commits (-m 1):

405ebfcd18
d372b33c9b
36fa17a5fa
2012-07-01 16:38:26 +02:00
Nikita Popov 9cbd7a24b6 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Revert JSON changes to PHP 5.3
2012-07-01 16:35:43 +02:00
Nikita Popov 250393f925 Revert JSON changes to PHP 5.3
This reverts the following commits:

974324676b
4662151ea7
84fe2cc890

This does not revert the JSON changes released in PHP 5.3.14.
2012-07-01 16:28:57 +02:00
Stanislav Malyshev b741d3315b fix bug #61359: json_encode() calls too many reallocs 2012-06-30 19:14:30 -07:00
Stanislav Malyshev 4420b43907 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  remove duplicates, fix order
2012-06-30 17:37:20 -07:00
Stanislav Malyshev dfce6bf5d6 update NEWS 2012-06-30 17:37:09 -07:00
Stanislav Malyshev 5f31c81f07 remove duplicates, fix order 2012-06-30 17:36:22 -07:00
Marc Easen 896ac689c9 Fixed the common misspelling of the word occurred (occured -> occurred) 2012-06-30 16:54:03 -07:00
Felipe Pena b8d453d8d4 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  - Fixed bug #62415 (Undefined variable: diff in run-tests.php on line 2093 for successful XFAIL)
2012-06-30 16:29:47 -03:00
Felipe Pena 75d8af715c - Fixed bug #62415 (Undefined variable: diff in run-tests.php on line 2093 for successful XFAIL) 2012-06-30 16:29:30 -03:00
andrey ed1f058591 merge 2012-06-29 16:32:55 +03:00
andrey b7dbcbd41f Merge branch 'PHP-5.3' into PHP-5.4 2012-06-29 14:48:37 +03:00
andrey 8fe87e7fea fix Bug #62273 Segmentation Fault in Mysqli/Mysqlnd 2012-06-29 14:42:36 +03:00
andrey a614f8edea Merge branch 'PHP-5.3' into PHP-5.4 2012-06-29 14:41:11 +03:00
andrey a19d5c520c Merge branch 'PHP-5.4' of ssh://git.php.net/php-src into PHP-5.4 2012-06-29 14:41:01 +03:00
andrey 1ac611f24f Merge branch 'PHP-5.3' of ssh://git.php.net/php-src into PHP-5.3 2012-06-29 14:40:41 +03:00
Nikita Popov d86b6ea35c Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix some lengths in crypt()

Conflicts:
	ext/standard/crypt.c
2012-06-29 13:15:35 +02:00
Nikita Popov e6cf7d7745 Fix some lengths in crypt()
Use salt_len_in instead of strlen(salt) or PHP_MAX_SALT_LEN, otherwise too
much memory will be allocated.

sha512 has a 86 character checksum, not 43. That probably was a copy&paste
from the sha256 code which indeed has 43.

The allocation also was using sizeof(char *), thus allocating 4 or 8 times
as much memory as necessary. The sizeof(char *) was removed in the 5.4
branch in b7a92c9 but forgotten on 5.3.

The memset 0 call was using PHP_MAX_SALT_LEN which can be smaller than the
output buffer and thus not zeroing out everything. Use the size of the
output buffer (needed) instead.
2012-06-29 13:11:43 +02:00
andrey 08f4b3c3ac Merge branch 'PHP-5.3' into PHP-5.4 2012-06-29 12:43:14 +03:00
andrey f826ea093f new charsets 2012-06-29 12:42:54 +03:00
Stanislav Malyshev 8992da2451 fix NEWS order 2012-06-28 18:08:11 -07:00
Anthony Ferrara 34ab5650bc Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed bug #62443 (Crypt SHA256/512 Segfaults With Malformed Salt)
2012-06-28 20:36:21 -04:00
Anthony Ferrara 7e8276ca68 Fixed bug #62443 (Crypt SHA256/512 Segfaults With Malformed Salt)
Fixed a memory allocation bug in crypt() SHA256/512 that can
cause segmentation faults when passed in salts with a null byte
early.
2012-06-28 20:00:03 -04:00
Nikita Popov 405ebfcd18 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Add json_last_error_msg() function
2012-06-28 20:18:19 +02:00
Nikita Popov 974324676b Add json_last_error_msg() function
This replaces json_last_error(true) and is consistent with other custom
error handling functions.
2012-06-28 20:11:27 +02:00
Johannes Schlüter 2996eeeed0 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix #62432 ReflectionMethod random corrupt memory on high concurrent

Conflicts:
	ext/date/php_date.c
	ext/fileinfo/fileinfo.c
	ext/pdo/pdo_dbh.c
	ext/pdo/pdo_stmt.c
	ext/reflection/php_reflection.c
	ext/spl/spl_array.c
	ext/spl/spl_directory.c
	ext/spl/spl_dllist.c
	ext/spl/spl_fixedarray.c
	ext/spl/spl_heap.c
	ext/spl/spl_iterators.c
	ext/spl/spl_observer.c
	ext/sqlite/sqlite.c
	ext/sqlite3/sqlite3.c
	ext/tidy/tidy.c
	ext/xmlreader/php_xmlreader.c
	ext/xmlwriter/php_xmlwriter.c
	ext/xsl/php_xsl.c
	ext/zip/php_zip.c
2012-06-27 23:35:07 +02:00
Johannes Schlüter b025b9d0cf Fix #62432 ReflectionMethod random corrupt memory on high concurrent
This fixes the same issue in multiple extensions. This isn't needed
in later branches as 5.4 introduced object_properties_init()
2012-06-27 23:26:33 +02:00
Nikita Popov d372b33c9b Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Improve JSON error handling

Conflicts:
	ext/json/tests/bug54058.phpt
	ext/json/tests/bug61537.phpt
2012-06-27 12:28:55 +02:00
Nikita Popov 4662151ea7 Improve JSON error handling
json_encode() no longer throws warnings. Instead only the error code for
json_last_error() is set.

As it is hard to debug the error from just an error code an optional
$as_string parameter was added to json_last_error(), which returns an
error message instead of an error code.
2012-06-27 12:21:48 +02:00
Johannes Schlüter 9a86784859 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix memleak in CLI

Conflicts:
	sapi/cli/php_cli.c
2012-06-27 11:46:57 +02:00
Johannes Schlüter bc0972e78d Fix memleak in CLI 2012-06-27 11:42:43 +02:00
Stanislav Malyshev 7a0f4cfdde update NEWS 2012-06-26 21:56:11 -07:00
Stanislav Malyshev ffcfa6f920 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  ws fix
  BFN
  Fix bug #62373 (serialize() generates wrong reference to the object)

Conflicts:
	php.ini-development
	php.ini-production
2012-06-26 21:53:40 -07:00
Stanislav Malyshev ad2bee193d ws fix 2012-06-26 15:22:29 -07:00
Xinchen Hui a44a1dc194 Fixed bug #62357 (compile failure: (S) Arguments missing for built-in function __memcmp).
Any C library function may be a macro, We should avoid using ZEND_STRS(L) as their arguments
2012-06-26 18:42:33 +08:00
Moriyoshi Koizumi ce2082d24f BFN 2012-06-25 19:20:38 +09:00
Moriyoshi Koizumi 91e1df704e Fix bug #62373 (serialize() generates wrong reference to the object) 2012-06-25 19:14:19 +09:00
Moriyoshi Koizumi e427182279 Fix bug #62373 (serialize() generates wrong reference to the object) 2012-06-25 19:13:23 +09:00
Nikita Popov ad641950b3 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix memory allocation checks for base64 encode
2012-06-24 23:56:55 +02:00
Nikita Popov 5b3f4d25ea Fix memory allocation checks for base64 encode
base64_encode used safe_emalloc, but one of the arguments was derived from a
multiplication, thus making the allocation unsafe again.

There was a size check in place, but it was off by a factor of two as it
didn't account for the signedness of the integer type.

The unsafe allocation is not exploitable, but still causes funny behavior
when the sized overflows into a negative number.

To fix the issue the *4 factor is moved into the size argument (where it is
known to be safe), so safe_emalloc can carry out the multiplication.

The size check is removed as it doesn't really make sense once safe_emalloc
works correctly. (Would only cause base64_encode to silently return false
instead of throwing an error. Also could cause problems with other uses of
the base64 encoding API, which all don't check for a NULL return value.)

Furthermore the (length + 2) < 0 check is replaced with just length < 0.
Allowing lengths -2 and -1 doesn't make sense semantically and also is not
honored in the following code (negative length would access unallocated
memory.)

Actually the length < 0 check doesn't make sense altogether, but I left it
there just to be safe.
2012-06-24 23:32:50 +02:00
Nikita Popov 36fa17a5fa Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Improve json_encode error handling
  - BFN

Conflicts:
	ext/json/json.c
2012-06-23 21:14:45 +02:00
Nikita Popov 84fe2cc890 Improve json_encode error handling
json_encode() now returns bool(false) for all possible errors, throws the
respective warning and also sets the respective json_last_error() error
code. Three new error codes have been added:

  * JSON_ERROR_RECURSION
  * JSON_ERROR_INF_OR_NAN
  * JSON_ERROR_UNSUPPORTED_TYPE

To get a partial JSON output instead of bool(false) the option
JSON_PARTIAL_OUTPUT_ON_ERROR can be specified. In this case the invalid
segments will be replaced either by null (for recursion, unsupported type
and invalid JSON) or 0 (for Inf and NaN).

The warning for invalid UTF-8 stays intact and is thrown also with
display_errors = On. If this behavior is undesired this can be remedied
later.
2012-06-23 20:51:52 +02:00
Felipe Pena e886272577 - BFN 2012-06-23 15:21:32 -03:00
Felipe Pena cc90ac54be - BFN 2012-06-23 15:21:20 -03:00
Felipe Pena 5e36306feb Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  - Improved fix for #62384
2012-06-23 15:16:13 -03:00
Felipe Pena c3f34796a0 - Improved fix for #62384 2012-06-23 15:10:47 -03:00
Johannes Schlüter 2418791731 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Remove unneeded and outdated ChangeLog file
2012-06-22 20:01:06 +02:00
Johannes Schlüter 84b1c568f4 Remove unneeded and outdated ChangeLog file 2012-06-22 20:00:20 +02:00
Johannes Schlüter 5e23a047ac Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Remove extra ;
2012-06-22 17:33:22 +02:00
Johannes Schlüter a62d4e2c43 Remove extra ; 2012-06-22 17:32:46 +02:00
Felipe Pena 4af92aca87 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  - Fixed bug #62384 (Attempting to invoke a Closure more than once causes segfaul)
2012-06-22 12:05:55 -03:00
Felipe Pena b8e946b02e - Fixed bug #62384 (Attempting to invoke a Closure more than once causes segfaul) 2012-06-22 12:05:29 -03:00
Johannes Schlüter af516750ff Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Improve check for :memory: pseudo-filename in SQlite

Conflicts:
	ext/sqlite3/sqlite3.c
2012-06-22 12:50:30 +02:00
Johannes Schlüter 055ecbc628 Improve check for :memory: pseudo-filename in SQlite 2012-06-22 12:48:39 +02:00
Lonny Kapelushnik 2178b1d02d Adding in test for feature 55218 2012-06-21 23:21:17 -04:00
Lonny Kapelushnik f1ef8b327f Implements feature 55218
Allows you to recursively check namespaces under a child node
instead of from the root of the XML doc
2012-06-21 22:34:46 -04:00
Johannes Schlüter 041dd77135 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Remove outdated and user-specific files
2012-06-20 19:47:44 +02:00
Johannes Schlüter d93892de7a Remove outdated and user-specific files 2012-06-20 19:46:32 +02:00
Nikita Popov 02cda8fd94 Merge branch 'PHP-5.3' into PHP-5.4
I messed up the last merge somehow :/ Merge again.

* PHP-5.3:
  Add NEWS for bug #62262
  Fixed bug RecursiveArrayIterator does not implement Countable

Conflicts:
	ext/spl/spl_array.c
2012-06-19 18:41:49 +02:00
Nikita Popov 5d81fe6f12 Add NEWS for bug #62262 2012-06-19 18:40:46 +02:00
Nikita Popov fed1f2d124 Fixed bug RecursiveArrayIterator does not implement Countable
ArrayIterator implemented Countable only after it was already inherited by
RecursiveArrayIterator. Thus the interface was missing in RAI.
2012-06-19 18:32:44 +02:00
Nikita Popov cce4764f13 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed bug RecursiveArrayIterator does not implement Countable

Conflicts:
	ext/spl/spl_array.c
2012-06-19 18:08:22 +02:00
Nikita Popov 4cba4c6193 Fixed bug RecursiveArrayIterator does not implement Countable
ArrayIterator implemented Countable only after it was already inherited by
RecursiveArrayIterator. Thus the interface was missing in RAI.
2012-06-19 18:04:14 +02:00
Anatoliy Belsky 34bd1c941b Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  sync zip ext version with pecl
2012-06-19 17:17:11 +02:00
Anatoliy Belsky e793539678 sync zip ext version with pecl 2012-06-19 17:15:56 +02:00
Anatoliy Belsky 5c001d42d4 one more correction for COM upgrading notes 2012-06-19 14:58:06 +02:00
Anatoliy Belsky df138c5719 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  one more correction for COM upgrading notes
2012-06-19 14:51:52 +02:00
Anatoliy Belsky f072662621 one more correction for COM upgrading notes 2012-06-19 14:42:59 +02:00
Anatoliy Belsky 0a65b661e4 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  split gzgetc_basic.phpt for zlib 1.2.7
2012-06-19 14:12:54 +02:00
Anatoliy Belsky a8948d0808 split gzgetc_basic.phpt for zlib 1.2.7 2012-06-19 14:08:34 +02:00
Anatoliy Belsky d8ba49a2c7 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  com ext upgrading correction
2012-06-18 22:08:44 +02:00
Anatoliy Belsky 592917f91f com ext upgrading correction 2012-06-18 22:07:19 +02:00
Anatoliy Belsky 1c4e48650c com ext upgrading infos 2012-06-18 22:04:40 +02:00
Anatoliy Belsky b408028b88 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  com ext upgrading info
2012-06-18 21:59:27 +02:00
Anatoliy Belsky 6176b96a23 com ext upgrading info 2012-06-18 21:56:17 +02:00
Anatoliy Belsky c56ff2bf75 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Reverted the BC fix regarding to #57905, test adopted
2012-06-17 16:10:56 +02:00
Anatoliy Belsky d3780f1f90 Reverted the BC fix regarding to #57905, test adopted
New 0.10.1 has a stronger archive integrity check. Restoring
the old behaviour of libzip < 0.10.1 makes no sense at this
place.
2012-06-17 16:04:36 +02:00
stealth35 11a202ef50 Fix potential leak in cli server 2012-06-16 00:56:54 +03:00
Anatoliy Belsky 280e3a4ec8 Fixed bug #62312 ext\sockets\tests\socket_import_stream-4.phpt fails 2012-06-14 18:02:53 +02:00
Anatoliy Belsky 3faebe2bec Fix bug #62270 Test bug - ext/fileinfo/tests/finfo_open_error-win32 2012-06-14 17:59:39 +02:00
Johannes Schlüter fef691b142 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Merge PHP 5.3.14 NEWS
  re-add 61755 to NEWS
2012-06-13 10:36:49 +02:00
Johannes Schlüter 26cb570615 Merge PHP 5.3.14 NEWS 2012-06-13 10:35:58 +02:00
Stanislav Malyshev 79e44c394f re-add 61755 to NEWS 2012-06-12 11:53:24 -07:00
Stanislav Malyshev f0d6059389 re-add 61755 to NEWS 2012-06-12 11:52:22 -07:00
Stanislav Malyshev c7be96b08f Revert "Add PBKDF2 support via openssl()"
This reverts commit b5b8ea1050.
Looks like we don't have agreement yet on this for 5.4. Let's keep it in 5.5 for now.
2012-06-12 11:22:49 -07:00
Stanislav Malyshev a2bfad051d Revert "Rename openssl_pkcs5_pbkdf2_hmac() to something that doesn't sound like a spell."
This reverts commit bccd1e672f.
Looks like we don't have agreement yet on this for 5.4. Let's keep it in 5.5 for now.
2012-06-12 11:21:54 -07:00
Stanislav Malyshev f8cc363841 add CVE 2012-06-12 11:19:08 -07:00
Scott MacVicar bccd1e672f Rename openssl_pkcs5_pbkdf2_hmac() to something that doesn't sound like a spell.
Summary:
Stas pointed out that this is named pretty poorly. Go for openssl_pbkdf2()
2012-06-11 15:41:41 -07:00
Scott MacVicar b5b8ea1050 Add PBKDF2 support via openssl()
Summary:
No easy way to put these in the hash extension since we don't really support optional
parameters to certain algorithms. Implemented in openssl for now since it has it already
and is pretty stable.

Only SHA1 is confirmed to work as an algorithm but openssl has a parameter so it can be
changed in the future.

Will backport to 5.4 potentially with Stas' approval.

Test Plan:
Ran newly added tests which came from RFC 6070
2012-06-11 13:35:25 -07:00
Matt Ficken a18cede1c5 Fix bug #62271 test bug - ext/wddx/tests/bug48562.phpt 2012-06-11 17:00:36 +02:00
Stanislav Malyshev b55e69285b typo fix 2012-06-10 20:38:22 -07:00
David Soria Parra 51a5e98af6 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Make travis silent
2012-06-10 18:17:49 +04:00
David Soria Parra f464ffd780 Make travis silent
Travis will always build all branches. As we just have a .travis.yml
on master, travis will go ahead and checkout PHP-5.3. It fails and
then sends mails. We really don't want to get spammed, so we add
a .travis.yml that is just silent.
2012-06-10 18:17:37 +04:00
David Soria Parra b9babd22e0 Merge branch 'PHP-5.3' into PHP-5.4
By Stanislav Malyshev (1) and michelangelo (1)
* PHP-5.3:
  Adding a test for ext/posix/tests/posix_getegid_basic.phpt
  typo
2012-06-10 17:08:02 +04:00
michelangelo cda14b995c Adding a test for ext/posix/tests/posix_getegid_basic.phpt 2012-06-10 17:07:49 +04:00
Gustavo André dos Santos Lopes 503358c179 Fix bug #62266
Custom extension segfaults during xmlParseFile with FPM SAPI
because the regular list is not prepared during the MINIT phase
and our custom external entity loader tries to open PHP streams.
2012-06-09 17:29:47 +01:00
Stanislav Malyshev c4cc43169c rearrange news 2012-06-08 13:27:24 -07:00
Stanislav Malyshev ba8333cdb0 typo 2012-06-08 12:23:51 -07:00
Pierrick Charron c467e81c86 NEWS File 2012-06-08 18:02:49 +02:00
Stanislav Malyshev 17c0ff1194 typo 2012-06-08 01:24:49 -07:00
Stanislav Malyshev 59eaa7c877 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  improve overflow checks
  fix potential overflow in _php_stream_scandir
2012-06-08 01:22:46 -07:00
Stanislav Malyshev fc74503792 improve overflow checks 2012-06-08 01:21:37 -07:00
Stanislav Malyshev 0e3a650e74 add NEWS 2012-06-07 23:11:28 -07:00
Stanislav Malyshev 10e8da1738 fix potential overflow in _php_stream_scandir 2012-06-07 23:09:18 -07:00
Stanislav Malyshev 7d04e0fb2e fix potential overflow in _php_stream_scandir 2012-06-07 23:08:35 -07:00
Anatoliy Belsky d24d5b62c1 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  set current versions for libzip and zip ext
2012-06-07 22:37:32 +02:00
Anatoliy Belsky baacc2cb13 set current versions for libzip and zip ext 2012-06-07 22:32:03 +02:00
Anatoliy Belsky 7907dc4d66 updated NEWS 2012-06-07 21:45:30 +02:00
Anatoliy Belsky d206206c10 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  updated NEWS
2012-06-07 21:44:08 +02:00
Anatoliy Belsky 9ecb67d5a4 updated NEWS 2012-06-07 21:43:07 +02:00
Anatoliy Belsky 5ebdc46aa0 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  zip windows fixes
  fixed bc break related to #57905
  fixed a bit overlooked from the last libzip port
  brought the fix for #47667 back
  fixed zip entry freeing
  rechecked the merged libzip, took also the indents from the original to avoid confusion next time
  fixed a double freeing crash
  fixed header include
  initial libzip upgrade patch to 0.10.1
  - BFN

Conflicts:
	NEWS
2012-06-07 21:06:31 +02:00
Anatoliy Belsky bde0e8c2a1 zip windows fixes 2012-06-07 21:01:32 +02:00
Anatoliy Belsky 8ca457f64d fixed bc break related to #57905 2012-06-07 21:01:32 +02:00
Anatoliy Belsky e883892664 fixed a bit overlooked from the last libzip port 2012-06-07 21:01:32 +02:00
Anatoliy Belsky b8cdc731b8 brought the fix for #47667 back 2012-06-07 21:01:32 +02:00
Anatoliy Belsky a37e84e549 fixed zip entry freeing 2012-06-07 21:01:32 +02:00
Anatoliy Belsky f4a44f18b8 rechecked the merged libzip, took also the indents from the original to
avoid confusion next time
2012-06-07 21:01:31 +02:00
Anatoliy Belsky a39bcfc5ee fixed a double freeing crash 2012-06-07 21:01:31 +02:00
Anatoliy Belsky 9a2365412e fixed header include 2012-06-07 21:01:31 +02:00
Anatoliy Belsky 335a11b14b initial libzip upgrade patch to 0.10.1 2012-06-07 21:01:31 +02:00
Felipe Pena 7cae4ff02c - BFN 2012-06-07 14:23:17 -03:00
Felipe Pena 7881158690 - Fix merge 2012-06-07 14:21:10 -03:00
Felipe Pena 018a9b321f Merge commit '15213768e6cc098ab4e53cacc3b5eb86fa85284a' into PHP-5.3 2012-06-07 14:18:34 -03:00
Pierrick Charron c975320eb9 Regenerated files 2012-06-07 18:04:15 +02:00
Pierrick Charron 8e65ce35b9 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Regenerated files
2012-06-07 18:02:49 +02:00
Pierrick Charron 4e6f27f4db Regenerated files 2012-06-07 18:02:27 +02:00
Pierrick Charron 494c170e6f Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed bug #51094 (parse_ini_file() with INI_SCANNER_RAW cuts a value that includes a semi-colon)
2012-06-07 17:45:43 +02:00
Pierrick Charron fed5923dbc Fixed bug #51094 (parse_ini_file() with INI_SCANNER_RAW cuts a value that includes a semi-colon)
Modify the scanner to check if the first char of the raw data is an opening " in which case we
need to find the closing one. Otherwise just search for the next end of value char [\r\n;\000]
2012-06-07 17:44:20 +02:00
David Soria Parra deac80eb9a Merge branch 'PHP-5.3' into PHP-5.4
By Till Klampaeckel
* PHP-5.3:
  Don't depend on a fixed path for PHP shebang but use /usr/bin/env (cherry picked from commit 89c5d981603ed4a2a54f86c20cec4f263c58ded6)
2012-06-07 09:44:59 +02:00
Till Klampaeckel c56ff39c05 Don't depend on a fixed path for PHP shebang but use /usr/bin/env
(cherry picked from commit 89c5d981603ed4a2a54f86c20cec4f263c58ded6)
2012-06-07 09:44:49 +02:00
Xinchen Hui 83542dcf3b Merge branch 'PHP-5.3' into PHP-5.4
By Gustavo André dos Santos Lopes (4) and others
via Felipe Pena (1) and Xinchen Hui (1)
* PHP-5.3:
  Remove unused codes
  based on microsoft's description,the direct convert from FILETIME struct to __int64 is unsafe.
  Fix ext/intl build on ICU < 4.8
  Optimization in ext/intl/msgformat
  Fixed tests in ext/intl
  Changed XFAILed collator_get_sort_key.phpt
2012-06-07 14:32:47 +08:00
Xinchen Hui 6ecc9f1d9d Remove unused codes 2012-06-07 14:31:35 +08:00
slayercat d9810af45a based on microsoft's description,the direct convert from FILETIME struct to __int64 is unsafe.
via http://technet.microsoft.com/en-us/library/ms724284(v=vs.85).aspx

"Do not cast a pointer to a FILETIME structure to either a
ULARGE_INTEGER* or __int64* value because it can cause alignment faults on 64-bit Windows."
2012-06-07 14:28:05 +08:00
Stanislav Malyshev e118a0794a merge 5.3 entries 2012-06-06 23:20:14 -07:00
Stanislav Malyshev db1e425b1a restore NEWS 2012-06-06 23:00:33 -07:00
Gustavo André dos Santos Lopes c1ac325228 Fix ext/intl build on ICU < 4.8 2012-06-06 12:10:00 +02:00
Gustavo André dos Santos Lopes 52d541a314 Optimization in ext/intl/msgformat
Don't transform the string to make it apostrophe friendly in ICU 4.8+
as that it is now the default.
2012-06-06 11:36:00 +02:00
Gustavo André dos Santos Lopes 45b3fa4dee Fixed tests in ext/intl
21 is not a valid value for UNUM_PADDING_POSITION. Changed the test to
use 2 instead.

Remove ICU 4.2- test. No one cares.
2012-06-05 16:47:00 +02:00
Felipe Pena 15213768e6 - Fixed bug #62227 (Invalid phar stream path causes crash) 2012-06-04 20:07:14 -03:00
Gustavo André dos Santos Lopes 9b233b7e5e Changed XFAILed collator_get_sort_key.phpt
Ressurected and limited to ICU 4.8 in the hope that the sort keys
will remain stable in more recent ICU versions. I have only tested
with ICU 4.8 so far.
2012-06-04 10:18:24 +02:00
Felipe Pena 8779a9aad5 Merge commit 'e59b6dc0ae803d49c3f620818285f98dfb61fd57' into PHP-5.4 2012-06-03 19:01:50 -03:00
Felipe Pena 4fc49c04df Merge commit 'e59b6dc0ae803d49c3f620818285f98dfb61fd57' into PHP-5.3 2012-06-03 19:00:49 -03:00
Felipe Pena 60c5f9910f Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  - Optimize comparison between same HashTable pointer
  - Fixed bug #62205 (php-fpm segfaults (null passed to strstr))
  - fix missing include for unix sockets
  - Comment unused function to avoid warnings
2012-06-03 18:20:26 -03:00
Felipe Pena d57b278ad1 - Optimize comparison between same HashTable pointer 2012-06-03 18:16:57 -03:00
Felipe Pena e59b6dc0ae - Fixed information leak in ext exif (discovered by Martin Noga, Matthew "j00ru" Jurczyk, Gynvael Coldwind) 2012-06-03 15:23:07 -03:00
Jerome Loyet 1fa8ecd082 Merge branch 'PHP-5.4' of git.php.net:php-src into PHP-5.4
* 'PHP-5.4' of git.php.net:php-src: (27 commits)
  Fixed Bug #62202 (ReflectionParameter::getDefaultValue() memory leaks with constant)
  sort NEWS
  fix bug #55042 - erealloc without updating pointer
  Fix bug #62186 readline fails to compile
  fix unchecked emalloc (cherry picked from commit 158d8a6b08)
  fix test
  fix test
  Typofix in comment in proc_open.c
  fix CVE-2012-2143
  updated the libmagic patch after Felipes regex fix
  Fix bug #62150 Test Bug - ext/fileinfo/tests/finfo_open_error.phpt
  Bug #62177 deactivate the linux test version on win
  Fix bug #62177 Test Bug - finfo_file_regex.phpt
  Fixed bug #62176 Test Bug - sapi/cli/tests/bug61546.phpt
  fix unchecked emalloc
  add CVE
  add bug 62146
  add bug #62082
  sync with HEAD
  sync with HEAD
  ...
2012-06-01 11:30:49 +02:00
Jerome Loyet 238caeb63c - Fixed bug #62205 (php-fpm segfaults (null passed to strstr)) 2012-06-01 11:23:01 +02:00
Jerome Loyet ec4a1d576b - fix missing include for unix sockets 2012-06-01 11:22:18 +02:00
Jerome Loyet 43ec708882 - Comment unused function to avoid warnings 2012-06-01 11:22:02 +02:00
Jerome Loyet 38ca8cb7a1 - Fixed bug #62205 (php-fpm segfaults (null passed to strstr)) 2012-06-01 11:18:48 +02:00
Jerome Loyet 35abf3f20c - fix missing include for unix sockets 2012-06-01 11:16:53 +02:00
Jerome Loyet 59e0930d37 - Comment unused function to avoid warnings 2012-06-01 11:16:00 +02:00
Xinchen Hui b548d9ad2e Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed Bug #62202 (ReflectionParameter::getDefaultValue() memory leaks with constant)
2012-06-01 15:00:02 +08:00
Xinchen Hui 1f5327a602 Fixed Bug #62202 (ReflectionParameter::getDefaultValue() memory leaks with constant) 2012-06-01 14:57:27 +08:00
Reeze Xia 13a9555342 Implemented FR #61602 Allow access to name of constant used as default value
This is an improved commit for FR #61602, this fixed the previous
commit 054f3e3's C99 compiler compatibility issue
2012-05-31 23:31:00 +08:00
Stanislav Malyshev 5ebb0e520f sort NEWS 2012-05-30 22:34:29 -07:00
Stanislav Malyshev ed6ce83101 fix bug #55042 - erealloc without updating pointer 2012-05-30 22:26:26 -07:00
Johannes Schlüter 303dd7f346 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  fix unchecked emalloc (cherry picked from commit 158d8a6b08)
2012-05-31 01:16:42 +02:00
Johannes Schlüter 428dddd3e8 Fix bug #62186 readline fails to compile 2012-05-31 01:15:22 +02:00
Stanislav Malyshev fa05f038cb fix unchecked emalloc
(cherry picked from commit 158d8a6b08)
2012-05-30 21:37:28 +02:00
Stanislav Malyshev 9b98cf7865 fix test 2012-05-29 23:52:47 -07:00
Stanislav Malyshev abe6362716 fix test 2012-05-29 23:52:47 -07:00
Xinchen Hui 7511f972fd Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Typofix in comment in proc_open.c
2012-05-30 14:43:55 +08:00
Jille Timmermans a331f43f8c Typofix in comment in proc_open.c 2012-05-30 14:42:39 +08:00
Stanislav Malyshev 692b3bcd88 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  fix CVE-2012-2143
2012-05-29 23:08:04 -07:00
Stanislav Malyshev aab49e934d fix CVE-2012-2143 2012-05-29 23:07:04 -07:00
Anatoliy Belsky 6074da9809 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  updated the libmagic patch after Felipes regex fix
2012-05-29 17:41:57 +02:00
Anatoliy Belsky 8d5e953a19 updated the libmagic patch after Felipes regex fix 2012-05-29 17:38:30 +02:00
Anatoliy Belsky c0e046a130 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix bug #62150 Test Bug - ext/fileinfo/tests/finfo_open_error.phpt
  Bug #62177 deactivate the linux test version on win
  Fix bug #62177 Test Bug - finfo_file_regex.phpt
2012-05-29 16:43:20 +02:00
Matt Ficken ad0371ac7e Fix bug #62150 Test Bug - ext/fileinfo/tests/finfo_open_error.phpt 2012-05-29 16:38:57 +02:00
Matt Ficken b4b0aaae93 Bug #62177 deactivate the linux test version on win 2012-05-29 16:37:19 +02:00
Matt Ficken dbc727373c Fix bug #62177 Test Bug - finfo_file_regex.phpt 2012-05-29 16:31:47 +02:00
Anatoliy Belsky c4f9b01422 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed bug #62176 Test Bug - sapi/cli/tests/bug61546.phpt
  sync with HEAD
  Fixed bug #61218 (the previous patch was not enough restritive on fcgi name string checks)
  Fixed bug #61218 (FPM drops connection while receiving some binary valuesin FastCGI requests)
  - Fixed bug #62033 (USR2 signal was sent even if not catch when daemonize and an error occured)
  - Fixed bug #62160 (Add process.priority to set nice(2) priorities)
  - add missing headers to avoid warnings
  - Fixed bug #62153 (when using unix sockets, multiples FPM instances can be launched without errors)
  - Fixed bug #62033 (php-fpm exits with status 0 on some failures to start)

Conflicts:
	NEWS
	sapi/fpm/fpm/fpm_main.c
2012-05-29 12:19:20 +02:00
Matt Ficken 4054890b26 Fixed bug #62176 Test Bug - sapi/cli/tests/bug61546.phpt 2012-05-29 11:41:44 +02:00
Stanislav Malyshev 158d8a6b08 fix unchecked emalloc 2012-05-28 18:54:15 -07:00
Stanislav Malyshev 213119c83f add CVE 2012-05-28 18:54:02 -07:00
Stanislav Malyshev 0a90643e53 add bug 62146 2012-05-28 17:43:36 -07:00
Stanislav Malyshev 4b04bf8793 add bug #62082 2012-05-28 17:38:33 -07:00
Nuno Lopes 339508d6ac sync with HEAD 2012-05-27 20:14:31 -04:00
Nuno Lopes 72911237b5 sync with HEAD 2012-05-27 20:13:09 -04:00
Jerome Loyet 773e85a788 Fixed bug #61218 (the previous patch was not enough restritive on fcgi name string checks) 2012-05-26 19:37:09 +02:00
Jerome Loyet 2f7bd57f93 Fixed bug #61218 (the previous patch was not enough restritive on fcgi name string checks) 2012-05-26 19:36:01 +02:00
Jerome Loyet 60cca8b9c9 Fixed bug #61218 (FPM drops connection while receiving some binary values in FastCGI requests) 2012-05-26 19:27:45 +02:00
Jerome Loyet e7ff3e839b Fixed bug #61218 (FPM drops connection while receiving some binary valuesin FastCGI requests) 2012-05-26 19:27:02 +02:00
Jerome Loyet e052da3a6b Fixed bug #62033 (USR2 signal was sent even if not catch when daemonize and an error occured) 2012-05-26 18:48:40 +02:00
Jerome Loyet 0298b92b69 - Fixed bug #62033 (USR2 signal was sent even if not catch when daemonize and an error occured) 2012-05-26 18:44:35 +02:00
Jerome Loyet decc394a20 - Fixed bug #62160 (Add process.priority to set nice(2) priorities) 2012-05-26 18:24:08 +02:00
Jerome Loyet f6655b62d8 - Fixed bug #62160 (Add process.priority to set nice(2) priorities) 2012-05-26 18:22:12 +02:00
Jerome Loyet 0037598252 - add missing headers to avoid warnings 2012-05-26 17:38:08 +02:00
Jerome Loyet 63e11f9025 - add missing headers to avoid warnings 2012-05-26 17:37:33 +02:00
Jerome Loyet d90003b549 - Fixed bug #62153 (when using unix sockets, multiples FPM instances can be launched without errors) 2012-05-25 21:22:54 +02:00
Jerome Loyet a7761262f7 - Fixed bug #62153 (when using unix sockets, multiples FPM instances can be launched without errors) 2012-05-25 21:21:44 +02:00
Jerome Loyet c2f33fb129 - Fixed bug #62033 (php-fpm exits with status 0 on some failures to start) 2012-05-25 21:13:57 +02:00
Jerome Loyet bf9120ecae - Fixed bug #62033 (php-fpm exits with status 0 on some failures to start) 2012-05-25 21:10:17 +02:00
Xinchen Hui 91ad40d9bb Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed bug #62128 superfluous ";"
2012-05-25 22:33:17 +08:00
Xinchen Hui c3547f1935 Fixed bug #62128 superfluous ";" 2012-05-25 22:31:49 +08:00
Reeze Xia 1d2f619049 Fixed bug #61964 (finfo_open with directory cause invalid free) 2012-05-25 18:55:34 +08:00
Anatoliy Belsky 16a592b13a Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed bug #62149 Test Bug - ext/curl/tests/bug61948
  Fixed bug #62148 mail_skipif doesn't skip imap tests on Release Build
2012-05-25 10:52:38 +02:00
Matt Ficken 86d2fafded Fixed bug #62149 Test Bug - ext/curl/tests/bug61948 2012-05-25 10:44:59 +02:00
Matt Ficken 4aac4da673 Fixed bug #62148 mail_skipif doesn't skip imap tests on Release Build 2012-05-25 10:34:33 +02:00
Anatoliy Belsky 6fb0e4a401 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed bug #62147 test bug - popen_pclose_basic-win32
2012-05-25 09:55:53 +02:00
Matt Ficken d4d36fba28 Fixed bug #62147 test bug - popen_pclose_basic-win32 2012-05-25 09:53:51 +02:00
Johannes Schlüter 3cd50ca714 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix bug #62146 	com_dotnet cannot be built shared, tested by Anatoliy
  Those changes are in 5.3.15
  - BFN
2012-05-25 00:23:51 +02:00
Johannes Schlüter 8fc9df3f67 Fix bug #62146 com_dotnet cannot be built shared, tested by Anatoliy 2012-05-25 00:22:25 +02:00
Johannes Schlüter cfea8e5d04 Those changes are in 5.3.15 2012-05-25 00:20:29 +02:00
Felipe Pena 6c9056ceb7 Merge branch 'PHP-5.3' of git.php.net:php-src into PHP-5.3 2012-05-24 13:45:36 -03:00
Felipe Pena abe0f17e88 - BFN 2012-05-24 13:45:03 -03:00
Felipe Pena 84b2c39920 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  - Fixed magic file regex support
2012-05-24 13:43:35 -03:00
Felipe Pena 11b4f3becd - Fixed magic file regex support 2012-05-24 13:42:47 -03:00
Xinchen Hui a10da87c6a Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed bug #62073 (Different ways of iterating over an SplMaxHeap result in different keys)
2012-05-24 23:34:14 +08:00
Xinchen Hui bde86a6639 Fixed bug #62073
(Different ways of iterating over an SplMaxHeap result in in different keys)
2012-05-24 23:31:05 +08:00
Gustavo André dos Santos Lopes 04fd0b1098 Merge branch '5.3' into 5.4 2012-05-24 14:33:24 +02:00
Gustavo André dos Santos Lopes 85c777d2f1 Fixed bug #55610: ResourceBundle and Traversable 2012-05-24 14:33:05 +02:00
Gustavo André dos Santos Lopes 888e77ff73 Fixed last commit on 5.4
There's no change from the intended behavior. If INTL_G(default_locale)
is NULL, the default ICU locale, as given by locale_get_default() in
master, will still be used by ures_open().
2012-05-24 14:17:52 +02:00
Anatoliy Belsky 72c7cfe6f2 Fixed bug #62140 ext\standard\tests\file\tempnam_variation7-win32.phpt fails 2012-05-24 13:58:42 +02:00
Gustavo André dos Santos Lopes 92039fed22 Changed ResourceBundle constructor behavior
null is now accepted for two first (mandatory arguments).

Passing null as the package name causes NULL to be passed to ICU  and
the default ICU data to be loaded.

Passing null as the locale name causes the default locale to be used.
2012-05-24 13:50:59 +02:00
Anatoliy Belsky 0e12a778df Fix bug #62139 ext\standard\tests\file\rename_variation13-win32.phpt fails 2012-05-24 13:26:32 +02:00
Anatoliy Belsky 0dc9b0e708 Fixed bug #62138 ext\standard\tests\dir\dir_variation8-win32.phpt fails 2012-05-24 12:39:00 +02:00
Anatoliy Belsky b5511dcfd7 Fix bug #62137 ext\phar\tests\fatal_error_webphar.phpt fails 2012-05-24 12:04:38 +02:00
Gustavo André dos Santos Lopes f1969d4b4c Update NEWS 2012-05-24 11:14:36 +02:00
Gustavo André dos Santos Lopes e8009e2dca Merge branch '5.3' into 5.4 2012-05-24 11:08:55 +02:00
Gustavo André dos Santos Lopes 2da2de46a8 Fixed bug #60785
Memory leak in IntlDateFormatter constructor.

udat_setCalendar() clones the calendar before it adopts it,
so we were leaking the original calendar.

Also we now validate the calendar type.
2012-05-24 11:06:21 +02:00
Rasmus Lerdorf 523fd2c244 Fix broken apache_request_headers test
This test depends on the default_charset setting, so set it to
UTF-8 for consistent output
2012-05-23 17:38:23 -07:00
Gustavo André dos Santos Lopes acd711685a Fixed bug #62097
This fixes the fix for bug #54547 in 32-bit machines by accepting
float comparisons in 32-bit machines as long as the integer is
not larger than the mantissa.
2012-05-23 18:55:36 -05:00
Gustavo André dos Santos Lopes 0838a2b7c5 Merge branch '5.3' into 5.4 2012-05-23 15:52:32 +02:00
Gustavo André dos Santos Lopes e08566c613 Fixed bug #62017
IntlDateFormatter constructor would release some resources
under certain error conditions.
2012-05-23 15:52:19 +02:00
Reeze Xia 9205c4fd62 Fixed bug #62073 (Different ways of iterating over an SplMaxHeap result in different keys) 2012-05-23 20:42:06 +08:00
Gustavo André dos Santos Lopes c449bf1443 Fixed bug number in NEWS 2012-05-23 13:42:24 +02:00
Gustavo André dos Santos Lopes 1c19146f46 Updated NEWS w.r.t to ext/intl changes 2012-05-23 13:35:11 +02:00
Gustavo André dos Santos Lopes 8ee8ccda19 Merge branch '5.3' into 5.4
Conflicts:
	sapi/fpm/fpm/fpm_main.c
2012-05-23 13:27:21 +02:00
Gustavo André dos Santos Lopes 1eff3b01b8 Fixed bug #6208: memory leak in grapheme_extract() 2012-05-23 13:25:45 +02:00
Gustavo André dos Santos Lopes 86ea921291 Fixed bug #62082
This was a buffer overflow in internal function
get_icu_disp_value_src_php().
2012-05-23 13:25:42 +02:00
Gustavo André dos Santos Lopes 07c0d714a5 Fixed bug #62081
Constructor of IntlDateFormatter would leak if called twice.

Made calling it more than once error out before starting
using resources.
2012-05-23 13:25:37 +02:00
Gustavo André dos Santos Lopes 51286bd8e5 Fixed bug #62070
Collator::getSortKey() was returning an unterminated string
due the length given to RETURN_STRINGL being off by one.
2012-05-23 13:25:32 +02:00
Jerome Loyet 1299503936 - Fixed bug #61026 (FPM pools can listen on the same address) 2012-05-23 11:53:04 +02:00
Jerome Loyet 5d61e56dd7 - Fixed bug #61026 (FPM pools can listen on the same address) 2012-05-23 11:52:04 +02:00
Jerome Loyet d236c1af8a Merge branch 'PHP-5.4' of git.php.net:php-src into PHP-5.4
* 'PHP-5.4' of git.php.net:php-src:
  Fix bug #62112: number_format() is not binary safe
2012-05-23 11:41:29 +02:00
Jerome Loyet 0b44f16ea2 - Fixed bug #61839 (Unable to cross-compile PHP with --enable-fpm) 2012-05-23 11:40:22 +02:00
Gustavo André dos Santos Lopes 3e62aae1b4 Fix bug #62112: number_format() is not binary safe
The bug report actually urges PHP 5.3's behavior to be
reinstated -- that is, make "\0", when used as a separator,
be the same as no separator at all. I believe that is not a
proper course of action and that "\0" being interpreted as
no seperator was a bug in PHP 5.3.

Using "" for no separator, in both 5.3 and 5.4, before and
after this change, causes no separator to be used, so
there is no functionality loss.
2012-05-23 11:37:27 +02:00
Jerome Loyet a07d76c0ba - Fixed bug #61295 (php-fpm should not fail with commented 'user' for non-root start) 2012-05-23 11:31:33 +02:00
Jerome Loyet 812d248193 - Fixed bug #61295 (php-fpm should not fail with commented 'user' for non-root start) 2012-05-23 11:30:27 +02:00
Jerome Loyet f4c38016b6 - Fix help message for '-R' 2012-05-23 10:36:45 +02:00
Jerome Loyet 757e3fc3d5 - fix help message for '-R' 2012-05-23 10:35:37 +02:00
Jerome Loyet 629273d11b - add missing help message for '-R' 2012-05-23 10:34:16 +02:00
Jerome Loyet 06c7c3674b - Fixed bug #61835 (php-fpm is not allowed to run as root) 2012-05-23 10:32:42 +02:00
Jerome Loyet 7b396c078c - Fixed bug #61835 (php-fpm is not allowed to run as root) 2012-05-23 09:49:13 +02:00
Xinchen Hui 8475c5b98d Merge remote-tracking branch 'origin/PHP-5.3' into PHP-5.4 2012-05-23 13:52:36 +08:00
Xinchen Hui 5b8316188c Revert NEWS 2012-05-23 13:52:18 +08:00
Xinchen Hui df481764f3 Revert "Implemented FR #61602 Allow access to name of constant used as default value"
This reverts commit 054f3e3ce5.

See: http://news.php.net/php.cvs/69137 and the author confirmed.
Will commit later after the author fixed this then make a new PR.

Conflicts:

	ext/reflection/php_reflection.c
2012-05-23 13:50:12 +08:00
Xinchen Hui f733173b1f Fix typo while resolving conflicts 2012-05-23 13:43:49 +08:00
Xinchen Hui a7df6ce664 Revert "Implemented FR #61602 Allow access to name of constant used as default value"
This reverts commit 054f3e3ce5.

See: http://news.php.net/php.cvs/69137 and the author confirmed.
Will commit later after the author fixed this then make a new PR.

Conflicts:

	ext/reflection/php_reflection.c
2012-05-23 13:39:00 +08:00
Anatoliy Belsky 29876c5c29 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix bug #62109 tests\basic\bug46313-win.phpt fails
  - Fixed bug #61045 (fpm don't send error log to fastcgi clients)
2012-05-22 18:43:10 +02:00
Anatoliy Belsky 621fddab93 Fix bug #62109 tests\basic\bug46313-win.phpt fails 2012-05-22 18:41:03 +02:00
Jerome Loyet bdf0c9ccbe Merge branch 'PHP-5.4' of git.php.net:php-src into PHP-5.4
* 'PHP-5.4' of git.php.net:php-src:
  add news for new pg_ functions
2012-05-22 08:47:40 +02:00
Jerome Loyet dce259099d - Fixed bug #61045 (fpm don't send error log to fastcgi clients) 2012-05-22 08:40:37 +02:00
Jerome Loyet d1e529c1cb - fix NEWS for bug #61812 2012-05-22 08:38:09 +02:00
Jerome Loyet faca4e08b4 - Fixed bug #61045 (fpm don't send error log to fastcgi clients) 2012-05-22 08:34:27 +02:00
Stanislav Malyshev a472649016 add news for new pg_ functions 2012-05-21 16:15:12 -07:00
Felipe Pena 074d361d64 - Fix the fix (typo s/AIX/_AIX/g) 2012-05-21 08:54:59 -03:00
Xinchen Hui 4c9a11c857 Use free instead of efree 2012-05-21 19:02:45 +08:00
Xinchen Hui bbcea230e1 Use emalloc instead of malloc 2012-05-21 18:58:19 +08:00
Anatoliy Belsky fbb86bd7b3 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix bug #62066 Test Bug - ext/tidy/tests/004.phpt
2012-05-21 12:52:10 +02:00
Matt Ficken c973fef48d Fix bug #62066 Test Bug - ext/tidy/tests/004.phpt 2012-05-21 12:51:24 +02:00
Anatoliy Belsky 77e70b391c Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed bug #62068 Test bug - gmp_nextprime and 022
  Fix: 62067 Moved comments to FILE section
  - BFN

Conflicts:
	NEWS
2012-05-21 12:37:59 +02:00
Matt Ficken 645d65f3e3 Fixed bug #62068 Test bug - gmp_nextprime and 022 2012-05-21 12:31:16 +02:00
Dmitry Stogov 2ae8d2fbfb Fixed bug #61998 (Using traits with method aliases appears to result in crash during execution) 2012-05-21 13:57:41 +04:00
Dmitry Stogov c8f47a8e7c Fixed bug #61998 (Using traits with method aliases appears to result in crash during execution) 2012-05-21 13:46:07 +04:00
Felipe Pena c5fcd9f5af - BFN 2012-05-20 19:41:15 -03:00
Felipe Pena ffe8303f24 - Fixed bug #62025 (__ss_family was changed on AIX 5.3) 2012-05-20 19:37:20 -03:00
zoe slattery 867447f420 Fix: 62067 Moved comments to FILE section 2012-05-19 16:34:16 +01:00
zoe slattery 778d69ddfe Fix: 62067 Moved comments to FILE section 2012-05-19 16:33:36 +01:00
Felipe Pena c9331a3ef2 - BFN 2012-05-18 21:26:24 -03:00
Felipe Pena 79d52503a4 - BFN 2012-05-18 19:38:02 -03:00
Felipe Pena 88275e547f Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  - Fixed bug #62064 (memory leak in the XML Writer module)
2012-05-18 19:23:42 -03:00
Felipe Pena 6d928fd26d - Fixed bug #62064 (memory leak in the XML Writer module) 2012-05-18 19:23:29 -03:00
Christopher Jones 29a85d49ae Dummy (whitespace) change so Dan Brown can verify snap generation from git
PHP snapshots were still pulling from SVN and were out of date. This
is a dummy PHP 5.4-only commit so Dan can verify what he's updated for
git in the backend.
2012-05-16 10:13:34 -07:00
Johannes Schlüter 89e7a195bc Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  PHP 5.3.15-dev

Conflicts:
	configure.in
	main/php_version.h
2012-05-16 16:50:33 +02:00
Johannes Schlüter 72a9b595ca PHP 5.3.15-dev 2012-05-16 16:49:35 +02:00
Johannes Schlüter 67039363cd Merge branch 'PHP-5.3' of git.php.net:/php-src into PHP-5.3
* 'PHP-5.3' of git.php.net:/php-src:
  Fix for bug#62046
2012-05-16 16:46:08 +02:00
Johannes Schlüter 1f6f619451 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  fd fix
  fix bug #61065 (cherry picked from commit a10e778bfb)
2012-05-16 16:40:29 +02:00
Stanislav Malyshev 6e51989501 fd fix 2012-05-16 16:35:16 +02:00
Stanislav Malyshev 4eb802bb14 fix bug #61065
(cherry picked from commit a10e778bfb)
2012-05-16 16:30:29 +02:00
andrey 4d2d8e8717 Merge branch 'PHP-5.3' into PHP-5.4
Conflicts:
	ext/mysqlnd/mysqlnd_ps.c

merge fix for bug#62046
2012-05-16 15:59:39 +02:00
andrey d4afbd487a Fix for bug#62046
Bug#62046 mysqli@mysqlnd can't iterate over stored sets after call to
mysqli_stmt_reset().

Stmt's state was changed to STMT_PREPARED and leads the driver to think
that the stmt was just prepared. Because result set exist also for only
prepared but not executed sets, the check for stmt->result isn't any good.
There is a result set, because as response for COM_PREPARE the server sends
metadata and metadata is part of a result set. After COM_EXECUTE the server
sends metadata again, which could be different and in this case more correct.
2012-05-16 14:28:55 +02:00
Felipe Pena 1abcd81872 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  - Fixed bug #55299 (multiple null pointer in win32/registry.c)
2012-05-16 08:40:45 -03:00
Felipe Pena 93c91c733c - Fixed bug #55299 (multiple null pointer in win32/registry.c) 2012-05-16 08:40:12 -03:00
Stanislav Malyshev d84fa39667 Revert "Update test to fix breakage caused by the previous commit."
This reverts commit 05c8d4766c.
Connected to revert 7bbd5521d2.
2012-05-15 23:25:06 -07:00
Stanislav Malyshev e36a5a1197 fix test 2012-05-15 23:09:46 -07:00
Stanislav Malyshev be8b1c74cf to 5.4.5-dev 2012-05-15 22:46:49 -07:00
Stanislav Malyshev df2a38e7f8 fd fix 2012-05-15 22:35:43 -07:00
Stanislav Malyshev a10e778bfb fix bug #61065 2012-05-15 22:34:34 -07:00
zoe slattery 63401268db Changes to remaining two tests, #62022 2012-05-15 14:39:51 +01:00
zoe slattery d99203d44b Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Small fixes to tests, see #62022
2012-05-15 11:43:28 +01:00
zoe slattery e35f09d774 Small fixes to tests, see #62022 2012-05-15 11:42:14 +01:00
zoe slattery 968dfae6d1 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Change impl of GZIP_POST, DEFLATE_POST. See #62021
2012-05-15 11:06:14 +01:00
zoe slattery 1af8b3f883 Change impl of GZIP_POST, DEFLATE_POST. See #62021 2012-05-15 11:05:20 +01:00
Michael Wallner 956d74572a BFN 2012-05-15 11:26:13 +02:00
Sebastian Bergmann 38398529b8 Fix NEWS entry for #61602. 2012-05-15 11:14:36 +02:00
Sebastian Bergmann 83449b48d4 Merge branch 'add-const-name' of git://github.com/reeze/php-src into PHP-5.4 2012-05-15 11:08:08 +02:00
Michael Wallner 0ad53bfd7d fix bug #60761 zlib.output_compression fails on refresh 2012-05-15 09:33:47 +02:00
Christopher Jones d9788dd73f Bump to 5.4.4-dev 2012-05-14 12:43:36 -07:00
Stanislav Malyshev a72b21438d update NEWS/UPGRADING 2012-05-13 14:48:22 -07:00
Stanislav Malyshev a0dff6fdca fix bug #61782 - __clone/__destruct do not match other methods when checking access controls 2012-05-13 14:40:44 -07:00
Stanislav Malyshev 9344bf193c fix bug #54547 2012-05-13 14:40:44 -07:00
Stanislav Malyshev 58482206f5 update NEWS 2012-05-12 19:39:12 -07:00
Xinchen Hui 6a5095582a Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed Bug #62005 (unexpected behavior when incrementally assigning to a member of a null object)
  fix stack overflow in php_intlog10abs()

Conflicts:
	Zend/zend_execute.c
2012-05-12 13:19:55 +08:00
Xinchen Hui 3332943c9d Fixed Bug #62005 (unexpected behavior when incrementally assigning to a member of a null object) 2012-05-12 13:13:44 +08:00
Nuno Lopes 8b4b70df56 fix stack overflow in php_intlog10abs()
bug uncovered by LLVM/clang's new -fbounds-checking switch
this patch fixes a crash in ext/standard/tests/math/round_large_exp.phpt
2012-05-11 13:07:21 -04:00
Nuno Lopes 950d5ee590 fix stack overflow in php_intlog10abs()
bug uncovered by LLVM/clang's new -fbounds-checking switch
this patch fixes a crash in ext/standard/tests/math/round_large_exp.phpt
2012-05-11 13:07:00 -04:00
Anatoliy Belsky 4458f3bcf6 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix bug #61990 ext\spl\examples\tests\dualiterator_001.phpt fails
2012-05-11 14:38:43 +02:00
Anatoliy Belsky 81ba6b14c7 Fix bug #61990 ext\spl\examples\tests\dualiterator_001.phpt fails
This fixes a general issue. In this ticket and not for the first time
is being seen, that people are trying to use data from "examples"
in the tests. When extracting a test pack only "tests" and its siblings
was taken into account. Now "examples" are copied as well.
2012-05-11 14:24:12 +02:00
Xinchen Hui 24e03d875f Merge branch 'remove-useless-func-decleare' of https://github.com/reeze/php-src into PHP-5.4 2012-05-11 20:07:27 +08:00
Reeze Xia 0cb4849e53 Cleanup useless function declaration for traits 2012-05-11 16:52:12 +08:00
Anatoliy Belsky b43d6c8522 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix bug #61992 ext\standard\tests\general_functions\bug44295.phpt fails
2012-05-10 17:32:21 +02:00
Anatoliy Belsky 266578f584 Fix bug #61992 ext\standard\tests\general_functions\bug44295.phpt fails
Exception text differ on windows
2012-05-10 17:07:38 +02:00
Anatoliy Belsky fc0c9054e6 updated NEWS 2012-05-10 15:56:50 +02:00
Anatoliy Belsky 19f85f8676 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  updated NEWS
2012-05-10 15:52:37 +02:00
Anatoliy Belsky 652632a89b updated NEWS 2012-05-10 15:48:56 +02:00
Anatoliy Belsky 10d5f2301a Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix bug ext\standard\tests\file\realpath_cache_win32.phpt fails
2012-05-10 15:36:47 +02:00
Anatoliy Belsky f7d8b274c7 Fix bug ext\standard\tests\file\realpath_cache_win32.phpt fails
What happens here is trivial long overflow. Despite the bug attracted
attention on windows, the same story is on linux. Just wait for a big
anough bucket->key . The linux test had %i to check the key value
which should be %d all the way.
2012-05-10 15:27:44 +02:00
Anatoliy Belsky f76d7be876 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix bug 61901 ext\phar\tests\phar_buildfromdirectory2.phpt fails
2012-05-09 13:04:32 +02:00
Anatoliy Belsky 7fb16d5bd9 Fix bug 61901 ext\phar\tests\phar_buildfromdirectory2.phpt fails
Another error message is produced by win specific code
2012-05-09 13:02:33 +02:00
Xinchen Hui d394c17293 Correct test title 2012-05-09 11:28:57 +08:00
Xinchen Hui 1e60d0c105 Implemented FR #61977 (Need CLI web-server support for files with .htm & svg extensions) 2012-05-09 11:27:39 +08:00
Xinchen Hui 7b2ab56997 Fix test failed, the fsockopen will be refused immediately if the server is not set up. 2012-05-09 11:21:24 +08:00
Felipe Pena f46a064760 - BFN 2012-05-08 21:07:29 -03:00
Felipe Pena 92bc49b2b0 - Fixed bug #61978 (Object recursion not detected for classes that implement JsonSerializable) 2012-05-08 21:05:51 -03:00
David Soria Parra 2cb0ed1328 Typo 2012-05-08 22:08:54 +02:00
Anatoliy Belsky 87fa84abde Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix bug 61746 Failing tests in ext/standard/tests/file/windows_links/*
2012-05-08 19:35:13 +02:00
Matt Ficken c12fdbde5f Fix bug 61746 Failing tests in ext/standard/tests/file/windows_links/*
Fixed that again for systems having their %SYSTEMROOT% not in
c:\windows
2012-05-08 19:31:41 +02:00
Stanislav Malyshev 057f4719d3 c++ comments 2012-05-08 10:19:24 -07:00
Stanislav Malyshev 1919ec5a55 restore BC 2012-05-08 10:19:24 -07:00
Stanislav Malyshev bd8912e47c ws + restore BC to apache_request_headers 2012-05-08 10:19:23 -07:00
Stanislav Malyshev 20364bcff9 fix bug #61807 - Buffer Overflow in apache_request_headers 2012-05-08 10:19:23 -07:00
Anatoliy Belsky 0b4d7a455d Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  updated NEWS
2012-05-08 18:52:48 +02:00
Anatoliy Belsky 838b4b8ff7 updated NEWS 2012-05-08 18:51:49 +02:00
Anatoliy Belsky 4b307984df Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix bug 61713 check also that mbstring's found any internal_encoding
2012-05-08 18:34:32 +02:00
Anatoliy Belsky d776a933eb Fix bug 61713 check also that mbstring's found any internal_encoding 2012-05-08 18:31:11 +02:00
Anatoliy Belsky 8987ad5cb2 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix bug #61713 ext\standard\tests\strings\htmlentities10.phpt fails
2012-05-08 18:14:38 +02:00
Anatoliy Belsky 3a4a25358f Fix bug #61713 ext\standard\tests\strings\htmlentities10.phpt fails
There is a logic error in charset detection part for htmlentities.
When mbstring is compiled shared and mbstring.internal_encoding
is set to pass, it prevents default_charset from being checked
resulting iso-8859-1 being choosed.
2012-05-08 17:42:01 +02:00
Johannes Schlüter e8e661128a Fix #61704 (Crash apache, phpinfo() threading issue) 2012-05-08 17:30:05 +02:00
Johannes Schlüter fb3b6bcf83 Fix folding marks 2012-05-08 15:18:33 +02:00
Johannes Schlüter 340091469a Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  This will be PHP 5.3.14
  improve fix for CVE-2012-1823
2012-05-08 11:49:50 +02:00
Johannes Schlüter e120a0c7f3 This will be PHP 5.3.14 2012-05-08 11:28:15 +02:00
Stanislav Malyshev b50101764b improve fix for CVE-2012-1823 2012-05-07 12:14:57 -07:00
Stanislav Malyshev 000e84aa88 improve fix for CVE-2012-1823 2012-05-07 12:14:21 -07:00
Anatoliy Belsky 09664063a8 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix bug 61905 ext\phar\tests\zip\phar_commitwrite.phpt fails
  Fix bug 61903 ext\phar\tests\tar\phar_commitwrite.phpt fails
2012-05-07 15:40:16 +02:00
Anatoliy Belsky 2068419ae5 Fix bug 61905 ext\phar\tests\zip\phar_commitwrite.phpt fails 2012-05-07 15:39:07 +02:00
Anatoliy Belsky ce59121c5f Fix bug 61903 ext\phar\tests\tar\phar_commitwrite.phpt fails 2012-05-07 15:37:29 +02:00
Matt Ficken 87a011d372 Fix bug 61769 Random failure of php_cli_server*phpt tests 2012-05-06 18:05:02 +02:00
Xinchen Hui ad3a42c26c correct variable name 2012-05-06 20:37:03 +08:00
Xinchen Hui 376635cde8 Merge branch 'PHP-5.3' into PHP-5.4 2012-05-06 20:32:15 +08:00
Xinchen Hui 99076bc24f Change the test folder 2012-05-06 20:31:40 +08:00
Xinchen Hui 4cceeb25b7 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed bug #61730 (Segfault from array_walk modifying an array passed by reference)
2012-05-06 20:28:18 +08:00
Xinchen Hui 7ccd594392 Fixed bug #61730 (Segfault from array_walk modifying an array passed by reference) 2012-05-06 20:01:10 +08:00
Nikita Popov bef6111609 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Add NEWS entry for bug #61961
  Fixed Bug #61961 (file_get_content leaks when access empty file with max length)
2012-05-06 13:33:47 +02:00
Nikita Popov 304ac568c5 Add NEWS entry for bug #61961 2012-05-06 13:19:17 +02:00
Nikita Popov 311ee8f69c Merge branch 'pull-request/76' into PHP-5.3 2012-05-06 12:45:45 +02:00
Reeze Xia 3e9923dd8d Fixed Bug #61961 (file_get_content leaks when access empty file with max length) 2012-05-06 18:27:26 +08:00
Xinchen Hui 0747b29bdf Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  correct NEWS
  Fixed bug #61948 (CURLOPT_COOKIEFILE '' raises open_basedir restriction)

Conflicts:
	ext/curl/interface.c
2012-05-06 00:52:51 +08:00
Xinchen Hui 4632fe0eef correct NEWS 2012-05-06 00:51:20 +08:00
Xinchen Hui 19632ae7dc Fixed bug #61948 (CURLOPT_COOKIEFILE '' raises open_basedir restriction) 2012-05-06 00:50:37 +08:00
Xinchen Hui 035ce937e1 Fixed bug #61948 (CURLOPT_COOKIEFILE '' raises open_basedir restriction) 2012-05-06 00:40:49 +08:00
David Soria Parra 948ab62c25 Merge branch 'PHP-5.3' into PHP-5.4
By Rasmus Lerdorf
* PHP-5.3:
  Fix for CVE-2012-1823 (cherry picked from commit 29300b1f9d)
2012-05-05 17:36:55 +02:00
Rasmus Lerdorf 168e8920be Fix for CVE-2012-1823
(cherry picked from commit 29300b1f9d)
2012-05-05 17:34:07 +02:00
Rasmus Lerdorf 0556103f6a Fix for CVE-2012-1823 2012-05-04 11:58:24 -07:00
Anatoliy Belsky f5936cceeb Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix bug #61906 ext\phar\tests\zip\phar_setsignaturealgo2.phpt fails
2012-05-04 11:42:05 +02:00
Anatoliy Belsky 8a10259642 Fix bug #61906 ext\phar\tests\zip\phar_setsignaturealgo2.phpt fails 2012-05-04 11:40:49 +02:00
Anatoliy Belsky 16fdf86ea3 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix bug #61904 ext\phar\tests\tar\phar_setsignaturealgo2.phpt
2012-05-04 11:32:12 +02:00
Anatoliy Belsky 6c12252790 Fix bug #61904 ext\phar\tests\tar\phar_setsignaturealgo2.phpt 2012-05-04 11:29:49 +02:00
Christopher Jones 31ab04ee25 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Bump to next version

Conflicts:
	configure.in
	main/php_version.h
2012-05-03 12:22:39 -07:00
Christopher Jones 0956c00af9 Bump to next version
Bump PHP version number
2012-05-03 12:03:49 -07:00
Xinchen Hui 72f19e9a8b Fixed bug #61922 (ZTS build doesn't accept zend.script_encoding config) 2012-05-03 22:39:53 +08:00
Xinchen Hui d74d88fbb9 Fixed test bug #61892 2012-05-03 19:56:49 +08:00
Xinchen Hui 75d23f5714 Merge remote-tracking branch 'origin/PHP-5.3' into PHP-5.4
* origin/PHP-5.3:
  Fix typo
2012-05-03 18:40:57 +08:00
Xinchen Hui bbf8a50281 Fix typo
picked form pull request of reeze.xia@gmail.com
2012-05-03 18:39:03 +08:00
Anatoliy Belsky cdce62b724 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix bug 61902 ext\phar\tests\phar_setsignaturealgo2.phpt falis
2012-05-02 21:41:33 +02:00
Anatoliy Belsky 69ed09a31c Fix bug 61902 ext\phar\tests\phar_setsignaturealgo2.phpt falis
openssl needs explicit openssl.cnf on windows
2012-05-02 21:38:32 +02:00
andrey 67419499b2 Merge branch 'PHP-5.3' into PHP-5.4 2012-05-02 15:57:08 +02:00
andrey b42d000471 Fix for bug#61411
Bug #61411 PDO Segfaults with PERSISTENT == TRUE && EMULATE_PREPARES == FALSE
Wrong allocation, that doesn't follow the scheme of using stmt->persistent
was the root cause of the problem and the crash at free.
2012-05-02 15:55:22 +02:00
Stanislav Malyshev e25eea8b83 merge 5.3.11 stuff 2012-05-02 00:08:04 -07:00
Stanislav Malyshev b0e8be8aea organize NEWS 2012-05-02 00:00:59 -07:00
Stanislav Malyshev 7bbd5521d2 Revert "Fix bug #61537 (json_encode() incorrectly truncates/discards information) and"
This reverts commit cb2a1c71c9.
The fix is not correct, not fixed after discussion on github.
Please fix the issues and reapply the patch
2012-05-01 23:54:10 -07:00
Christopher Jones 93192ec56d Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Make output order for dom007.phpt platform independent
2012-05-01 15:49:19 -07:00
Christopher Jones 72507d38fb Merge branch 'bug61810' into PHP-5.3
* bug61810:
  Make output order for dom007.phpt platform independent
2012-05-01 15:47:54 -07:00
Christopher Jones d14f23365c Make output order for dom007.phpt platform independent
This test has long been near the top of the reported output diffs.
For example, on http://qa.php.net/reports/?version=5.4.0 it has diffed
1307 times out of 3543 reports, at time of this commit.  (The second
highest diff has occurred 710 times.)
2012-05-01 15:43:31 -07:00
Christopher Jones cac09f3333 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix masking in bug61115-1.phpt
2012-05-01 14:34:54 -07:00
Christopher Jones 02e25df8b5 Merge branch 'fix-bug61115-1.phpt-for-no-debug' into PHP-5.3
* fix-bug61115-1.phpt-for-no-debug:
  Fix masking in bug61115-1.phpt
2012-05-01 14:33:57 -07:00
Christopher Jones c864b1ca2f Fix masking in bug61115-1.phpt
The test bug61115-1.phpt was diffing for non-debug builds
2012-05-01 14:32:09 -07:00
Felipe Pena 4deb0f1a0a - Regenerated files 2012-04-30 15:57:00 -03:00
Felipe Pena 79961dccab - Fixed Windows build 2012-04-30 15:55:57 -03:00
Anatoliy Belsky 819a7ae6a1 Merge branch 'PHP-5.4' of git.php.net:php-src into PHP-5.4 2012-04-30 17:25:25 +02:00
Anatoliy Belsky 47c8b6039a Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix bug 61868 ext\dom\tests\DOMDocument_validate_on_parse_variation.phpt fails
2012-04-30 17:25:11 +02:00
Anatoliy Belsky d26e006d7f Fix bug 61868 ext\dom\tests\DOMDocument_validate_on_parse_variation.phpt fails 2012-04-30 17:23:49 +02:00
Felipe Pena 1622843162 - Regenerated files 2012-04-30 10:35:28 -03:00
Felipe Pena 3120387617 - Changed last commit to use VK_ESCAPE on Windows 2012-04-30 10:31:49 -03:00
Anatoliy Belsky fc24e74260 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Additional fixs for bug 61746 - prepare/clean acls
2012-04-30 14:36:42 +02:00
Anatoliy Belsky ec5421d044 Additional fixs for bug 61746 - prepare/clean acls 2012-04-30 14:33:48 +02:00
Anatoliy Belsky 36836f147c Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix bug 61870 ext\session\tests\bug42596.phpt fails
2012-04-30 12:10:43 +02:00
Anatoliy Belsky 680685127f Fix bug 61870 ext\session\tests\bug42596.phpt fails 2012-04-30 12:06:28 +02:00
Anatoliy Belsky 455040c4ab Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix bug ext\filter\tests\bug52209.phpt fails
2012-04-30 10:28:00 +02:00
Anatoliy Belsky 8249581a2d Fix bug ext\filter\tests\bug52209.phpt fails 2012-04-30 10:25:54 +02:00
Xinchen Hui 72ccce4b8b Merge remote-tracking branch 'origin/PHP-5.3' into PHP-5.4 2012-04-30 12:35:44 +08:00
Xinchen Hui a601605f14 merge test from PHP-5.4 2012-04-30 12:33:55 +08:00
Xinchen Hui d80a3d9668 Revert "Merge branch 'fix-pro_nice-test' of https://github.com/reeze/php-src into PHP-5.3"
After pushed, I found the test script in 5.4 is already fixed this, so
revert this change, and be consistent with 5.4's test

This reverts commit 24d85e4bd8, reversing
changes made to bae56a87f8.
2012-04-30 12:31:33 +08:00
Xinchen Hui 24d85e4bd8 Merge branch 'fix-pro_nice-test' of https://github.com/reeze/php-src into PHP-5.3 2012-04-30 12:29:15 +08:00
Xinchen Hui fd518ffc7e Merge remote-tracking branch 'origin/PHP-5.3' into PHP-5.4
* origin/PHP-5.3:
  Fixed bug #61546 (functions related to current script failed when chdir() in cli sapi).
  - BFN

Conflicts:
	sapi/cli/php_cli.c
2012-04-30 12:15:43 +08:00
Xinchen Hui bae56a87f8 Fixed bug #61546 (functions related to current script failed when chdir() in cli sapi). 2012-04-30 12:09:22 +08:00
Felipe Pena b336af29e1 - BFN 2012-04-29 19:48:00 -03:00
Felipe Pena 9aff3a1156 - BFN 2012-04-29 19:44:27 -03:00
Felipe Pena cc5b995c78 - Fixed bug #61827 (incorrect \e processing on Windows) patch by: ab@php.net 2012-04-29 19:35:52 -03:00
Felipe Pena 6008f9af8f Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  - Added missing bound check in iptcparse() (path by chris at chiappa.net)
2012-04-29 19:14:03 -03:00
Felipe Pena d44a383986 - Added missing bound check in iptcparse() (path by chris at chiappa.net) 2012-04-29 19:12:12 -03:00
reeze e52be10b30 Fix test for proc_nice: bsd ps command didn't support option -o "%p %n" 2012-04-30 00:59:54 +08:00
Anatoliy Belsky 6f8fae606b Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix bug 61685 putenv('TZ=UTC') doesn't update timezone for localtime()
2012-04-28 11:44:54 +02:00
Matt Ficken dc6d283b1c Fix bug 61685 putenv('TZ=UTC') doesn't update timezone for localtime() 2012-04-28 11:42:42 +02:00
Anatoliy Belsky 3dbe48762f Fix bug 61786 Failing tests in ext\session\tests\* 2012-04-26 15:39:45 +02:00
Anatoliy Belsky 94d96f7782 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix bug #61791 ext\sqlite3\tests\sqlite3_15_open_error.phpt fails

Conflicts:
	ext/sqlite3/tests/sqlite3_15_open_error.phpt
2012-04-26 15:17:46 +02:00
Anatoliy Belsky 4daab0abec Fix bug #61791 ext\sqlite3\tests\sqlite3_15_open_error.phpt fails 2012-04-26 15:14:26 +02:00
Anatoliy Belsky 19df3c1b1c Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix bug #61800 ext\standard\tests\streams\bug61371.phpt fails
2012-04-26 13:28:49 +02:00
Anatoliy Belsky 4e9db5ba9f Fix bug #61800 ext\standard\tests\streams\bug61371.phpt fails 2012-04-26 13:27:01 +02:00
Anatoliy Belsky 459e758f03 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Partial fix for bug 61743 to get correct icacls path
2012-04-25 18:46:22 +02:00
Anatoliy Belsky 433290e199 Partial fix for bug 61743 to get correct icacls path 2012-04-25 18:38:27 +02:00
Stanislav Malyshev 7d3d38abec sync version 2012-04-24 16:30:37 -07:00
Michael Wallner ac4d53cf70 fix NEWS order 2012-04-24 21:22:19 +02:00
Michael Wallner 52cb8ed314 BFN 2012-04-24 20:40:19 +02:00
Michael Wallner 7c93a16477 fix bug #61443
Since upgrade to PHP 5.4, we can't change zlib.output_compression on the
fly

the check for PHP_OUTPUT_WRITTEN was over-zealous
2012-04-24 20:35:49 +02:00
Michael Wallner df00b64cb9 fixed bug #61820
using ob_gzhandler will complain about headers already sent
when no compression

the Vary header should only be sent on the PHP_OUTPUT_HANDLER_START
event
2012-04-24 19:50:00 +02:00
Anatoliy Belsky f21376d668 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix bug #61413 ext\openssl\tests\openssl_encrypt_crash.phpt fails 5.3 only
2012-04-24 14:08:26 +02:00
Anatoliy Belsky 270a406ac9 Fix bug #61413 ext\openssl\tests\openssl_encrypt_crash.phpt fails 5.3 only 2012-04-24 14:05:35 +02:00
Anatoliy Belsky c7f9f54a23 Bug 61610 adopted expected warnings for 5.4 2012-04-24 13:36:43 +02:00
Gustavo André dos Santos Lopes 485638a09c Merge branch '5.3' into 5.4 2012-04-23 22:10:23 +01:00
Gustavo André dos Santos Lopes 8d748e5de5 Fixed bug #61764: 'I' unpacks n as signed if n > 2^31-1 on LP64
Also fixed possible invalid read on big endian LP64.
2012-04-23 22:09:38 +01:00
Felipe Pena 883d40667d Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  - Fixed bug #61829 (Memory leak when calling MessageFormatter's constructor twice)
2012-04-23 15:19:23 -03:00
Felipe Pena c8865e3b84 - Fixed bug #61829 (Memory leak when calling MessageFormatter's constructor twice) 2012-04-23 15:18:12 -03:00
Anatoliy Belsky dd67f066f7 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix bug #61811 three of finfo tests failed, see also #61812.
2012-04-22 19:29:52 +02:00
Anatoliy Belsky da1b534601 Fix bug #61811 three of finfo tests failed, see also #61812.
The remaining two was assidentially merged back from 5.4
2012-04-22 19:26:54 +02:00
Xinchen Hui 0d115ca211 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed warning implicit declaration of function 'file_printedlen'
2012-04-22 19:59:46 +08:00
Xinchen Hui f13b0ede07 Fixed warning implicit declaration of function 'file_printedlen' 2012-04-22 19:52:07 +08:00
Xinchen Hui 3ca1976b3c Update NEWS 2012-04-22 19:39:50 +08:00
Xinchen Hui b225330707 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed bug #61812 (Uninitialised value used in libmagic)
2012-04-22 19:39:02 +08:00
Xinchen Hui c06e92a533 Fixed bug #61812 (Uninitialised value used in libmagic) 2012-04-22 19:38:14 +08:00
Johannes Schlüter a571039870 Merge branch 'PHP-5.4' of git.php.net:/php-src into PHP-5.4
* 'PHP-5.4' of git.php.net:/php-src:
  Fix test
  typo in test
  Make css string constant
  Fixed typo
  Improved performance while sending error page
  - BFN
  - BFN
  - Fixed bug #54197 ([PATH=] sections incompatibility with user_ini.filename set to null) patch by ab@php.net
  - Fixed expected test result (patch by ab@php.net in #61769)
  - Fix test title
  add pg_escape_identifier/pg_escape_literal
  fix RCs
  Update to 5.4.2-dev
  Bug#59597 NumberFormatter::parse() with TYPE_INT64 results in a 32 bit integer
2012-04-22 02:26:07 +02:00
Johannes Schlüter bb2f806534 Fix folding 2012-04-22 02:25:02 +02:00
Xinchen Hui 9a22bc2662 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix test
  - BFN
2012-04-21 16:03:18 +08:00
Xinchen Hui 2e9eb5e32f Fix test
Reported by cjones
2012-04-21 16:02:25 +08:00
Xinchen Hui 8d44b91731 typo in test 2012-04-21 10:15:35 +08:00
Xinchen Hui b999e91f5b Make css string constant 2012-04-21 09:31:00 +08:00
Xinchen Hui da85337d13 Fixed typo
report by reeze.xia@gmail.com
2012-04-21 00:11:06 +08:00
Xinchen Hui cc58373d4d Improved performance while sending error page
this also fixed bug #61785 (Memory leak when access a non-exists file without router)
2012-04-21 00:01:10 +08:00
Felipe Pena bca2d6b985 - BFN 2012-04-19 23:23:59 -03:00
Felipe Pena dd34fe52b9 - BFN 2012-04-19 23:23:46 -03:00
Felipe Pena d2798c6035 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  - Fixed bug #54197 ([PATH=] sections incompatibility with user_ini.filename set to null) patch by ab@php.net
2012-04-19 23:13:37 -03:00
Felipe Pena c3b0fb4fbe - Fixed bug #54197 ([PATH=] sections incompatibility with user_ini.filename set to null) patch by ab@php.net 2012-04-19 23:12:47 -03:00
Felipe Pena 0a46d63f7e - Fixed expected test result (patch by ab@php.net in #61769) 2012-04-19 20:15:11 -03:00
Felipe Pena d5bd45429c - Fix test title 2012-04-19 20:05:30 -03:00
Yasuo Ohgaki 655245afef add pg_escape_identifier/pg_escape_literal 2012-04-19 13:40:24 -07:00
Stanislav Malyshev 106e0a2e68 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Bug#59597 NumberFormatter::parse() with TYPE_INT64 results in a 32 bit integer
2012-04-19 11:37:31 -07:00
Stanislav Malyshev 5cbf2d6785 Merge branch 'pull-request/61' into PHP-5.3
* pull-request/61:
  Bug#59597 NumberFormatter::parse() with TYPE_INT64 results in a 32 bit integer
2012-04-19 11:28:30 -07:00
Stanislav Malyshev 2b8e9430c8 fix RCs 2012-04-19 10:45:21 -07:00
Christopher Jones 701332ce30 Update to 5.4.2-dev
After PHP-5.4.1 was branched, the PHP-5.4 branch should have been 5.4.2-dev.
2012-04-19 10:45:21 -07:00
Johannes Schlüter 36a5565467 Merge branch 'PHP-5.4' of git.php.net:/php-src into PHP-5.4
* 'PHP-5.4' of git.php.net:/php-src:
2012-04-19 12:48:18 +02:00
Johannes Schlüter 0589b19abf Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Commit generated file
  Fix bug #61755 parsing bug can lead to access violations
  Fix bug 61671 ext\spl\tests\fileobject_003.phpt fails
2012-04-19 12:47:47 +02:00
Johannes Schlüter c06ec6bde4 Commit generated file 2012-04-19 12:47:09 +02:00
Johannes Schlüter 1b78aef426 Fix bug #61755 parsing bug can lead to access violations 2012-04-19 12:46:02 +02:00
Anatoliy Belsky 1f4b4c384e Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix bug 61671 ext\spl\tests\fileobject_003.phpt fails
2012-04-19 11:36:50 +02:00
Anatoliy Belsky adfb4c62b7 Fix bug 61671 ext\spl\tests\fileobject_003.phpt fails
The solution was already introduced in 5.4 by Etienne Kneuss and
Pierre but wasn't merged back into 5.3 . SplFileObject should
not be used with directories. So just putting together all the
necessary pieces from 5.4
2012-04-19 11:33:12 +02:00
Sherif Ramadan 2827324c7c Bug#59597 NumberFormatter::parse() with TYPE_INT64 results in a 32 bit integer 2012-04-19 04:44:43 -04:00
Johannes Schlüter ff7e1ff677 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Drop old README
2012-04-19 00:30:45 +02:00
Johannes Schlüter 4650b2164b Drop old README 2012-04-19 00:29:24 +02:00
Johannes Schlüter cc85e7c313 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix slight grammar glitch (thanks Dan Brown)
2012-04-19 00:08:36 +02:00
Johannes Schlüter 710021d1d4 Fix slight grammar glitch (thanks Dan Brown) 2012-04-19 00:07:40 +02:00
Johannes Schlüter 900751e8ae Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Update generated file.
  Ensure the SQL parser is regenerated after changes.
2012-04-18 22:50:21 +02:00
Johannes Schlüter e946eaca0b Update generated file. 2012-04-18 22:49:03 +02:00
Johannes Schlüter dda60f3014 Ensure the SQL parser is regenerated after changes. 2012-04-18 22:48:49 +02:00
Xinchen Hui 56d8d35300 Fix NEWS, the previous wrong was introduced in commit cb2a1c71c9
http://git.php.net/?p=php-src.git;a=commitdiff;h=cb2a1c71c96d7c9b2ee03d77beae0c8e0d385f1b
2012-04-18 18:43:46 +08:00
Xinchen Hui 172aa3c6d7 update NEWS 2012-04-18 18:42:39 +08:00
Johannes Schlüter 0618e33b5d Merge branch 'PHP-5.4' of git.php.net:/php-src into PHP-5.4
* 'PHP-5.4' of git.php.net:/php-src:
  Fixed bug #61761 ('Overriding' a private static method with a different signature causes crash)
2012-04-18 12:22:27 +02:00
Yasuo Ohgaki d6394e66a3 Add NEWS 2012-04-18 12:21:05 +02:00
Yasuo Ohgaki cce0f8e507 Implement Request #47570 libpq's PG_VERSION should be exported to userland 2012-04-18 12:20:35 +02:00
Xinchen Hui da6465a268 Fixed bug #61761 ('Overriding' a private static method with a different signature causes crash) 2012-04-18 18:13:27 +08:00
Anatoliy Belsky d55afe4df6 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix bug 61746 Failing tests in ext/standard/tests/file/windows_links/*
2012-04-16 17:07:33 +02:00
Anatoliy Belsky f3d86b314f Fix bug 61746 Failing tests in ext/standard/tests/file/windows_links/* 2012-04-16 17:06:30 +02:00
Anatoliy Belsky 3d106aeb0d Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix bug 61720 ext\libxml\tests\bug61367-read.phpt fails
2012-04-16 15:46:02 +02:00
Anatoliy Belsky bceafee879 Fix bug 61720 ext\libxml\tests\bug61367-read.phpt fails 2012-04-16 15:45:03 +02:00
Anatoliy Belsky 4ac6862fc4 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix bug 61719 ext\soap\tests\bugs\bug31422.phpt fails
2012-04-16 15:40:10 +02:00
Anatoliy Belsky 9c8907ec10 Fix bug 61719 ext\soap\tests\bugs\bug31422.phpt fails 2012-04-16 15:38:46 +02:00
Anatoliy Belsky 5d1565088f Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix bug 61718 ext\ldap\tests\ldap_set_rebind_proc_error.phpt fails
2012-04-16 15:26:50 +02:00
Anatoliy Belsky 1c435ae498 Fix bug 61718 ext\ldap\tests\ldap_set_rebind_proc_error.phpt fails 2012-04-16 15:25:20 +02:00
Anatoliy Belsky 1a44faf264 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix bug 61717 ext\ldap\tests\ldap_sasl_bind_basic.phpt fails
2012-04-16 15:21:04 +02:00
Anatoliy Belsky 47e7755785 Fix bug 61717 ext\ldap\tests\ldap_sasl_bind_basic.phpt fails 2012-04-16 15:20:03 +02:00
Anatoliy Belsky 9f42c1890b Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix bug 61716 tests\basic\021.phpt fails
2012-04-16 15:16:06 +02:00
Anatoliy Belsky 4fa1743009 Fix bug 61716 tests\basic\021.phpt fails 2012-04-16 15:14:26 +02:00
Anatoliy Belsky 45977c6aae Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix bug 61683 tests\basic\bug20539.phpt fails
2012-04-16 14:39:39 +02:00
Anatoliy Belsky aaed0af418 Fix bug 61683 tests\basic\bug20539.phpt fails 2012-04-16 14:38:16 +02:00
Anatoliy Belsky d588d01b7c Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix bug 61680 ext\zlib\tests\gzencode_variation1-win32.phpt fails
2012-04-16 14:05:32 +02:00
Anatoliy Belsky 163c1a393f Fix bug 61680 ext\zlib\tests\gzencode_variation1-win32.phpt fails 2012-04-16 14:04:29 +02:00
Anatoliy Belsky ede519d1d6 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix bug 61676 ext\tidy\tests\bug54682.phpt fails

Conflicts:
	ext/tidy/tests/bug54682.phpt
2012-04-16 13:42:52 +02:00
Anatoliy Belsky c981016e41 Fix bug 61676 ext\tidy\tests\bug54682.phpt fails 2012-04-16 13:38:13 +02:00
Anatoliy Belsky 948f3619f6 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix bug 61743 tests in ext\standard\tests\file\windows_acls\* fail
2012-04-16 13:33:03 +02:00
Anatoliy Belsky 9a4cb732ed Fix bug 61743 tests in ext\standard\tests\file\windows_acls\* fail 2012-04-16 13:30:58 +02:00
Xinchen Hui ed09d26f94 change the bug summary 2012-04-16 19:23:12 +08:00
Xinchen Hui 3b42f184cd Fixed bug #61728 (php-fpm SIGSEGV running friendica on nginx) 2012-04-15 01:16:34 +08:00
Johannes Schlüter 6ecac26972 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Rename README.SVN-RULES to README.GIT-RULES, here, too
2012-04-14 00:31:00 +02:00
Johannes Schlüter 21d314a767 Rename README.SVN-RULES to README.GIT-RULES, here, too 2012-04-14 00:29:55 +02:00
David Soria Parra de6dfe5bbd Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  configure.in: Check for README.GIT-RULES instead of README.SVN-RULES

Conflicts:
	configure.in
2012-04-13 16:33:25 +02:00
David Soria Parra e9b978c374 configure.in: Check for README.GIT-RULES instead of README.SVN-RULES
We removed the README.SVN-RULES file. Configure checks for this file.
Let's check for the new README.GIT-RULES instead.
2012-04-13 16:32:41 +02:00
Johannes Schlüter 676f0deb38 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Move and update README.SVN-RULES to README.GIT-RULES
2012-04-13 02:15:39 +02:00
Johannes Schlüter e0d5138660 Move and update README.SVN-RULES to README.GIT-RULES 2012-04-13 02:12:47 +02:00
Xinchen Hui 8ceae39d4d Merge branch 'PHP-5.3' into PHP-5.4 2012-04-13 00:11:04 +08:00
Xinchen Hui 8c4294bcb4 Fixed test faild
the sun_path will not be that much long:
 http://pubs.opengroup.org/onlinepubs/009695399/basedefs/sys/un.h.html
2012-04-13 00:07:07 +08:00
Johannes Schlüter 0a580ac76f Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Remove cherry-picked items for 5.3.11
  Fix bug #61537 (json_encode() incorrectly truncates/discards information) and remove a test case that's now mooted by this fix.

Conflicts:
	ext/json/json.c
	ext/json/php_json.h
2012-04-12 12:02:38 +02:00
Johannes Schlüter 1461a40301 Remove cherry-picked items for 5.3.11 2012-04-12 11:21:41 +02:00
Johannes Schlüter 82c05eeda9 Copy default properties of internal classes for different threads 2012-04-11 19:21:41 -07:00
Adam Harvey 05c8d4766c Update test to fix breakage caused by the previous commit. 2012-04-11 08:29:39 +08:00
Adam Harvey cb2a1c71c9 Fix bug #61537 (json_encode() incorrectly truncates/discards information) and
remove a test case that's now mooted by this fix.
2012-04-11 08:29:39 +08:00
Adam Harvey 3f3ad30c50 Fix bug #61537 (json_encode() incorrectly truncates/discards information) and
remove a test case that's now mooted by this fix.
2012-04-11 08:24:38 +08:00
Gustavo André dos Santos Lopes 112a476b68 Merge .gitattributes EOL commit from 5.3.
This merge commit includes several changes from the 5.3 commit.
This is because of 1) different tests between the two branches
and 2) the svn:eol-style attributes differing between the two
branches.
2012-04-10 19:45:18 +01:00
Gustavo André dos Santos Lopes 1c8fccdf6d Disabled EOL conversions on certain tests 2012-04-10 19:41:07 +01:00
Anatoliy Belsky 9ada49fa1c Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed bug #61669 ext\standard\tests\file\rename_variation7-win32.phpt fails

Conflicts:
	ext/standard/tests/file/rename_variation7-win32.phpt
2012-04-10 15:23:38 +02:00
Anatoliy Belsky ed0ddd20c5 Fixed bug #61669 ext\standard\tests\file\rename_variation7-win32.phpt fails 2012-04-10 15:16:48 +02:00
Anatoliy Belsky a9eace9f6e Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed bug #61668 ext\standard\tests\file\rename_variation13-win32.phpt fails

Conflicts:
	ext/standard/tests/file/rename_variation13-win32.phpt
2012-04-10 15:12:42 +02:00
Anatoliy Belsky b0cb29db87 Fixed bug #61668 ext\standard\tests\file\rename_variation13-win32.phpt fails 2012-04-10 15:09:21 +02:00
Anatoliy Belsky 98001a849b Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix bug #61667 ext\standard\tests\file\glob_variation-win32.phpt fails

Conflicts:
	ext/standard/tests/file/glob_variation-win32.phpt
2012-04-10 15:03:41 +02:00
Anatoliy Belsky b9cbb9e744 Fix bug #61667 ext\standard\tests\file\glob_variation-win32.phpt fails 2012-04-10 15:00:03 +02:00
Anatoliy Belsky 06b2d66ce2 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed bug #61666 ext\standard\tests\file\file_put_contents_variation8-win32.phpt fails

Conflicts:
	ext/standard/tests/file/file_put_contents_variation8-win32.phpt
2012-04-10 14:55:38 +02:00
Anatoliy Belsky fde96342e8 Fixed bug #61666 ext\standard\tests\file\file_put_contents_variation8-win32.phpt fails 2012-04-10 14:13:15 +02:00
Anatoliy Belsky 13211f201a Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix bug #61659 Test ext\spl\tests\bug60082.phpt fails
  Fixed bug #61638 Test ext\sockets\tests\unixloop.phpt fails
  Fixed bug #61637 ext\sockets\tests\socket_sentto_recvfrom_unix.phpt
  Fixed bug #61635 ext\sockets\tests\socket_select-wrongparams-1.phpt

Conflicts:
	ext/spl/tests/bug60082.phpt
2012-04-10 14:05:07 +02:00
Anatoliy Belsky b2f2e1d6cc Fix bug #61659 Test ext\spl\tests\bug60082.phpt fails 2012-04-10 14:03:19 +02:00
Anatoliy Belsky 024cd2a124 Fixed bug #61638 Test ext\sockets\tests\unixloop.phpt fails 2012-04-10 14:00:51 +02:00
Anatoliy Belsky bbab846ada Fixed bug #61637 ext\sockets\tests\socket_sentto_recvfrom_unix.phpt 2012-04-10 14:00:50 +02:00
Anatoliy Belsky 70f2f30e67 Fixed bug #61635 ext\sockets\tests\socket_select-wrongparams-1.phpt 2012-04-10 14:00:50 +02:00
Anatoliy Belsky b3be5d920a Fixed bug #61638 Test ext\sockets\tests\unixloop.phpt fails 2012-04-10 13:58:15 +02:00
Anatoliy Belsky 15e26c6d4a Fixed bug #61637 ext\sockets\tests\socket_sentto_recvfrom_unix.phpt 2012-04-10 13:54:22 +02:00
Anatoliy Belsky af8646c188 Fixed bug #61635 ext\sockets\tests\socket_select-wrongparams-1.phpt 2012-04-10 13:40:20 +02:00
Anatoliy Belsky 006b04da4a Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed bug #61634 Test ext\sockets\tests\socket_listen-wrongparams.phpt fails
  Fixed bug #61633 Test ext\sockets\tests\socket_create_pair-wrongparams.phpt fails
  Fixed bug #61632 Test ext\sockets\tests\socket_create_listen.phpt fails
  Fixed bug 61621 Test fail in ext/standard/tests/dir
2012-04-10 13:09:48 +02:00
Anatoliy Belsky c4676ee99f Fixed bug #61634 Test ext\sockets\tests\socket_listen-wrongparams.phpt fails 2012-04-10 13:08:57 +02:00
Anatoliy Belsky 5b0e7203e6 Fixed bug #61633 Test ext\sockets\tests\socket_create_pair-wrongparams.phpt fails 2012-04-10 13:06:15 +02:00
Anatoliy Belsky 83b48280c7 Fixed bug #61632 Test ext\sockets\tests\socket_create_listen.phpt fails 2012-04-10 13:06:14 +02:00
Anatoliy Belsky 5594fcf423 Fixed bug #61633 Test ext\sockets\tests\socket_create_pair-wrongparams.phpt fails 2012-04-10 13:02:53 +02:00
Anatoliy Belsky 37cb29ae90 Fixed bug #61632 Test ext\sockets\tests\socket_create_listen.phpt fails 2012-04-10 12:57:10 +02:00
Anatoliy Belsky d80e2e069c Fixed bug 61621 Test fail in ext/standard/tests/dir 2012-04-10 12:47:01 +02:00
Anatoliy Belsky 31a3e83190 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed bug #61611 ext\date\tests\date_default_timezone_get-2.phpt fails
  Fixed bug #61631 mbstring mail related tests fail
  Fixed bug #61610 Test ext\date\tests\date_default_timezone_get-1.diff fails
  Fix bug #61609 Test ext\date\tests\bug52062.phpt fails As expressed in the comments http://de.php.net/manual/en/datetime.gettimestamp.php this is the generic 32 bit timestamp issue
2012-04-10 12:37:37 +02:00
Anatoliy Belsky 26dbc5ecb4 Fixed bug #61611 ext\date\tests\date_default_timezone_get-2.phpt fails
The behaviour on windows is to select an arbitrary timezone from the
current system settings. This gives no chance to hardcode the timezone
name, for instance for UTC+1 it could choose from the multiple names
like Europe/Berlin or Europe/Paris . For this reason the test is
parametrized so there is no hardcoded timezone data.

The original test made to be skipped on windows and a duplicate was made
for windows. Tested on debian and win7 both x86.
2012-04-10 12:33:11 +02:00
Anatoliy Belsky 1a0c9ecaee Fixed bug #61631 mbstring mail related tests fail 2012-04-10 12:23:07 +02:00
Anatoliy Belsky fbbad87056 Fixed bug #61610 Test ext\date\tests\date_default_timezone_get-1.diff fails
The behaviour on windows is to select an arbitrary timezone from the current system settings.
This gives no chance to hardcode the timezone name, for instance for UTC+1 it could choose
from the multiple names like Europe/Berlin or Europe/Paris . For this reason the test is
parametrized so there is no hardcoded timezone data.

The original test made to be skipped on windows and a duplicate was made for windows.
2012-04-10 12:20:40 +02:00
Anatoliy Belsky fd68d5b139 Fix bug #61609 Test ext\date\tests\bug52062.phpt fails
As expressed in the comments http://de.php.net/manual/en/datetime.gettimestamp.php
this is the generic 32 bit timestamp issue
2012-04-10 12:20:40 +02:00
Anatoliy Belsky 2ca49d39a3 Fixed bug #61631 mbstring mail related tests fail 2012-04-10 11:47:18 +02:00
Anatoliy Belsky d89b65f985 Fixed bug #61610 Test ext\date\tests\date_default_timezone_get-1.diff fails
The behaviour on windows is to select an arbitrary timezone from the current system settings.
This gives no chance to hardcode the timezone name, for instance for UTC+1 it could choose
from the multiple names like Europe/Berlin or Europe/Paris . For this reason the test is
parametrized so there is no hardcoded timezone data.

The original test made to be skipped on windows and a duplicate was made for windows.
2012-04-10 11:03:41 +02:00
Anatoliy Belsky 4ff55e646a Fix bug #61609 Test ext\date\tests\bug52062.phpt fails
As expressed in the comments http://de.php.net/manual/en/datetime.gettimestamp.php
this is the generic 32 bit timestamp issue
2012-04-10 10:18:10 +02:00
Rui Hirokawa 882dca647a MFH: fixed a mistake on reverting my previous patch. 2012-04-09 23:49:18 +09:00
Nikita Popov 7ae93a2c4c Fix bug #61660: bin2hex(hex2bin($data)) != $data
If the input data has an odd length a warning is thrown and false is returned.
2012-04-08 22:38:21 +02:00
Gustavo André dos Santos Lopes f7d4076785 Merge branch '5.3' into 5.4 2012-04-07 16:34:17 +01:00
Gustavo André dos Santos Lopes 0f180a63eb Fixed bug in new stream_get_line() when using NUL as a delimiter.
This is the issue Derick spotted a few days ago..
2012-04-07 16:32:19 +01:00
Xinchen Hui 014ed76943 Update NEWS 2012-04-06 21:58:28 +08:00
Xinchen Hui b0f09b69d3 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed bug #61650 (ini parser crashes when using ${xxxx} ini variables (without apache2))
2012-04-06 21:57:56 +08:00
Xinchen Hui 9bf8cd4b34 Fixed bug #61650 (ini parser crashes when using ${xxxx} ini variables (without apache2)) 2012-04-06 21:42:40 +08:00
Anatoliy Belsky 69b2570b72 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix bug #61480 test bug - ext/gd/tests/bug48555.phpt
  updated the NEWS with the latest fileinfo changes

Conflicts:
	NEWS
2012-04-04 18:54:03 +02:00
Matt Ficken 381edb425e Fix bug #61480 test bug - ext/gd/tests/bug48555.phpt 2012-04-04 18:39:24 +02:00
Anatoliy Belsky db834fc460 updated the NEWS with the latest fileinfo changes 2012-04-04 12:36:34 +02:00
Xinchen Hui 7cccb6bc5a fix typo 2012-04-04 17:41:25 +08:00
Xinchen Hui 1215665bb4 Update NEWS for #61617 2012-04-04 17:38:43 +08:00
Xinchen Hui 1ff8021519 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed bug #61617 (Libxml tests failed(ht is already destroyed))
  Cherry-pick 4cc74767

Conflicts:
	NEWS
2012-04-04 17:36:18 +08:00
Xinchen Hui 94f1c05ff8 Fixed bug #61617 (Libxml tests failed(ht is already destroyed)) 2012-04-04 17:22:37 +08:00
Gustavo André dos Santos Lopes ca58cd01fc Cherry-pick 4cc74767
Headers: forbid \r and \n also after \0, allow CRLF followed by HT or SP and forbid \0. See bug #60227.

Conflicts:

	ext/standard/tests/general_functions/bug60227.phpt
	ext/standard/tests/general_functions/bug60227_1.phpt
	ext/standard/tests/general_functions/bug60227_2.phpt
	main/SAPI.c
2012-04-04 09:59:51 +01:00
Xinchen Hui 9882358984 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix warning "suggest parentheses around assignment"

Conflicts:
	main/SAPI.c
2012-04-04 16:37:29 +08:00
Xinchen Hui f7bf83546e Fix warning "suggest parentheses around assignment" 2012-04-04 16:35:32 +08:00
Xinchen Hui efd671f242 Fixed bug Fixed bug #61605 (header_remove() does not remove all headers) 2012-04-04 16:14:28 +08:00
Xinchen Hui 3ea9fa1b46 Merge branch 'PHP-5.3' into PHP-5.4 2012-04-04 16:13:02 +08:00
Xinchen Hui 896c4539df Fixed bug #61605 (header_remove() does not remove all headers) 2012-04-04 16:01:43 +08:00
Xinchen Hui bd400829af Merge branch 'PHP-5.3' into PHP-5.4 2012-04-04 15:24:08 +08:00
Xinchen Hui 7b04638c8c Fix test
cherry-pick from php-5.4
2012-04-04 15:20:28 +08:00
reeze 6712d0d20d Fixed CODING_STANDARD and move parameter parse code 2012-04-04 14:06:55 +08:00
Ilia Alshanetsky 9c5ae9954f Fixed bug #61423 (gzip compression fails). 2012-04-03 08:47:00 -04:00
Anatoliy Belsky 827c446b62 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix bug #61460 popen_close_error-win32 expected output is wrong

Conflicts:
	ext/standard/tests/file/popen_pclose_error-win32.phpt
2012-04-03 14:22:59 +02:00
Matt Ficken 438536e45e Fix bug #61460 popen_close_error-win32 expected output is wrong 2012-04-03 14:19:43 +02:00
Anatoliy Belsky 2a8866ba5e Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix bug #61454 ext\standard\tests\general_functions\bug49847.phpt fails
2012-04-03 13:24:31 +02:00
Anatoliy Belsky 14e74aeb57 Fix bug #61454 ext\standard\tests\general_functions\bug49847.phpt fails 2012-04-03 13:23:06 +02:00
Anatoliy Belsky b67a4cc340 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix bug #61481 Test Bug - ext/com_dotnet/tests/bug49192
2012-04-03 13:09:17 +02:00
Anatoliy Belsky 94cefaedaf Fix bug #61481 Test Bug - ext/com_dotnet/tests/bug49192 2012-04-03 13:07:51 +02:00
Anatoliy Belsky 9c81654378 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix bug #61517 random test failure - ext/standard/tests/misc/time_sleep_until_basic.phpt
2012-04-03 11:08:02 +02:00
Anatoliy Belsky 469cd3abf1 Fix bug #61517 random test failure - ext/standard/tests/misc/time_sleep_until_basic.phpt 2012-04-03 11:04:52 +02:00
reeze 054f3e3ce5 Implemented FR #61602 Allow access to name of constant used as default value 2012-04-03 13:51:44 +08:00
Xinchen Hui e7a36ad902 Merge branch 'PHP-5.3' into PHP-5.4 2012-04-03 12:18:42 +08:00
Xinchen Hui 6d97e28e42 Update NEWS for #61541 2012-04-03 12:13:59 +08:00
Moriyoshi Koizumi 43047598c4 Merge branch 'PHP-5.3' into PHP-5.4
Conflicts:
	NEWS
2012-04-03 02:00:23 +09:00
Moriyoshi Koizumi a6c95c8a00 Reset LIBS temporarily to make sure PHP_CHECK_FUNC will look into libc.
See Gentoo bug #364139. https://bugs.gentoo.org/show_bug.cgi?id=364139
Reported by Naohiro Aota.
2012-04-03 01:51:23 +09:00
Anatoliy Belsky 374646c36b Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  updated the libmagic.patch
  Bug #61566 Fileinfo ext\fileinfo\tests\finfo_file_002.phpt fails
  Fix bug #61565 Fileinfo ext\fileinfo\tests\finfo_file_001.phpt fails
  - update to openssl 0.9.8u

Conflicts:
	ext/fileinfo/tests/finfo_open_001.phpt
	ext/fileinfo/tests/finfo_open_error.phpt
	win32/build/libs_version.txt
2012-04-02 17:36:50 +02:00
Anatoliy Belsky 8684fb7fac updated the libmagic.patch 2012-04-02 17:27:23 +02:00
Anatoliy Belsky 909713e233 Bug #61566 Fileinfo ext\fileinfo\tests\finfo_file_002.phpt fails
This patch fixes the failure caused by the
posix lseek and read versions under windows in cdf_read() .
Additionally all the occurences of lseek and read
was replaced by _lseek and _reed for windows.
2012-04-02 17:22:46 +02:00
Anatoliy Belsky 0cdba53aae Fix bug #61565 Fileinfo ext\fileinfo\tests\finfo_file_001.phpt fails 2012-04-02 17:19:09 +02:00
Pierre Joye 69e0e03457 - update to openssl 0.9.8u 2012-04-02 13:09:19 +02:00
Pierre Joye 55a6f3a12d - update to openssl 0.9.8u 2012-04-02 13:07:59 +02:00
Derick Rethans 6c6bec5760 Merge branch 'PHP-5.3' into PHP-5.4 2012-04-02 10:40:02 +01:00
Derick Rethans 0e53ac49e6 - Updated to version 2012.3 (2012c) 2012-04-02 10:40:01 +01:00
Popa Adrian Marius 4ad9323fa2 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
2012-04-02 10:03:25 +03:00
Popa Adrian Marius 09b303425a Merge branch 'PHP-5.4' of git.php.net:php-src into PHP-5.4 2012-04-02 10:03:18 +03:00
Popa Adrian Marius 66b3b44fd5 Merge branch 'PHP-5.3' of git.php.net:php-src into PHP-5.3 2012-04-02 10:02:45 +03:00
David Soria Parra 3bf53aa911 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Cleanup Safe Mode related comment in SG(request_info)
2012-03-31 09:34:25 +02:00
reeze ff8be9845f Cleanup Safe Mode related comment in SG(request_info) 2012-03-31 09:34:08 +02:00
Christopher Jones aa774a51d5 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Add php.ini parameter checks for OCI8
2012-03-30 16:17:37 -07:00
Christopher Jones 132d7113ea Merge branch 'add-oci8-ini-tests' into PHP-5.3
* add-oci8-ini-tests:
  Add php.ini parameter checks for OCI8
2012-03-30 16:16:32 -07:00
Christopher Jones c56cfbd234 Add php.ini parameter checks for OCI8
Add tests for OCI8 php.ini parameters particularly to check
which parameters can be changes with ini_set().
2012-03-30 16:12:25 -07:00
Christopher Jones 4e8cab94d3 Merge branch 'PHP-5.4' of https://git.php.net/repository/php-src into PHP-5.4
* 'PHP-5.4' of https://git.php.net/repository/php-src:
  trivial change try to ci a "fake" merge
  Fix test,  parameter signatures was introduced only into 5.4
  fix makedist for new tags
2012-03-30 10:48:45 -07:00
Xinchen Hui 14fdb8bf0a trivial change try to ci a "fake" merge
seems now a empty merge will not be accepted by pre-receive-hook
  "remote: We cannot figure out what you comitted!"
2012-03-30 20:50:45 +08:00
Xinchen Hui e2edc820e0 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix test,  parameter signatures was introduced only into 5.4
2012-03-30 20:45:09 +08:00
Xinchen Hui 6b4112c98a Fix test, parameter signatures was introduced only into 5.4 2012-03-30 20:37:48 +08:00
Stanislav Malyshev 82f166fa73 fix makedist for new tags 2012-03-30 00:01:52 -07:00
Christopher Jones 06235747b1 Merge branch 'PHP-5.4' of https://git.php.net/repository/php-src into PHP-5.4
* 'PHP-5.4' of https://git.php.net/repository/php-src:
  Fixed bug61115-1.phpt for debug build version.
  Fixed bug #60718 Complie problem with libpq (PostgreSQL 7.3 or less)
  Fixed bug #60718 Complie problem with libpq (PostgreSQL 7.3 or less)
  This will be PHP 5.3.12
  ext/pcntl/pcntl.c: Fix typo in comment
  Revert "ext/pcntl/pcntl.c: Fix typo in comment" (apply correct workflow)
  Revert "ext/pcntl/pcntl.c: Fix typo in comment" (apply correct workflow)
  ext/pcntl/pcntl.c: Fix typo in comment
  ext/pcntl/pcntl.c: Fix typo in comment
  - fix bug #61541, Segfault when using ob_* in output_callback
  - fix bug #61541, Segfault when using ob_* in output_callback
  update NEWS
  fix bug #61367 - open_basedir bypass using libxml RSHUTDOWN
  open_basedir check for linkinfo
  NEWS entry for readline fix
  NEWS entry for readline fix
  Add open_basedir checks to readline_write_history and readline_read_history
2012-03-29 17:42:40 -07:00
Popa Adrian Marius 5d8a0fd7ec Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix firebird bug #60947 , tested and now it prints the header page information from database
2012-03-29 18:28:22 +03:00
Popa Adrian Marius 97f4fc22c5 Fix firebird bug #60947 , tested and now it prints the header page information from database 2012-03-29 18:28:01 +03:00
Shein Alexey c02aa086c6 Resolved conflict. 2012-03-29 17:03:43 +05:00
Shein Alexey c0f806a69c Merge branch 'fix-debug-build-bug61115-1.phpt' into PHP-5.3
* fix-debug-build-bug61115-1.phpt:
  Fixed bug61115-1.phpt for debug build version.
2012-03-29 17:01:40 +05:00
Shein Alexey e1352b0416 Fixed bug61115-1.phpt for debug build version. 2012-03-29 16:51:45 +05:00
Yasuo Ohgaki 8449e0ca89 Fixed bug #60718 Complie problem with libpq (PostgreSQL 7.3 or less) 2012-03-29 20:04:15 +09:00
Yasuo Ohgaki aecf5485e3 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed bug #60718 Complie problem with libpq (PostgreSQL 7.3 or less)
2012-03-29 19:55:06 +09:00
Yasuo Ohgaki 931831bf75 Fixed bug #60718 Complie problem with libpq (PostgreSQL 7.3 or less) 2012-03-29 19:48:58 +09:00
Johannes Schlüter 1d8664b90b Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  This will be PHP 5.3.12

Conflicts:
	configure.in
	main/php_version.h
2012-03-29 11:43:26 +02:00
Johannes Schlüter fb124764de This will be PHP 5.3.12 2012-03-29 11:22:44 +02:00
Johannes Schlüter 0bca6214c6 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
2012-03-29 10:57:57 +02:00
Johannes Schlüter 21fa9634c1 Merge remote branch 'security/PHP-5.3' into PHP-5.3
* security/PHP-5.3:
  fix bug #61367 - open_basedir bypass using libxml RSHUTDOWN
  open_basedir check for linkinfo
  NEWS entry for readline fix
  Add open_basedir checks to readline_write_history and readline_read_history
2012-03-29 10:54:08 +02:00
Gustavo André dos Santos Lopes f4873c68a6 Merge branch '5.3' into 5.4
Conflicts:
	main/output.c
2012-03-29 08:47:58 +01:00
Gustavo André dos Santos Lopes 67bf07f3e7 Merge rebased pull request #24 onto 5.3 into 5.3 2012-03-29 08:46:37 +01:00
Jille Timmermans 710335b2a3 ext/pcntl/pcntl.c: Fix typo in comment
Signed-off-by: Jille Timmermans <jille@quis.cx>
2012-03-29 08:46:04 +01:00
Gustavo André dos Santos Lopes 616d802974 Revert "ext/pcntl/pcntl.c: Fix typo in comment" (apply correct workflow)
This reverts commit 4aeabaf8e9.
2012-03-29 08:45:00 +01:00
Gustavo André dos Santos Lopes 117cdf384f Revert "ext/pcntl/pcntl.c: Fix typo in comment" (apply correct workflow)
This reverts commit 55b1e61242.
2012-03-29 08:44:19 +01:00
Jille Timmermans 55b1e61242 ext/pcntl/pcntl.c: Fix typo in comment
Signed-off-by: Jille Timmermans <jille@quis.cx>
2012-03-29 09:07:07 +09:00
Yasuo Ohgaki f38ee78344 Merge branch 'pull-request/25' into 5.3
* pull-request/25:
  - fix bug #61541, Segfault when using ob_* in output_callback
2012-03-29 08:51:29 +09:00
Christopher Jones 4b72d505ae Merge branch 'PHP-5.4' of https://git.php.net/repository/php-src into PHP-5.4
* 'PHP-5.4' of https://git.php.net/repository/php-src:
  Refactoring junit logger. Added generation of nested testsuites in junit.xml.
2012-03-28 16:16:20 -07:00
reeze abd2b2ee43 - fix bug #61541, Segfault when using ob_* in output_callback 2012-03-29 06:23:05 +09:00
reeze 9bc91a21db - fix bug #61541, Segfault when using ob_* in output_callback 2012-03-29 00:18:02 +08:00
679 changed files with 13436 additions and 27642 deletions

No files matched your search

+150
View File
@@ -22,3 +22,153 @@ sapi/continuity/capi.c ident
Zend/RFCs/002.txt ident
Zend/RFCs/003.txt ident
NEWS merge=NEWS
/ext/bz2/tests/with_strings.phpt -crlf
/ext/dom/tests/bug40836.phpt -crlf
/ext/dom/tests/domelement.phpt -crlf
/ext/ereg/tests/eregi_basic_002.phpt -crlf
/ext/iconv/tests/iconv004.phpt -crlf
/ext/iconv/tests/iconv_basic.phpt -crlf
/ext/iconv/tests/iconv_strpos.phpt -crlf
/ext/iconv/tests/iconv_strpos_variation2.phpt -crlf
/ext/mbstring/tests/mb_strtoupper_error2.phpt -crlf
/ext/phar/tests/delete_in_phar_confirm.phpt -crlf
/ext/phar/tests/frontcontroller12.phpt -crlf
/ext/phar/tests/security.phpt -crlf
/ext/phar/tests/test_signaturealgos.phpt -crlf
/ext/reflection/tests/ReflectionMethod_invokeArgs_basic.phpt -crlf
/ext/reflection/tests/ReflectionProperty_getModifiers_basic.phpt -crlf
/ext/spl/tests/dllist_007.phpt -crlf
/ext/spl/tests/iterator_012.phpt -crlf
/ext/spl/tests/SplArray_fromArray.phpt -crlf
/ext/standard/tests/dir/scandir_variation3.phpt -crlf
/ext/standard/tests/general_functions/escapeshellcmd-win32.phpt -crlf
/ext/standard/tests/general_functions/set_magic_quotes_runtime_error.phpt -crlf
/ext/standard/tests/strings/bug26817.phpt -crlf
/ext/standard/tests/strings/bug26973.phpt -crlf
/ext/standard/tests/strings/bug27457.phpt -crlf
/ext/standard/tests/strings/bug28386.phpt -crlf
/ext/standard/tests/strings/bug37262.phpt -crlf
/ext/standard/tests/strings/bug40637.phpt -crlf
/ext/standard/tests/strings/bug40915.phpt -crlf
/ext/standard/tests/strings/bug61374.phpt -crlf
/ext/standard/tests/strings/chop_error.phpt -crlf
/ext/standard/tests/strings/chop_variation2.phpt -crlf
/ext/standard/tests/strings/chunk_split_variation10.phpt -crlf
/ext/standard/tests/strings/chunk_split_variation8.phpt -crlf
/ext/standard/tests/strings/count_chars_variation2.phpt -crlf
/ext/standard/tests/strings/dirname_error.phpt -crlf
/ext/standard/tests/strings/fprintf_variation_007_64bit.phpt -crlf
/ext/standard/tests/strings/highlight_file.phpt -crlf
/ext/standard/tests/strings/htmlentities03.phpt -crlf
/ext/standard/tests/strings/htmlentities04.phpt -crlf
/ext/standard/tests/strings/htmlentities08.phpt -crlf
/ext/standard/tests/strings/htmlentities15.phpt -crlf
/ext/standard/tests/strings/http_build_query.phpt -crlf
/ext/standard/tests/strings/metaphone.phpt -crlf
/ext/standard/tests/strings/ord_error.phpt -crlf
/ext/standard/tests/strings/printf_basic2.phpt -crlf
/ext/standard/tests/strings/printf_variation2.phpt -crlf
/ext/standard/tests/strings/quoted_printable_decode_basic.phpt -crlf
/ext/standard/tests/strings/rtrim.phpt -crlf
/ext/standard/tests/strings/setlocale_variation1.phpt -crlf
/ext/standard/tests/strings/sha1_basic.phpt -crlf
/ext/standard/tests/strings/similar_text_basic.phpt -crlf
/ext/standard/tests/strings/soundex.phpt -crlf
/ext/standard/tests/strings/sprintf_basic1.phpt -crlf
/ext/standard/tests/strings/sprintf_basic4.phpt -crlf
/ext/standard/tests/strings/sprintf_basic7.phpt -crlf
/ext/standard/tests/strings/sprintf_variation12.phpt -crlf
/ext/standard/tests/strings/sprintf_variation28.phpt -crlf
/ext/standard/tests/strings/sprintf_variation29.phpt -crlf
/ext/standard/tests/strings/sprintf_variation30.phpt -crlf
/ext/standard/tests/strings/sprintf_variation31.phpt -crlf
/ext/standard/tests/strings/sprintf_variation38.phpt -crlf
/ext/standard/tests/strings/sprintf_variation42.phpt -crlf
/ext/standard/tests/strings/sprintf_variation6.phpt -crlf
/ext/standard/tests/strings/sscanf_basic2.phpt -crlf
/ext/standard/tests/strings/sscanf_basic3.phpt -crlf
/ext/standard/tests/strings/str_getcsv_001.phpt -crlf
/ext/standard/tests/strings/stripcslashes_basic.phpt -crlf
/ext/standard/tests/strings/stripos_variation11.phpt -crlf
/ext/standard/tests/strings/stripos_variation13.phpt -crlf
/ext/standard/tests/strings/stripslashes_variation1.phpt -crlf
/ext/standard/tests/strings/stripslashes_variation2.phpt -crlf
/ext/standard/tests/strings/stristr_error.phpt -crlf
/ext/standard/tests/strings/strnatcasecmp_basic.phpt -crlf
/ext/standard/tests/strings/strncasecmp_variation6.phpt -crlf
/ext/standard/tests/strings/strncasecmp_variation7.phpt -crlf
/ext/standard/tests/strings/strncasecmp_variation8.phpt -crlf
/ext/standard/tests/strings/strrchr_error.phpt -crlf
/ext/standard/tests/strings/strrchr.phpt -crlf
/ext/standard/tests/strings/strrchr_variation11.phpt -crlf
/ext/standard/tests/strings/strrpos_error.phpt -crlf
/ext/standard/tests/strings/strrpos_variation4.phpt -crlf
/ext/standard/tests/strings/strrpos_variation8.phpt -crlf
/ext/standard/tests/strings/strstr2.phpt -crlf
/ext/standard/tests/strings/strtok_error.phpt -crlf
/ext/standard/tests/strings/strtok_variation2.phpt -crlf
/ext/standard/tests/strings/strtolower-win32.phpt -crlf
/ext/standard/tests/strings/substr_compare.phpt -crlf
/ext/standard/tests/strings/ucwords_variation1.phpt -crlf
/ext/standard/tests/strings/unpack.phpt -crlf
/ext/standard/tests/strings/vfprintf_basic7_64bit.phpt -crlf
/ext/standard/tests/strings/vfprintf_variation11_64bit.phpt -crlf
/ext/standard/tests/strings/vfprintf_variation12_64bit.phpt -crlf
/ext/standard/tests/strings/vfprintf_variation12.phpt -crlf
/ext/standard/tests/strings/vfprintf_variation13_64bit.phpt -crlf
/ext/standard/tests/strings/vfprintf_variation7.phpt -crlf
/ext/standard/tests/strings/vprintf_basic2.phpt -crlf
/ext/standard/tests/strings/vprintf_basic7_64bit.phpt -crlf
/ext/standard/tests/strings/vprintf_variation10.phpt -crlf
/ext/standard/tests/strings/vprintf_variation14_64bit.phpt -crlf
/ext/standard/tests/strings/vprintf_variation17.phpt -crlf
/ext/standard/tests/strings/vprintf_variation4.phpt -crlf
/ext/standard/tests/strings/vsprintf_basic4.phpt -crlf
/ext/standard/tests/strings/vsprintf_basic8.phpt -crlf
/ext/standard/tests/strings/vsprintf_variation12_64bit.phpt -crlf
/ext/standard/tests/strings/vsprintf_variation13_64bit.phpt -crlf
/ext/standard/tests/strings/vsprintf_variation15_64bit.phpt -crlf
/ext/standard/tests/strings/vsprintf_variation17.phpt -crlf
/ext/standard/tests/strings/vsprintf_variation4_64bit.phpt -crlf
/ext/standard/tests/strings/vsprintf_variation7.phpt -crlf
/ext/standard/tests/strings/wordwrap.phpt -crlf
/ext/standard/tests/strings/wordwrap_variation5.phpt -crlf
/ext/standard/tests/url/rawurldecode_variation_001.phpt -crlf
/ext/tidy/tests/009.phpt -crlf
/ext/tidy/tests/013.phpt -crlf
/ext/tidy/tests/021.phpt -crlf
/ext/tidy/tests/tidy_error.phpt -crlf
/ext/tokenizer/tests/002.phpt -crlf
/ext/tokenizer/tests/bug26463.phpt -crlf
/ext/tokenizer/tests/token_get_all_error.phpt -crlf
/ext/tokenizer/tests/token_get_all_variation11.phpt -crlf
/ext/tokenizer/tests/token_get_all_variation12.phpt -crlf
/ext/tokenizer/tests/token_get_all_variation13.phpt -crlf
/ext/tokenizer/tests/token_get_all_variation14.phpt -crlf
/ext/tokenizer/tests/token_get_all_variation15.phpt -crlf
/ext/tokenizer/tests/token_get_all_variation18.phpt -crlf
/ext/tokenizer/tests/token_get_all_variation19.phpt -crlf
/ext/tokenizer/tests/token_get_all_variation1.phpt -crlf
/ext/tokenizer/tests/token_get_all_variation2.phpt -crlf
/ext/tokenizer/tests/token_get_all_variation3.phpt -crlf
/ext/tokenizer/tests/token_get_all_variation5.phpt -crlf
/ext/tokenizer/tests/token_get_all_variation8.phpt -crlf
/ext/xml/tests/bug32001b.phpt -crlf
/ext/xmlwriter/tests/OO_003.phpt -crlf
/ext/xmlwriter/tests/xmlwriter_write_attribute_ns_error_001.phpt -crlf
/ext/zlib/tests/008.phpt -crlf
/ext/zlib/tests/gzopen_variation4.phpt -crlf
/ext/zlib/tests/gzrewind_error.phpt -crlf
/ext/zlib/tests/readgzfile_variation7.phpt -crlf
/ext/zlib/tests/readgzfile_variation8.phpt -crlf
/ext/zlib/tests/zlib_scheme_stat_basic.phpt -crlf
/sapi/cli/tests/006.phpt -crlf
/tests/run-test/test009.phpt -crlf
/Zend/tests/012.phpt -crlf
/Zend/tests/bug28072.phpt -crlf
/Zend/tests/bug38624.phpt -crlf
/Zend/tests/bug40784.phpt -crlf
/Zend/tests/bug43053.phpt -crlf
/Zend/tests/bug51176.phpt -crlf
/Zend/tests/each_003.phpt -crlf
/Zend/tests/errmsg_006.phpt -crlf
+10
View File
@@ -0,0 +1,10 @@
language: php
php:
# We only specify one version so we only get one worker
- 5.4
notifications:
email: false
script: exit 0
+493 -18
View File
@@ -1,6 +1,251 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 2012, PHP 5.4.1 RC1
16 Aug 2012, PHP 5.4.6
- CLI Server:
. Implemented FR #62700 (have the console output 'Listening on
http://localhost:8000'). (pascal.chevrel@free.fr)
- Core:
. Fixed bug #62661 (Interactive php-cli crashes if include() is used in
auto_prepend_file). (Laruence)
. Fixed bug #62653: (unset($array[$float]) causes a crash). (Nikita Popov,
Laruence)
. Fixed bug #62565 (Crashes due non-initialized internal properties_table).
(Felipe)
. Fixed bug #60194 (--with-zend-multibyte and --enable-debug reports LEAK
with run-test.php). (Laruence)
- CURL:
. Fixed bug #62499 (curl_setopt($ch, CURLOPT_COOKIEFILE, "") returns false).
(r.hampartsumyan@gmail.com, Laruence)
- DateTime:
. Fixed Bug #62500 (Segfault in DateInterval class when extended). (Laruence)
- Fileinfo:
. Fixed bug #61964 (finfo_open with directory causes invalid free).
(reeze.xia@gmail.com)
- Intl:
. Fixed bug #62564 (Extending MessageFormatter and adding property causes
crash). (Felipe)
- MySQLnd:
. Fixed bug #62594 (segfault in mysqlnd_res_meta::set_mode). (Laruence)
- readline:
. Fixed bug #62612 (readline extension compilation fails with
sapi/cli/cli.h: No such file). (Johannes)
- Reflection:
. Implemented FR #61602 (Allow access to name of constant used as default
value). (reeze.xia@gmail.com)
- SimpleXML:
. Implemented FR #55218 Get namespaces from current node. (Lonny)
- SPL:
. Fixed bug #62616 (ArrayIterator::count() from IteratorIterator instance
gives Segmentation fault). (Laruence, Gustavo)
. Fixed bug #61527 (ArrayIterator gives misleading notice on next() when
moved to the end). (reeze.xia@gmail.com)
- Streams:
. Fixed bug #62597 (segfault in php_stream_wrapper_log_error with ZTS build).
(Laruence)
- Zlib:
. Fixed bug #55544 (ob_gzhandler always conflicts with
zlib.output_compression). (Laruence)
19 Jul 2012, PHP 5.4.5
- Core:
. Fixed bug #62443 (Crypt SHA256/512 Segfaults With Malformed
Salt). (Anthony Ferrara)
. Fixed bug #62432 (ReflectionMethod random corrupt memory on high
concurrent). (Johannes)
. Fixed bug #62373 (serialize() generates wrong reference to the object).
(Moriyoshi)
. Fixed bug #62357 (compile failure: (S) Arguments missing for built-in
function __memcmp). (Laruence)
. Fixed bug #61998 (Using traits with method aliases appears to result in
crash during execution). (Dmitry)
. Fixed bug #51094 (parse_ini_file() with INI_SCANNER_RAW cuts a value that
includes a semi-colon). (Pierrick)
. Fixed potential overflow in _php_stream_scandir (CVE-2012-2688).
(Jason Powell, Stas)
- EXIF:
. Fixed information leak in ext exif (discovered by Martin Noga,
Matthew "j00ru" Jurczyk, Gynvael Coldwind)
- FPM:
. Fixed bug #62205 (php-fpm segfaults (null passed to strstr)). (fat)
. Fixed bug #62160 (Add process.priority to set nice(2) priorities). (fat)
. Fixed bug #62153 (when using unix sockets, multiples FPM instances
. Fixed bug #62033 (php-fpm exits with status 0 on some failures to start).
(fat)
. Fixed bug #61839 (Unable to cross-compile PHP with --enable-fpm). (fat)
. Fixed bug #61835 (php-fpm is not allowed to run as root). (fat)
. Fixed bug #61295 (php-fpm should not fail with commented 'user'
. Fixed bug #61218 (FPM drops connection while receiving some binary values
in FastCGI requests). (fat)
. Fixed bug #61045 (fpm don't send error log to fastcgi clients). (fat)
for non-root start). (fat)
. Fixed bug #61026 (FPM pools can listen on the same address). (fat)
can be launched without errors). (fat)
- Iconv:
. Fix bug #55042 (Erealloc in iconv.c unsafe). (Stas)
- Intl:
. Fixed bug #62083 (grapheme_extract() memory leaks). (Gustavo)
. ResourceBundle constructor now accepts NULL for the first two arguments.
(Gustavo)
. Fixed bug #62081 (IntlDateFormatter constructor leaks memory when called
twice). (Gustavo)
. Fixed bug #62070 (Collator::getSortKey() returns garbage). (Gustavo)
. Fixed bug #62017 (datefmt_create with incorrectly encoded timezone leaks
pattern). (Gustavo)
. Fixed bug #60785 (memory leak in IntlDateFormatter constructor). (Gustavo)
- JSON:
. Fixed bug #61359 (json_encode() calls too many reallocs). (Stas)
- libxml:
. Fixed bug #62266 (Custom extension segfaults during xmlParseFile with FPM
SAPI). (Gustavo)
- Phar:
. Fixed bug #62227 (Invalid phar stream path causes crash). (Felipe)
- Readline:
. Fixed bug #62186 (readline fails to compile - void function should not
return a value). (Johannes)
- Reflection:
. Fixed bug #62384 (Attempting to invoke a Closure more than once causes
segfault). (Felipe)
. Fixed bug #62202 (ReflectionParameter::getDefaultValue() memory leaks
with constant). (Laruence)
- Sockets:
. Fixed bug #62025 (__ss_family was changed on AIX 5.3). (Felipe)
- SPL:
. Fixed bug #62433 (Inconsistent behavior of RecursiveDirectoryIterator to
dot files). (Laruence)
. Fixed bug #62262 (RecursiveArrayIterator does not implement Countable).
(Nikita Popov)
- XML Writer:
. Fixed bug #62064 (memory leak in the XML Writer module).
(jean-pierre dot lozi at lip6 dot fr)
- Zip:
. Upgraded libzip to 0.10.1 (Anatoliy)
14 Jun 2012, PHP 5.4.4
- COM:
. Fixed bug #62146 com_dotnet cannot be built shared. (Johannes)
- CLI Server:
. Implemented FR #61977 (Need CLI web-server support for files with .htm &
svg extensions). (Sixd, Laruence)
. Improved performance while sending error page, this also fixed
bug #61785 (Memory leak when access a non-exists file without router).
(Laruence)
. Fixed bug #61546 (functions related to current script failed when chdir()
in cli sapi). (Laruence, reeze.xia@gmail.com)
- Core:
. Fixed missing bound check in iptcparse(). (chris at chiappa.net)
. Fixed CVE-2012-2143. (Solar Designer)
. Fixed bug #62097 (fix for for bug #54547). (Gustavo)
. Fixed bug #62005 (unexpected behavior when incrementally assigning to a
member of a null object). (Laruence)
. Fixed bug #61978 (Object recursion not detected for classes that implement
JsonSerializable). (Felipe)
. Fixed bug #61991 (long overflow in realpath_cache_get()). (Anatoliy)
. Fixed bug #61922 (ZTS build doesn't accept zend.script_encoding config).
(Laruence)
. Fixed bug #61827 (incorrect \e processing on Windows) (Anatoliy)
. Fixed bug #61782 (__clone/__destruct do not match other methods when checking
access controls). (Stas)
. Fixed bug #61764 ('I' unpacks n as signed if n > 2^31-1 on LP64). (Gustavo)
. Fixed bug #61761 ('Overriding' a private static method with a different
signature causes crash). (Laruence)
. Fixed bug #61730 (Segfault from array_walk modifying an array passed by
reference). (Laruence)
. Fixed bug #61728 (PHP crash when calling ob_start in request_shutdown
phase). (Laruence)
. Fixed bug #61713 (Logic error in charset detection for htmlentities).
(Anatoliy)
. Fixed bug #61660 (bin2hex(hex2bin($data)) != $data). (Nikita Popov)
. Fixed bug #61650 (ini parser crashes when using ${xxxx} ini variables
(without apache2)). (Laruence)
. Fixed bug #61605 (header_remove() does not remove all headers). (Laruence)
. Fixed bug #54547 (wrong equality of string numbers). (Gustavo)
. Fixed bug #54197 ([PATH=] sections incompatibility with user_ini.filename
set to null). (Anatoliy)
. Changed php://fd to be available only for CLI.
- CURL:
. Fixed bug #61948 (CURLOPT_COOKIEFILE '' raises open_basedir restriction).
(Laruence)
- Fileinfo
. Fixed bug #61812 (Uninitialised value used in libmagic).
(Laruence, Gustavo)
. Fixed bug #61566 failure caused by the posix lseek and read versions
under windows in cdf_read(). (Anatoliy)
. Fixed bug #61565 where php_stream_open_wrapper_ex tries to open a
directory descriptor under windows. (Anatoliy)
- Intl
. Fixed bug #62082 (Memory corruption in internal function
get_icu_disp_value_src_php()). (Gustavo)
- Libxml:
. Fixed bug #61617 (Libxml tests failed(ht is already destroyed)).
(Laruence)
- PDO:
. Fixed bug #61755 (A parsing bug in the prepared statements can lead to
access violations). (Johannes)
- Phar:
. Fixed bug #61065 (Secunia SA44335, CVE-2012-2386). (Rasmus)
- Pgsql:
. Added pg_escape_identifier/pg_escape_literal. (Yasuo Ohgaki)
- Streams:
. Fixed bug #61961 (file_get_contents leaks when access empty file with
maxlen set). (Reeze)
- Zlib:
. Fixed bug #61820 (using ob_gzhandler will complain about headers already
sent when no compression). (Mike)
. Fixed bug #61443 (can't change zlib.output_compression on the fly). (Mike)
. Fixed bug #60761 (zlib.output_compression fails on refresh). (Mike)
08 May 2012, PHP 5.4.3
- CGI
. Re-Fix PHP-CGI query string parameter vulnerability, CVE-2012-1823.
(Stas)
. Fix bug #61807 - Buffer Overflow in apache_request_headers.
(nyt-php at countercultured dot net).
03 May 2012, PHP 5.4.2
- Fix PHP-CGI query string parameter vulnerability, CVE-2012-1823. (Rasmus)
26 Apr 2012, PHP 5.4.1
- CLI Server:
. Fixed bug #61461 (missing checks around malloc() calls). (Ilia)
@@ -9,6 +254,7 @@ PHP NEWS
. "Connection: close" instead of "Connection: closed" (Gustavo)
- Core:
. Fixed crash in ZTS using same class in many threads. (Johannes)
. Fixed bug #61374 (html_entity_decode tries to decode code points that don't
exist in ISO-8859-1). (Gustavo)
. Fixed bug #61273 (call_user_func_array with more than 16333 arguments
@@ -40,6 +286,9 @@ PHP NEWS
function is by reference). (Nikita Popov)
. Improve performance of set_exception_handler while doing reset (Laruence)
- fileinfo:
. Fix fileinfo test problems. (Anatoliy Belsky)
- FPM
. Fixed bug #61430 (Transposed memset() params in sapi/fpm/fpm/fpm_shm.c).
(michaelhood at gmail dot com, Ilia)
@@ -62,26 +311,10 @@ PHP NEWS
. Fixed bug #61003 (mysql_stat() require a valid connection). (Johannes).
- mysqlnd
. Fixed bug #61704 (Crash apache, phpinfo() threading issue). (Johannes)
. Fixed bug #60948 (mysqlnd FTBFS when -Wformat-security is enabled).
(Johannes)
- Readline:
. Fixed bug #61088 (Memory leak in readline_callback_handler_install).
(Nikic, Laruence)
- Session
. Fixed bug #60634 (Segmentation fault when trying to die() in
SessionHandler::write()). (Ilia)
- SOAP
. Fixed bug #61423 (gzip compression fails). (Ilia)
. Fixed bug #60887 (SoapClient ignores user_agent option and sends no
User-Agent header). (carloschilazo at gmail dot com)
. Fixed bug #60842, #51775 (Chunked response parsing error when
chunksize length line is > 10 bytes). (Ilia)
. Fixed bug #49853 (Soap Client stream context header option ignored).
(Dmitry)
- PDO
. Fixed bug #61292 (Segfault while calling a method on an overloaded PDO
object). (Laruence)
@@ -99,10 +332,29 @@ PHP NEWS
. Fixed bug #61184 (Phar::webPhar() generates headers with trailing NUL
bytes). (Nikita Popov)
- Readline:
. Fixed bug #61088 (Memory leak in readline_callback_handler_install).
(Nikic, Laruence)
- Reflection:
. Implemented FR #61602 (Allow access to the name of constant
used as function/method parameter's default value). (reeze.xia@gmail.com)
. Fixed bug #60968 (Late static binding doesn't work with
ReflectionMethod::invokeArgs()). (Laruence)
- Session
. Fixed bug #60634 (Segmentation fault when trying to die() in
SessionHandler::write()). (Ilia)
- SOAP
. Fixed bug #61423 (gzip compression fails). (Ilia)
. Fixed bug #60887 (SoapClient ignores user_agent option and sends no
User-Agent header). (carloschilazo at gmail dot com)
. Fixed bug #60842, #51775 (Chunked response parsing error when
chunksize length line is > 10 bytes). (Ilia)
. Fixed bug #49853 (Soap Client stream context header option ignored).
(Dmitry)
- SPL:
. Fixed bug #61453 (SplObjectStorage does not identify objects correctly).
(Gustavo)
@@ -559,6 +811,228 @@ PHP NEWS
. Fixed bug #55544 (ob_gzhandler always conflicts with zlib.output_compression).
(Mike)
14 Jun 2012, PHP 5.3.14
- CLI SAPI:
. Fixed bug #61546 (functions related to current script failed when chdir()
in cli sapi). (Laruence, reeze.xia@gmail.com)
- CURL:
. Fixed bug #61948 (CURLOPT_COOKIEFILE '' raises open_basedir restriction).
(Laruence)
- COM:
. Fixed bug #62146 com_dotnet cannot be built shared. (Johannes)
- Core:
. Fixed CVE-2012-2143. (Solar Designer)
. Fixed missing bound check in iptcparse(). (chris at chiappa.net)
. Fixed bug #62373 (serialize() generates wrong reference to the object).
(Moriyoshi)
. Fixed bug #62005 (unexpected behavior when incrementally assigning to a
member of a null object). (Laruence)
. Fixed bug #61991 (long overflow in realpath_cache_get()). (Anatoliy)
. Fixed bug #61764 ('I' unpacks n as signed if n > 2^31-1 on LP64). (Gustavo)
. Fixed bug #61730 (Segfault from array_walk modifying an array passed by
reference). (Laruence)
. Fixed bug #61713 (Logic error in charset detection for htmlentities).
(Anatoliy)
. Fixed bug #54197 ([PATH=] sections incompatibility with user_ini.filename
set to null). (Anatoliy)
. Changed php://fd to be available only for CLI.
- Fileinfo:
. Fixed bug #61812 (Uninitialised value used in libmagic).
(Laruence, Gustavo)
- Iconv extension:
. Fixed a bug that iconv extension fails to link to the correct library
when another extension makes use of a library that links to the iconv
library. See https://bugs.gentoo.org/show_bug.cgi?id=364139 for detail.
(Moriyoshi)
- Intl:
. Fixed bug #62082 (Memory corruption in internal function
get_icu_disp_value_src_php()). (Gustavo)
- JSON
. Fixed bug #61537 (json_encode() incorrectly truncates/discards
information). (Adam)
- PDO:
. Fixed bug #61755 (A parsing bug in the prepared statements can lead to
access violations). (Johannes)
- Phar:
. Fix bug #61065 (Secunia SA44335). (Rasmus)
- Streams:
. Fixed bug #61961 (file_get_contents leaks when access empty file with
maxlen set). (Reeze)
08 May 2012, PHP 5.3.13
- CGI
. Improve fix for PHP-CGI query string parameter vulnerability, CVE-2012-2311.
(Stas)
03 May 2012, PHP 5.3.12
- Fix PHP-CGI query string parameter vulnerability, CVE-2012-1823. (Rasmus)
26 Apr 2012, PHP 5.3.11
- Core:
. Fixed bug #61605 (header_remove() does not remove all headers).
(Laruence)
. Fixed bug #61541 (Segfault when using ob_* in output_callback).
(reeze.xia@gmail.com)
. Fixed bug #61273 (call_user_func_array with more than 16333 arguments
leaks / crashes). (Laruence)
. Fixed bug #61165 (Segfault - strip_tags()). (Laruence)
. Improved max_input_vars directive to check nested variables (Dmitry).
. Fixed bug #61095 (Incorect lexing of 0x00*+<NUM>). (Etienne)
. Fixed bug #61087 (Memory leak in parse_ini_file when specifying
invalid scanner mode). (Nikic, Laruence)
. Fixed bug #61072 (Memory leak when restoring an exception handler).
(Nikic, Laruence)
. Fixed bug #61058 (array_fill leaks if start index is PHP_INT_MAX).
(Laruence)
. Fixed bug #61043 (Regression in magic_quotes_gpc fix for CVE-2012-0831).
(Ondřej Surý)
. Fixed bug #61000 (Exceeding max nesting level doesn't delete numerical
vars). (Laruence)
. Fixed bug #60895 (Possible invalid handler usage in windows random
functions). (Pierre)
. Fixed bug #60825 (Segfault when running symfony 2 tests).
(Dmitry, Laruence)
. Fixed bug #60801 (strpbrk() mishandles NUL byte). (Adam)
. Fixed bug #60569 (Nullbyte truncates Exception $message). (Ilia)
. Fixed bug #60227 (header() cannot detect the multi-line header with CR).
(rui, Gustavo)
. Fixed bug #60222 (time_nanosleep() does validate input params). (Ilia)
. Fixed bug #54374 (Insufficient validating of upload name leading to
corrupted $_FILES indices). (CVE-2012-1172). (Stas, lekensteyn at
gmail dot com, Pierre)
. Fixed bug #52719 (array_walk_recursive crashes if third param of the
function is by reference). (Nikita Popov)
. Fixed bug #51860 (Include fails with toplevel symlink to /). (Dmitry)
- DOM
. Added debug info handler to DOM objects. (Gustavo, Joey Smith)
- FPM
. Fixed bug #61430 (Transposed memset() params in sapi/fpm/fpm/fpm_shm.c).
(michaelhood at gmail dot com, Ilia)
- Ibase
. Fixed bug #60947 (Segmentation fault while executing ibase_db_info).
(Ilia)
- Installation
. Fixed bug #61172 (Add Apache 2.4 support). (Chris Jones)
- Fileinfo
. Fixed bug #61173 (Unable to detect error from finfo constructor). (Gustavo)
- Firebird Database extension (ibase):
. Fixed bug #60802 (ibase_trans() gives segfault when passing params).
- Libxml:
. Fixed bug #61617 (Libxml tests failed(ht is already destroyed)).
(Laruence)
. Fixed bug #61367 (open_basedir bypass using libxml RSHUTDOWN).
(Tim Starling)
- mysqli
. Fixed bug #61003 (mysql_stat() require a valid connection). (Johannes).
- PDO_mysql
. Fixed bug #61207 (PDO::nextRowset() after a multi-statement query doesn't
always work). (Johannes)
. Fixed bug #61194 (PDO should export compression flag with myslqnd).
(Johannes)
- PDO_odbc
. Fixed bug #61212 (PDO ODBC Segfaults on SQL_SUCESS_WITH_INFO). (Ilia)
- PDO_pgsql
. Fixed bug #61267 (pdo_pgsql's PDO::exec() returns the number of SELECTed
rows on postgresql >= 9). (ben dot pineau at gmail dot com)
- PDO_Sqlite extension:
. Add createCollation support. (Damien)
- Phar:
. Fixed bug #61184 (Phar::webPhar() generates headers with trailing NUL
bytes). (Nikic)
- PHP-FPM SAPI:
. Fixed bug #60811 (php-fpm compilation problem). (rasmus)
- Readline:
. Fixed bug #61088 (Memory leak in readline_callback_handler_install).
(Nikic, Laruence)
. Add open_basedir checks to readline_write_history and readline_read_history.
(Rasmus, reported by Mateusz Goik)
- Reflection:
. Fixed bug #61388 (ReflectionObject:getProperties() issues invalid reads
when get_properties returns a hash table with (inaccessible) dynamic
numeric properties). (Gustavo)
. Fixed bug #60968 (Late static binding doesn't work with
ReflectionMethod::invokeArgs()). (Laruence)
- SOAP
. Fixed basic HTTP authentication for WSDL sub requests. (Dmitry)
. Fixed bug #60887 (SoapClient ignores user_agent option and sends no
User-Agent header). (carloschilazo at gmail dot com)
. Fixed bug #60842, #51775 (Chunked response parsing error when
chunksize length line is > 10 bytes). (Ilia)
. Fixed bug #49853 (Soap Client stream context header option ignored).
(Dmitry)
- SPL
. Fixed memory leak when calling SplFileInfo's constructor twice. (Felipe)
. Fixed bug #61418 (Segmentation fault when DirectoryIterator's or
FilesystemIterator's iterators are requested more than once without
having had its dtor callback called in between). (Gustavo)
. Fixed bug #61347 (inconsistent isset behavior of Arrayobject). (Laruence)
. Fixed bug #61326 (ArrayObject comparison). (Gustavo)
- SQLite3 extension:
. Add createCollation() method. (Brad Dewar)
- Session:
. Fixed bug #60860 (session.save_handler=user without defined function core
dumps). (Felipe)
. Fixed bug #60634 (Segmentation fault when trying to die() in
SessionHandler::write()). (Ilia)
- Streams:
. Fixed bug #61371 (stream_context_create() causes memory leaks on use
streams_socket_create). (Gustavo)
. Fixed bug #61253 (Wrappers opened with errors concurrency problem on ZTS).
(Gustavo)
. Fixed bug #61115 (stream related segfault on fatal error in
php_stream_context_link). (Gustavo)
. Fixed bug #60817 (stream_get_line() reads from stream even when there is
already sufficient data buffered). stream_get_line() now behaves more like
fgets(), as is documented. (Gustavo)
. Further fix for bug #60455 (stream_get_line misbehaves if EOF is not
detected together with the last read). (Gustavo)
. Fixed bug #60106 (stream_socket_server silently truncates long unix
socket paths). (Ilia)
- Tidy:
. Fixed bug #54682 (tidy null pointer dereference). (Tony, David Soria Parra)
- XMLRPC:
. Fixed bug #61264 (xmlrpc_parse_method_descriptions leaks temporary
variable). (Nikita Popov)
. Fixed bug #61097 (Memory leak in xmlrpc functions copying zvals). (Nikic)
- Zlib:
. Fixed bug #61139 (gzopen leaks when specifying invalid mode). (Nikic)
02 Feb 2012, PHP 5.3.10
- Core:
@@ -771,6 +1245,7 @@ PHP NEWS
- Postgres:
. Fixed bug #60244 (pg_fetch_* functions do not validate that row param
is >0). (Ilia)
. Added PGSQL_LIBPQ_VERSION/PGSQL_LIBPQ_VERSION_STR constants. (Yasuo)
- Reflection:
. Fixed bug #60367 (Reflection and Late Static Binding). (Laruence)
+124
View File
@@ -0,0 +1,124 @@
====================
Git Commit Rules
====================
This is the first file you should be reading when contributing code via Git.
We'll assume you're basically familiar with Git, but feel free to post
your questions on the mailing list. Please have a look at
http://git-scm.com/ for more detailed information on Git.
PHP is developed through the efforts of a large number of people.
Collaboration is a Good Thing(tm), and Git lets us do this. Thus, following
some basic rules with regards to Git usage will::
a. Make everybody happier, especially those responsible for maintaining
Git itself.
b. Keep the changes consistently well documented and easily trackable.
c. Prevent some of those 'Oops' moments.
d. Increase the general level of good will on planet Earth.
Having said that, here are the organizational rules::
1. Respect other people working on the project.
2. Discuss any significant changes on the list before committing and get
confirmation from the release manager for the given branch.
3. Look at EXTENSIONS file to see who is the primary maintainer of
the code you want to contribute to.
4. If you "strongly disagree" about something another person did, don't
start fighting publicly - take it up in private email.
5. If you don't know how to do something, ask first!
6. Test your changes before committing them. We mean it. Really.
To do so use "make test".
7. For development use the --enable-maintainer-zts switch to ensure your
code handles TSRM correctly and doesn't break for those who need that.
Currently we have the following branches in use::
master The active development branch.
PHP-5.4 Is used to release the PHP 5.4.x series. It still allows for
larger enhancements.
PHP-5.3 Is used to release the PHP 5.3.x series. This is current
stable version and is open for bugfixes only.
PHP-5.2 Is used to release the PHP 5.2.x series. It is closed for
changes now.
PHP-5.1 This branch is closed.
PHP-4.4 This branch is closed.
The next few rules are more of a technical nature::
1. All changes should first go to the lowest branch (i.e. 5.3) and then
get merged up to all other branches. If a change is not needed for
later branches (i.e. fixes for features which where dropped from later
branches) an empty merge should be done.
2. All news updates intended for public viewing, such as new features,
bug fixes, improvements, etc., should go into the NEWS file of the
*first* to be released version with the given change. In other words
any NEWS file change only needs to done in one branch.
3. Do not commit multiple file and dump all messages in one commit. If you
modified several unrelated files, commit each group separately and
provide a nice commit message for each one. See example below.
4. Do write your commit message in such a way that it makes sense even
without the corresponding diff. One should be able to look at it, and
immediately know what was modified. Definitely include the function name
in the message as shown below.
5. In your commit messages, keep each line shorter than 80 characters. And
try to align your lines vertically, if they wrap. It looks bad otherwise.
6. If you modified a function that is callable from PHP, prepend PHP to
the function name as shown below.
The format of the commit messages is pretty simple.
<max 79 characters short description>\n
\n
<long description, 79 chars per line>
\n
An Example from the git project (commit 2b34e486bc):
pack-objects: Fix compilation with NO_PTHREDS
It looks like commit 99fb6e04 (pack-objects: convert to use
parse_options(), 2012-02-01) moved the #ifdef NO_PTHREDS around but
hasn't noticed that the 'arg' variable no longer is available.
If you fix some bugs, you should note the bug ID numbers in your
commit message. Bug ID should be prefixed by "#" for easier access to
bug report when developers are browsing CVS via LXR or Bonsai.
Example::
Fixed bug #14016 (pgsql notice handler double free crash bug.)
When you change the NEWS file for a bug fix, then please keep the bugs
sorted in decreasing order under the fixed version.
You can use OpenGrok (http://lxr.php.net/) and gitweb (http://git.php.net/)
to look at PHP Git repository in various ways.
For further information on the process and further details please refer to
https://wiki.php.net/vcs/gitworkflow and https://wiki.php.net/vcs/gitfaq
Happy hacking,
PHP Team
+2 -2
View File
@@ -58,12 +58,12 @@ Do not use abbreviations for alpha and beta.
5. Commit these changes to the branch with ``git commit -a``.
6. Tag the repository with the version, e.g.:
``git tag -u YOURKEYID PHP-5.4.2-RC2``
``git tag -u YOURKEYID php-5.4.2RC2``
7. Push the changes to the main repo:
``git push --tags origin HEAD``
8. run: ``./makedist 5.4.2-RC2``, this will export the tree, create configure
8. run: ``./makedist 5.4.2RC2``, this will export the tree, create configure
and build two tarballs (one gz and one bz2).
9. Copy those two tarballs to www.php.net, in your homedir there should be a
-151
View File
@@ -1,151 +0,0 @@
====================
SVN Commit Rules
====================
This is the first file you should be reading after you get your SVN account.
We'll assume you're basically familiar with SVN, but feel free to post
your questions on the mailing list. Please have a look at
http://svnbook.red-bean.com/ for more detailed information on SVN.
PHP is developed through the efforts of a large number of people.
Collaboration is a Good Thing(tm), and SVN lets us do this. Thus, following
some basic rules with regards to SVN usage will::
a. Make everybody happier, especially those responsible for maintaining
the SVN itself.
b. Keep the changes consistently well documented and easily trackable.
c. Prevent some of those 'Oops' moments.
d. Increase the general level of good will on planet Earth.
Having said that, here are the organizational rules::
1. Respect other people working on the project.
2. Discuss any significant changes on the list before committing and get
confirmation from the release manager for the given branch.
3. Look at EXTENSIONS file to see who is the primary maintainer of
the code you want to contribute to.
4. If you "strongly disagree" about something another person did, don't
start fighting publicly - take it up in private email.
5. If you don't know how to do something, ask first!
6. Test your changes before committing them. We mean it. Really.
To do so use "make test".
7. For development use the --enable-maintainer-zts switch to ensure your
code handles TSRM correctly and doesn't break for those who need that.
Currently we have the following branches in use::
trunk The active development branch.
branches/PHP_5_4 Is used to release the PHP 5.4.x series. In release
process, only bugfixes and very small changes approved
by RMs are allowed.
branches/PHP_5_3 Is used to release the PHP 5.3.x series. This is current
stable version and is open for bugfixes and small
improvements (check with RMs if in doubt).
branches/PHP_5_2 Is used to release the PHP 5.2.x series. It is closed for
changes now.
branches/PHP_5_1 This branch is closed.
branches/PHP_4_4 This branch is closed.
The next few rules are more of a technical nature::
1. All changes should first go to trunk and then get merged from trunk
(aka MFH'ed) to all other relevant branches.
2. DO NOT TOUCH ChangeLog! It is automagically updated from the commit
messages every day. Woe be to those who attempt to mess with it.
3. All news updates intended for public viewing, such as new features,
bug fixes, improvements, etc., should go into the NEWS file of the
*first* to be released version with the given change. In other words
any NEWS file change only needs to done in one branch.
NB! Lines, starting with @ will go automagically into NEWS file, but
this is NOT recommended, though. Please, add news entries directly to
NEWS file and don't forget to keep them adjusted and sorted.
4. Do not commit multiple file and dump all messages in one commit. If you
modified several unrelated files, commit each group separately and
provide a nice commit message for each one. See example below.
5. Do write your commit message in such a way that it makes sense even
without the corresponding diff. One should be able to look at it, and
immediately know what was modified. Definitely include the function name
in the message as shown below.
6. In your commit messages, keep each line shorter than 80 characters. And
try to align your lines vertically, if they wrap. It looks bad otherwise.
7. If you modified a function that is callable from PHP, prepend PHP to
the function name as shown below.
The format of the commit messages is pretty simple.
Use a - to start a new item in your commit message.
If a line begins with #, it is taken to be a comment and will not appear
in the ChangeLog. Everything else goes into the ChangeLog.
It is important to note that if your comment or news logline spans multiple
lines, you have to put # at the beginning of **every** such line.
Example. Say you modified two files, datetime.c and string.c. In datetime.c you
added a new format option for the date() function, and in string.c you fixed a
memory leak in php_trim(). Don't commit both of these at once. Commit them
separately and try to make sure your commit messages look something like the
following.
For datetime.c::
- Added new 'K' format modifier to date() for printing out number of days
until New Year's Eve.
For string.c::
- Fixed a memory leak in php_trim() resulting from improper use of zval_dtor().
#- Man, that thing was leaking all over the place!
The # lines will be omitted from the ChangeLog automagically.
Use the [DOC] tag in your log message whenever you feel that your changes
imply a documentation modification. The php-doc team will automatically
get notified about your commit through the php-doc mailing list.
If you fix some bugs, you should note the bug ID numbers in your
commit message. Bug ID should be prefixed by "#" for easier access to
bug report when developers are browsing CVS via LXR or Bonsai.
Example::
Fixed bug #14016 (pgsql notice handler double free crash bug.)
If you don't see your messages in ChangeLog right away, don't worry!
These files are updated once a day, so your stuff will not show up until
somewhat later.
When you change the NEWS file for a bug fix, then please keep the bugs
sorted in decreasing order under the fixed version.
You can use LXR (http://lxr.php.net/) and Bonsai (http://bonsai.php.net/)
to look at PHP SVN repository in various ways.
To receive daily updates to ChangeLog and NEWS, send an empty message to
php-cvs-daily-subscribe@lists.php.net.
Happy hacking,
PHP Team
-112
View File
@@ -1,112 +0,0 @@
Using PHP 5 with the Zeus Web Server
-----------------------------------
Zeus fully supports running PHP in combination with our
webserver. There are three different interfaces that can be used to
enable PHP:
* CGI
* ISAPI
* FastCGI
Of the three, we recommend using FastCGI, which has been tested and
benchmarked as providing the best performance and reliability.
Full details of how to install PHP are available from our
website, at:
http://support.zeus.com/products/php.html
If you have any problems, please check the support site for more
up-to-date information and advice.
Quick guide to installing CGI/FastCGI with Zeus
-----------------------------------------------
Step 1 - Compile PHP as FastCGI.
Compile as follows:
./configure --enable-fastcgi
make
Note that PHP has many options to the configure script -
e.g. --with-mysql. You will probably want to select your usual options
before compiling; the above is just a bare minimum, for illustration.
After compilation finishes, you will be left with an executable
program called 'php'. Copy this into your document root, under a
dedicated FastCGI directory (e.g. $DOCROOT/fcgi-bin/php)
Step 2 - configure Zeus
Four stages:
- enable FastCGI
- configure FastCGI
- setup alias for FastCGI
- setup alias for PHP
1) Using the admin server, go to the 'module configuration' page for
your virtual server, and ensure that 'fastcgi' is enabled (select the
tickbox to the left).
2) While we can run FastCGI's locally, there are known problems with
some OS's (specifically, the communication between web server and
FastCGI happens over a unix domain socket, and some OS's have trouble
sustaining high connection rates over these sockets). So instead, we
are going to set up the PHP FastCGI to run 'remotely' over localhost
(this uses TCP sockets, which do not suffer this problem). Go to the
'fastcgi configuration' page, and under 'add remote fastcgi':
Add Remote FastCGI
Docroot path /fcgi-bin/php
Remote machine localhost:8002
The first entry is where you saved PHP, above.
The second entry is localhost:<any unused port>
We will start the FastCGI listening on this port shortly.
Click 'update' to commit these changes.
3) Go to the path mapping module and add an alias for FastCGI:
Add Alias
Docroot path /fcgi-bin
Filesystem directory /path/to/docroot/fcgi-bin
Alias type fastcgi
Click 'update' to commit these changes
4) Also on the path mapping module, add a handler for PHP:
Add handler
File extension php
Handler /fcgi-bin/php
Click 'update' to commit these changes
Finally restart your virtual server for these changes to take effect.
Step 3 - start PHP as a FastCGI runner
When you start PHP, it will pre-fork a given number of child processes
to handle incoming PHP requests. Each process will handle a given
number of requests before exiting (and being replaced by a newly
forked process). You can control these two parameters by setting the
following environment variables BEFORE starting the FastCGI runner:
PHP_FCGI_CHILDREN - the number of child processes to pre-fork. This
variable MUST be set, if not then the PHP will not run as a FastCGI.
We recommend a value of 8 for a fairly busy site. If you have many,
long-running PHP scripts, then you may need to increase this further.
PHP_FCGI_MAX_REQUESTS - the number of requests each PHP child process
handles before exiting. If not set, defaults to 500.
To start the FastCGI runner, execute '$ZEUSHOME/web/bin/fcgirunner
8002 $DOCROOT/fcgi-bin/php'. Substitute the appropriate values for
$ZEUSHOME and $DOCROOT; also substitute for 8002 the port you chose,
above.
To stop the runner (e.g. to experiment with the above environment
variables) you will need to manually stop and running PHP
processes. (Use 'ps' and 'kill'). As it is PHP which is forking lots
of children and not the runner, Zeus unfortunately cannot keep track
of what processes are running, sorry. A typical command line may look
like 'ps -efl | grep $DOCROOT/fcgi-bin/php | grep -v grep | awk
'{print $4}' | xargs kill'
+37 -10
View File
@@ -37,9 +37,9 @@ PHP 5.4 UPGRADE NOTES
=============================
- PHP 5.4 now checks at compile time if /dev/urandom or /dev/arandom
are present. If either is available, session.entropy_file now
are present. If either is available, session.entropy_file now
defaults to that file and session.entropy_length defaults to 32.
This provides non-blocking entropy to session id generation. If you
This provides non-blocking entropy to session id generation. If you
do not want extra entropy for your session ids, add:
session.entropy_file=
@@ -89,9 +89,9 @@ PHP 5.4 UPGRADE NOTES
session.upload_progress.min_freq
- Added a zend.multibyte directive as a replacement of the PHP compile time
configuration option --enable-zend-multibyte. Now the Zend Engine always
configuration option --enable-zend-multibyte. Now the Zend Engine always
contains code for multibyte support, which can be enabled or disabled at
runtime. Note: It doesn't make a lot of sense to enable this option if
runtime. Note: It doesn't make a lot of sense to enable this option if
ext/mbstring is not enabled, because most functionality is implemented by
mbstrings callbacks.
@@ -107,7 +107,7 @@ PHP 5.4 UPGRADE NOTES
in a stream fashion (through php://input) without having it copied in memory
multiple times.
- Added windows_show_crt_warning. This directive shows the CRT warnings when
- Added windows_show_crt_warning. This directive shows the CRT warnings when
enabled. These warnings were displayed by default until now. It is disabled
by default.
@@ -162,13 +162,17 @@ PHP 5.4 UPGRADE NOTES
- Non-numeric string offsets, e.g. $a['foo'] where $a is a string, now
return false on isset() and true on empty(), and produce warning if
trying to use them. Offsets of types double, bool and null produce
trying to use them. Offsets of types double, bool and null produce
notice. Numeric strings ($a['2']) still work as before.
Note that offsets like '12.3' and '5 and a half' are considered
non-numeric and produce warning, but are converted to 12 and 5
respectively for backwards compatibility reasons.
- Long numeric strings that do not fit in integer or double (such as
"92233720368547758070") are compared using string comparison if
they could otherwise result in precision loss - since 5.4.4.
- Closures now support scopes and $this and can be rebound to
objects using Closure::bind() and Closure::bindTo().
@@ -178,6 +182,9 @@ PHP 5.4 UPGRADE NOTES
- Parse error messages are changed to contain more information about
the error.
- __clone and __destruct since 5.4.4 follow the same scoping rules as
the rest of the methods (see bug #61782 for details).
================================
4. Changes to existing functions
================================
@@ -200,7 +207,7 @@ PHP 5.4 UPGRADE NOTES
- htmlentities() and htmlspecialchars() are stricter in the code units they
accept for the asian encodings. For Big5-HKSCS, the octets 0x80 and 0xFF are
rejected. For GB2312/EUC-CN, the octets 0x8E, 0x8F, 0xA0 and 0xFF are
rejected. For GB2312/EUC-CN, the octets 0x8E, 0x8F, 0xA0 and 0xFF are
rejected. For SJIS, the octets 0x80, 0xA0, 0xFD, 0xFE and 0xFF are rejected,
except maybe after a valid starting byte. For EUC-JP, the octets 0xA0 and
0xFF are rejected.
@@ -226,7 +233,7 @@ PHP 5.4 UPGRADE NOTES
checks on the validity of the entities. Numerical entities are checked for a
valid range (0 to 0x10FFFF); if the flag ENT_DISALLOWED is given, the
validity of such numerical entity in the target document type is also
checked. Named entities are checked for necessary existence in the target
checked. Named entities are checked for necessary existence in the target
document type instead of only checking whether they were constituted by
alphanumeric characters.
@@ -332,6 +339,14 @@ PHP 5.4 UPGRADE NOTES
- ob_start() no longer starts multiple output buffers when passed
array("callback1", "callback2", "callback3", ...).
- Since 5.4.4, "php://fd" stream syntax is available only in CLI build.
- Since 5.4.5, resourcebundle_create() accepts null for the first two arguments.
- Since 5.4.6, SimpleXMLElement::getDocNamespaces() has and extra parameter which
allows for toggling if the list of namespaces starts from the document root
or from the node you call the method on
==============================
5. Changes to existing classes
==============================
@@ -364,6 +379,9 @@ PHP 5.4 UPGRADE NOTES
- FilesystemIterator, GlobIterator and (Recursive)DirectoryIterator now use
the default stream context.
- Since 5.4.5, the constructor of ResourceBundle accepts NULL for the first two
arguments.
===========================
7. Deprecated Functionality
===========================
@@ -422,7 +440,7 @@ d. Removed hash algorithms
a. Extensions no longer maintained
- ext/sqlite is no longer part of the base distribution and has been moved
to PECL. Use sqlite3 or PDO_SQLITE instead.
to PECL. Use sqlite3 or PDO_SQLITE instead.
b. Extensions with changed behavior
@@ -476,7 +494,7 @@ b. Extensions with changed behavior
===========================
- A REQUEST_TIME_FLOAT value returns a floating point number indicating the
time with microsecond precision. All SAPIs providing this value should be
time with microsecond precision. All SAPIs providing this value should be
returning float and not time_t.
- apache_child_terminate(), getallheaders(), apache_request_headers()
@@ -499,6 +517,11 @@ b. Extensions with changed behavior
- is_link now works properly for symbolic links on Windows Vista
or later. Earlier systems do not support symbolic links.
- As of PHP 5.4.5 and above the COM extension isn't compiled statically in PHP
anymore but shared. It'll still be delivered with the standard PHP release but
must be activated manually with the "extension = php_com_dotnet.dll" directive
in php.ini.
==================
12. New in PHP 5.4
==================
@@ -601,6 +624,10 @@ c. New functions
- mysqli_error_list()
- mysqli_stmt_error_list()
- pgsql
- pg_escape_identifier() (5.4.4)
- pg_escape_literal() (5.4.4)
- Session:
- session_register_shutdown()
- session_status()
-22097
View File
File diff suppressed because it is too large. Load diff
+7 -7
View File
@@ -62,17 +62,17 @@ print "\nDone\n";
?>
--EXPECTF--
Notice: String offset cast occured in %s on line %d
Notice: String offset cast occurred in %s on line %d
Notice: Uninitialized string offset: 0 in %s on line %d
Notice: Uninitialized string offset: 0 in %s on line %d
Notice: String offset cast occured in %s on line %d
Notice: String offset cast occurred in %s on line %d
Notice: Uninitialized string offset: %i in %s on line %d
Notice: String offset cast occured in %s on line %d
Notice: String offset cast occurred in %s on line %d
Notice: Uninitialized string offset: %i in %s on line %d
@@ -88,16 +88,16 @@ Notice: Uninitialized string offset: 4 in %s on line %d
Notice: Uninitialized string offset: 4 in %s on line %d
Notice: String offset cast occured in %s on line %d
Notice: String offset cast occurred in %s on line %d
Notice: Uninitialized string offset: 12 in %s on line %d
Notice: String offset cast occured in %s on line %d
Notice: String offset cast occurred in %s on line %d
Notice: Uninitialized string offset: 12 in %s on line %d
Notice: String offset cast occured in %s on line %d
Notice: String offset cast occurred in %s on line %d
Notice: String offset cast occured in %s on line %d
Notice: String offset cast occurred in %s on line %d
b
Done
+21
View File
@@ -0,0 +1,21 @@
--TEST--
Bug #54547: wrong equality of string numbers near LONG_MAX with 64-bit longs
--SKIPIF--
<?php
if (PHP_INT_MAX !== 9223372036854775807)
die("skip for 64-bit long systems only");
--FILE--
<?php
var_dump("9223372036854775807" == "9223372036854775808");
var_dump("-9223372036854775808" == "-9223372036854775809");
var_dump("0x7fffffffffffffff" == "9223372036854775808");
/* not exactly what the bug is about, but closely related problem: */
var_dump("999223372036854775807"=="999223372036854775808");
var_dump("899223372036854775807">"00999223372036854775807");
--EXPECT--
bool(false)
bool(false)
bool(false)
bool(false)
bool(false)
+6
View File
@@ -5,6 +5,12 @@ Bug #55509 (segfault on x86_64 using more than 2G memory)
if (PHP_INT_SIZE == 4) {
die('skip Not for 32-bits OS');
}
$zend_mm_enabled = getenv("USE_ZEND_ALLOC");
if ($zend_mm_enabled === "0") {
die("skip Zend MM disabled");
}
if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
// check the available memory
if (PHP_OS == 'Linux') {
+18
View File
@@ -0,0 +1,18 @@
--TEST--
Bug #61761 ('Overriding' a private static method with a different signature causes crash)
--FILE--
<?php
class A
{
private static function test($a) { }
}
class B extends A
{
private static function test($a, $b) { }
}
?>
--EXPECTF--
Strict Standards: Declaration of B::test() should be compatible with A::test($a) in %sbug61761.php on line %d
+29
View File
@@ -0,0 +1,29 @@
--TEST--
Bug #61782 (__clone/__destruct do not match other methods when checking access controls)
--FILE--
<?php
abstract class BaseClass {
abstract protected function __clone();
}
class MommasBoy extends BaseClass {
protected function __clone() {
echo __METHOD__, "\n";
}
}
class LatchkeyKid extends BaseClass {
public function __construct() {
echo 'In ', __CLASS__, ":\n";
$kid = new MommasBoy();
$kid = clone $kid;
}
public function __clone() {}
}
$obj = new LatchkeyKid();
echo "DONE\n";
--EXPECT--
In LatchkeyKid:
MommasBoy::__clone
DONE
+15
View File
@@ -0,0 +1,15 @@
--TEST--
Bug #62005 (unexpected behavior when incrementally assigning to a member of a null object)
--FILE--
<?php
function add_points($player, $points) {
$player->energy += $points;
print_r($player);
}
add_points(NULL, 2);
--EXPECTF--
Warning: Creating default object from empty value in %sbug62005.php on line %d
stdClass Object
(
[energy] => 2
)
+17
View File
@@ -0,0 +1,17 @@
--TEST--
Bug #62097: fix for bug #54547 is wrong for 32-bit machines
--SKIPIF--
<?php
if (PHP_INT_MAX !== 2147483647)
die('skip for system with 32-bit wide longs only');
--FILE--
<?php
var_dump("02147483647" == "2147483647",
"02147483648" == "2147483648",
"09007199254740991" == "9007199254740991",
"09007199254740992" == "9007199254740992");
--EXPECT--
bool(true)
bool(true)
bool(true)
bool(false)
+33
View File
@@ -0,0 +1,33 @@
--TEST--
Bug #62653: unset($array[$float]) causes a crash
--FILE--
<?php
$array = array("5"=>"bar");
$foo = "10.0000"; // gettype($foo) = "string"
$foo /= 2; //Makes $foo = 5 but still gettype($foo) = "double"
unset($array[$foo]);
print_r($array);
$array = array("5"=>"bar");
$foo = "5";
unset($array[(float)$foo]);
print_r($array);
$array = array("5"=>"bar");
$foo = "10.0000";
$foo /= 2; //Makes $foo = 5 but still gettype($foo) = "double"
$name = "foo";
unset($array[$$name]);
print_r($array);
?>
--EXPECT--
Array
(
)
Array
(
)
Array
(
)
+11
View File
@@ -0,0 +1,11 @@
--TEST--
Bug #62680 (Function isset() throws fatal error on set array if non-existent key depth >= 3)
--FILE--
<?php
$array = array("");
var_dump(isset($array[0]["a"]["b"]));
var_dump(isset($array[0]["a"]["b"]["c"]));
?>
--EXPECT--
bool(false)
bool(false)
+2
View File
@@ -1,5 +1,7 @@
--TEST--
GC 029: GC and destructors
--SKIPIF--
<?php if (PHP_ZTS) { print "skip only for no-zts build"; }
--INI--
zend.enable_gc=1
--FILE--
+37
View File
@@ -0,0 +1,37 @@
--TEST--
GC 029: GC and destructors
--SKIPIF--
<?php if (!PHP_ZTS) { print "skip only for zts build"; }
--INI--
zend.enable_gc=1
--FILE--
<?php
class Foo {
public $bar;
public $x = array(1,2,3);
function __destruct() {
if ($this->bar !== null) {
$this->x = null;
unset($this->bar);
}
}
}
class Bar {
public $foo;
function __destruct() {
if ($this->foo !== null) {
unset($this->foo);
}
}
}
$foo = new Foo();
$bar = new Bar();
$foo->bar = $bar;
$bar->foo = $foo;
unset($foo);
unset($bar);
var_dump(gc_collect_cycles());
?>
--EXPECT--
int(3)
+4 -4
View File
@@ -30,10 +30,10 @@ echo "Done\n";
--EXPECTF--
string(1) "i"
Notice: String offset cast occured in %s on line %d
Notice: String offset cast occurred in %s on line %d
string(1) "S"
Notice: String offset cast occured in %s on line %d
Notice: String offset cast occurred in %s on line %d
string(1) "S"
Warning: Illegal string offset 'run away' in %s on line %d
@@ -46,10 +46,10 @@ string(1) "o"
Notice: A non well formed numeric value encountered in %s on line %d
string(1) "r"
Notice: String offset cast occured in %s on line %d
Notice: String offset cast occurred in %s on line %d
string(1) "i"
Notice: String offset cast occured in %s on line %d
Notice: String offset cast occurred in %s on line %d
string(1) "S"
Warning: Illegal offset type in %s on line %d
+68
View File
@@ -0,0 +1,68 @@
--TEST--
Bug #61998 (Using traits with method aliases appears to result in crash during execution)
--FILE--
<?php
class Foo {
use T1 {
func as newFunc;
}
public function func() {
echo "From Foo\n";
}
}
trait T1 {
public function func() {
echo "From T1\n";
}
}
class Bar {
public function func() {
echo "From Bar\n";
}
public function func2() {
echo "From Bar\n";
}
public function func3() {
echo "From Bar\n";
}
use T1 {
func as newFunc;
func as func2;
}
use T2 {
func2 as newFunc2;
func2 as newFunc3;
func2 as func3;
}
}
trait T2 {
public function func2() {
echo "From T2\n";
}
}
$f = new Foo();
$f->newFunc(); //from T1
$f->func(); //from Foo
$b = new Bar();
$b->newFunc(); //from T1
$b->func(); //from Bar
$b->func2(); //from Bar
$b->newFunc2(); //from T2
$b->newFunc3(); //from T2
$b->func3(); //from Bar
--EXPECTF--
From T1
From Foo
From T1
From Bar
From Bar
From T2
From T2
From Bar
+20 -1
View File
@@ -781,6 +781,8 @@ void zend_register_standard_ini_entries(TSRMLS_D) /* {{{ */
void zend_post_startup(TSRMLS_D) /* {{{ */
{
#ifdef ZTS
zend_encoding **script_encoding_list;
zend_compiler_globals *compiler_globals = ts_resource(compiler_globals_id);
zend_executor_globals *executor_globals = ts_resource(executor_globals_id);
@@ -795,7 +797,12 @@ void zend_post_startup(TSRMLS_D) /* {{{ */
zend_destroy_rsrc_list(&EG(persistent_list) TSRMLS_CC);
free(compiler_globals->function_table);
free(compiler_globals->class_table);
compiler_globals_ctor(compiler_globals, tsrm_ls);
if ((script_encoding_list = (zend_encoding **)compiler_globals->script_encoding_list)) {
compiler_globals_ctor(compiler_globals, tsrm_ls);
compiler_globals->script_encoding_list = (const zend_encoding **)script_encoding_list;
} else {
compiler_globals_ctor(compiler_globals, tsrm_ls);
}
free(EG(zend_constants));
executor_globals_ctor(executor_globals, tsrm_ls);
global_persistent_list = &EG(persistent_list);
@@ -1254,6 +1261,7 @@ ZEND_API int zend_execute_scripts(int type TSRMLS_DC, zval **retval, int file_co
zend_file_handle *file_handle;
zend_op_array *orig_op_array = EG(active_op_array);
zval **orig_retval_ptr_ptr = EG(return_value_ptr_ptr);
long orig_interactive = CG(interactive);
va_start(files, file_count);
for (i = 0; i < file_count; i++) {
@@ -1261,6 +1269,15 @@ ZEND_API int zend_execute_scripts(int type TSRMLS_DC, zval **retval, int file_co
if (!file_handle) {
continue;
}
if (orig_interactive) {
if (file_handle->filename[0] != '-' || file_handle->filename[1]) {
CG(interactive) = 0;
} else {
CG(interactive) = 1;
}
}
EG(active_op_array) = zend_compile_file(file_handle, type TSRMLS_CC);
if (file_handle->opened_path) {
int dummy = 1;
@@ -1302,12 +1319,14 @@ ZEND_API int zend_execute_scripts(int type TSRMLS_DC, zval **retval, int file_co
va_end(files);
EG(active_op_array) = orig_op_array;
EG(return_value_ptr_ptr) = orig_retval_ptr_ptr;
CG(interactive) = orig_interactive;
return FAILURE;
}
}
va_end(files);
EG(active_op_array) = orig_op_array;
EG(return_value_ptr_ptr) = orig_retval_ptr_ptr;
CG(interactive) = orig_interactive;
return SUCCESS;
}
+5
View File
@@ -1093,7 +1093,12 @@ ZEND_API void object_properties_init(zend_object *object, zend_class_entry *clas
for (i = 0; i < class_type->default_properties_count; i++) {
object->properties_table[i] = class_type->default_properties_table[i];
if (class_type->default_properties_table[i]) {
#if ZTS
ALLOC_ZVAL( object->properties_table[i]);
MAKE_COPY_ZVAL(&class_type->default_properties_table[i], object->properties_table[i]);
#else
Z_ADDREF_P(object->properties_table[i]);
#endif
}
}
object->properties = NULL;
+15 -14
View File
@@ -1685,7 +1685,7 @@ void zend_do_begin_function_declaration(znode *function_token, znode *function_n
zval key;
if (CG(current_namespace)) {
/* Prefix function name with current namespcae name */
/* Prefix function name with current namespace name */
znode tmp;
tmp.u.constant = *CG(current_namespace);
@@ -3260,11 +3260,11 @@ static void do_inheritance_check_on_method(zend_function *child, zend_function *
if (child->common.prototype && (child->common.prototype->common.fn_flags & ZEND_ACC_ABSTRACT)) {
if (!zend_do_perform_implementation_check(child, child->common.prototype TSRMLS_CC)) {
zend_error(E_COMPILE_ERROR, "Declaration of %s::%s() must be compatible with %s", ZEND_FN_SCOPE_NAME(child), child->common.function_name, zend_get_function_declaration(child->common.prototype TSRMLS_CC));
zend_error(E_COMPILE_ERROR, "Declaration of %s::%s() must be compatible with %s", ZEND_FN_SCOPE_NAME(child), child->common.function_name, zend_get_function_declaration(child->common.prototype? child->common.prototype : parent TSRMLS_CC));
}
} else if (EG(error_reporting) & E_STRICT || EG(user_error_handler)) { /* Check E_STRICT (or custom error handler) before the check so that we save some time */
if (!zend_do_perform_implementation_check(child, parent TSRMLS_CC)) {
char *method_prototype = zend_get_function_declaration(child->common.prototype TSRMLS_CC);
char *method_prototype = zend_get_function_declaration(child->common.prototype? child->common.prototype : parent TSRMLS_CC);
zend_error(E_STRICT, "Declaration of %s::%s() should be compatible with %s", ZEND_FN_SCOPE_NAME(child), child->common.function_name, method_prototype);
efree(method_prototype);
}
@@ -3619,6 +3619,7 @@ ZEND_API void zend_do_implement_trait(zend_class_entry *ce, zend_class_entry *tr
}
}
ce->traits[ce->num_traits++] = trait;
trait->refcount++;
}
}
/* }}} */
@@ -3711,7 +3712,7 @@ static int zend_traits_merge_functions(zend_function *fn TSRMLS_DC, int num_args
} else {
/* Add it to result function table */
if (zend_hash_quick_add(resulting_table, hash_key->arKey, hash_key->nKeyLength, hash_key->h, fn, sizeof(zend_function), NULL)==FAILURE) {
zend_error(E_COMPILE_ERROR, "Trait method %s has not been applied, because failure occured during updating resulting trait method table", fn->common.function_name);
zend_error(E_COMPILE_ERROR, "Trait method %s has not been applied, because failure occurred during updating resulting trait method table", fn->common.function_name);
}
}
@@ -3828,7 +3829,7 @@ static int zend_traits_merge_functions_to_class(zend_function *fn TSRMLS_DC, int
function_add_ref(&fn_copy);
if (zend_hash_quick_update(&ce->function_table, hash_key->arKey, hash_key->nKeyLength, hash_key->h, &fn_copy, sizeof(zend_function), (void**)&fn_copy_p)==FAILURE) {
zend_error(E_COMPILE_ERROR, "Trait method %s has not been applied, because failure occured during updating class method table", hash_key->arKey);
zend_error(E_COMPILE_ERROR, "Trait method %s has not been applied, because failure occurred during updating class method table", hash_key->arKey);
}
zend_add_magic_methods(ce, hash_key->arKey, hash_key->nKeyLength, fn_copy_p TSRMLS_CC);
@@ -3870,8 +3871,8 @@ static int zend_traits_copy_functions(zend_function *fn TSRMLS_DC, int num_args,
fn_copy = *fn;
function_add_ref(&fn_copy);
/* this function_name is never destroyed, because its refcount
greater than 1, classes are always destoyed in reverse order
and trait is declared early than this class */
greater than 1 and classes are always destoyed before the
traits they use */
fn_copy.common.function_name = aliases[i]->alias;
/* if it is 0, no modifieres has been changed */
@@ -4076,14 +4077,14 @@ static void zend_do_traits_method_binding(zend_class_entry *ce TSRMLS_DC) /* {{{
size_t i;
/* prepare copies of trait function tables for combination */
function_tables = malloc(sizeof(HashTable*) * ce->num_traits);
resulting_table = (HashTable *) malloc(sizeof(HashTable));
function_tables = emalloc(sizeof(HashTable*) * ce->num_traits);
resulting_table = (HashTable *)emalloc(sizeof(HashTable));
/* TODO: revisit this start size, may be its not optimal */
zend_hash_init_ex(resulting_table, 10, NULL, NULL, 1, 0);
zend_hash_init_ex(resulting_table, 10, NULL, NULL, 0, 0);
for (i = 0; i < ce->num_traits; i++) {
function_tables[i] = (HashTable *) malloc(sizeof(HashTable));
function_tables[i] = (HashTable *)emalloc(sizeof(HashTable));
zend_hash_init_ex(function_tables[i], ce->traits[i]->function_table.nNumOfElements, NULL, NULL, 1, 0);
if (ce->trait_precedences) {
@@ -4116,14 +4117,14 @@ static void zend_do_traits_method_binding(zend_class_entry *ce TSRMLS_DC) /* {{{
for (i = 0; i < ce->num_traits; i++) {
/* zend_hash_destroy(function_tables[i]); */
zend_hash_graceful_destroy(function_tables[i]);
free(function_tables[i]);
efree(function_tables[i]);
}
free(function_tables);
efree(function_tables);
/* free temporary resulting table */
/* zend_hash_destroy(resulting_table); */
zend_hash_graceful_destroy(resulting_table);
free(resulting_table);
efree(resulting_table);
}
/* }}} */
-4
View File
@@ -518,10 +518,6 @@ void zend_prepare_trait_precedence(znode *result, znode *method_reference, znode
void zend_prepare_reference(znode *result, znode *class_name, znode *method_name TSRMLS_DC);
void zend_prepare_trait_alias(znode *result, znode *method_reference, znode *modifiers, znode *alias TSRMLS_DC);
void init_trait_alias_list(znode* result, const znode* trait_alias TSRMLS_DC);
void add_trait_alias(znode* result, const znode* trait_alias TSRMLS_DC);
void init_trait_alias(znode* result, const znode* method_name, const znode* alias, const znode* modifiers TSRMLS_DC);
ZEND_API void zend_do_inheritance(zend_class_entry *ce, zend_class_entry *parent_ce TSRMLS_DC);
void zend_do_early_binding(TSRMLS_D);
ZEND_API void zend_do_delayed_early_binding(const zend_op_array *op_array TSRMLS_DC);
+3 -4
View File
@@ -554,11 +554,10 @@ static inline void make_real_object(zval **object_ptr TSRMLS_DC)
|| (Z_TYPE_PP(object_ptr) == IS_BOOL && Z_LVAL_PP(object_ptr) == 0)
|| (Z_TYPE_PP(object_ptr) == IS_STRING && Z_STRLEN_PP(object_ptr) == 0)
) {
zend_error(E_WARNING, "Creating default object from empty value");
SEPARATE_ZVAL_IF_NOT_REF(object_ptr);
zval_dtor(*object_ptr);
object_init(*object_ptr);
zend_error(E_WARNING, "Creating default object from empty value");
}
}
@@ -1162,7 +1161,7 @@ convert_to_array:
case IS_DOUBLE:
case IS_NULL:
case IS_BOOL:
zend_error(E_NOTICE, "String offset cast occured");
zend_error(E_NOTICE, "String offset cast occurred");
break;
default:
zend_error(E_WARNING, "Illegal offset type");
@@ -1285,7 +1284,7 @@ static void zend_fetch_dimension_address_read(temp_variable *result, zval **cont
case IS_NULL:
case IS_BOOL:
if (type != BP_VAR_IS) {
zend_error(E_NOTICE, "String offset cast occured");
zend_error(E_NOTICE, "String offset cast occurred");
}
break;
default:
+1 -1
View File
@@ -330,7 +330,7 @@ END_EXTERN_C()
if (idx-1 > LONG_MAX) { /* overflow */ \
break; \
} \
idx = (ulong)(-(long)idx); \
idx = 0 - idx; \
} else if (idx > LONG_MAX) { /* overflow */ \
break; \
} \
+1612 -1574
View File
File diff suppressed because it is too large. Load diff
+27 -6
View File
@@ -347,7 +347,7 @@ DOLLAR_CURLY "${"
SECTION_RAW_CHARS [^\]\n\r]
SINGLE_QUOTED_CHARS [^']
RAW_VALUE_CHARS [^\n\r;\000]
RAW_VALUE_CHARS [^"\n\r;\000]
LITERAL_DOLLAR ("$"([^{\000]|("\\"{ANY_CHAR})))
VALUE_CHARS ([^$= \t\n\r;&|~()!"'\000]|{LITERAL_DOLLAR})
@@ -445,12 +445,33 @@ SECTION_VALUE_CHARS ([^$\n\r;"'\]\\]|("\\"{ANY_CHAR})|{LITERAL_DOLLAR})
return '=';
}
<ST_RAW>{RAW_VALUE_CHARS}+ { /* Raw value, only used when SCNG(scanner_mode) == ZEND_INI_SCANNER_RAW. */
/* Eat leading and trailing double quotes */
if (yytext[0] == '"' && yytext[yyleng - 1] == '"') {
SCNG(yy_text)++;
yyleng = yyleng - 2;
<ST_RAW>["] {
while (YYCURSOR < YYLIMIT) {
switch (*YYCURSOR++) {
case '\n':
SCNG(lineno)++;
break;
case '\r':
if (*YYCURSOR != '\n') {
SCNG(lineno)++;
}
break;
case '"':
yyleng = YYCURSOR - SCNG(yy_text) - 2;
SCNG(yy_text)++;
RETURN_TOKEN(TC_RAW, yytext, yyleng);
case '\\':
if (YYCURSOR < YYLIMIT) {
YYCURSOR++;
}
break;
}
}
yyleng = YYCURSOR - SCNG(yy_text);
RETURN_TOKEN(TC_RAW, yytext, yyleng);
}
<ST_RAW>{RAW_VALUE_CHARS}+ { /* Raw value, only used when SCNG(scanner_mode) == ZEND_INI_SCANNER_RAW. */
RETURN_TOKEN(TC_RAW, yytext, yyleng);
}
+1 -1
View File
@@ -1,4 +1,4 @@
/* Generated by re2c 0.13.5 on Fri Mar 2 11:49:21 2012 */
/* Generated by re2c 0.13.5 on Thu Jun 7 17:48:25 2012 */
#line 3 "Zend/zend_ini_scanner_defs.h"
enum YYCONDTYPE {
+1 -1
View File
@@ -127,7 +127,7 @@ ZEND_API zval *zend_user_it_new_iterator(zend_class_entry *ce, zval *object TSRM
}
/* }}} */
/* {{{ zend_user_it_dtor */
/* {{{ zend_user_it_invalidate_current */
ZEND_API void zend_user_it_invalidate_current(zend_object_iterator *_iter TSRMLS_DC)
{
zend_user_iterator *iter = (zend_user_iterator*)_iter;
+1 -1
View File
@@ -1191,7 +1191,7 @@ static YYSIZE_T zend_yytnamerr(char *yyres, const char *yystr)
if (LANG_SCNG(yy_text)[0] == 0 &&
LANG_SCNG(yy_leng) == 1 &&
memcmp(yystr, ZEND_STRL("\"end of file\"")) == 0) {
memcmp(yystr, "\"end of file\"", sizeof("\"end of file\"") - 1) == 0) {
yystpcpy(yyres, "end of file");
return sizeof("end of file")-1;
}
File diff suppressed because it is too large. Load diff
+7
View File
@@ -33,6 +33,9 @@
#include <errno.h>
#include "zend.h"
#ifdef PHP_WIN32
# include <Winuser.h>
#endif
#include "zend_alloc.h"
#include <zend_language_parser.h>
#include "zend_compile.h"
@@ -905,7 +908,11 @@ static void zend_scan_escape_string(zval *zendlval, char *str, int len, char quo
zendlval->value.str.len--;
break;
case 'e':
#ifdef PHP_WIN32
*t++ = VK_ESCAPE;
#else
*t++ = '\e';
#endif
zendlval->value.str.len--;
break;
case '"':
+1 -1
View File
@@ -1,4 +1,4 @@
/* Generated by re2c 0.13.5 on Thu Mar 1 21:27:30 2012 */
/* Generated by re2c 0.13.5 on Mon Apr 30 15:55:05 2012 */
#line 3 "Zend/zend_language_scanner_defs.h"
enum YYCONDTYPE {
+1 -1
View File
@@ -168,7 +168,7 @@ ZEND_API const zend_encoding *zend_multibyte_get_script_encoding(TSRMLS_D)
ZEND_API int zend_multibyte_set_script_encoding(const zend_encoding **encoding_list, size_t encoding_list_size TSRMLS_DC)
{
if (CG(script_encoding_list)) {
efree(CG(script_encoding_list));
free(CG(script_encoding_list));
}
CG(script_encoding_list) = encoding_list;
CG(script_encoding_list_size) = encoding_list_size;
+11 -17
View File
@@ -66,11 +66,11 @@ ZEND_API void rebuild_object_properties(zend_object *zobj) /* {{{ */
zend_hash_get_current_data_ex(&ce->properties_info, (void**)&prop_info, &pos) == SUCCESS;
zend_hash_move_forward_ex(&ce->properties_info, &pos)) {
if (/*prop_info->ce == ce &&*/
(prop_info->flags & ZEND_ACC_STATIC) == 0 &&
(prop_info->flags & ZEND_ACC_STATIC) == 0 &&
prop_info->offset >= 0 &&
zobj->properties_table[prop_info->offset]) {
zend_hash_quick_add(zobj->properties, prop_info->name, prop_info->name_length+1, prop_info->h, (void**)&zobj->properties_table[prop_info->offset], sizeof(zval*), (void**)&zobj->properties_table[prop_info->offset]);
}
}
}
while (ce->parent && ce->parent->default_properties_count) {
ce = ce->parent;
@@ -78,12 +78,12 @@ ZEND_API void rebuild_object_properties(zend_object *zobj) /* {{{ */
zend_hash_get_current_data_ex(&ce->properties_info, (void**)&prop_info, &pos) == SUCCESS;
zend_hash_move_forward_ex(&ce->properties_info, &pos)) {
if (prop_info->ce == ce &&
(prop_info->flags & ZEND_ACC_STATIC) == 0 &&
(prop_info->flags & ZEND_ACC_PRIVATE) != 0 &&
(prop_info->flags & ZEND_ACC_STATIC) == 0 &&
(prop_info->flags & ZEND_ACC_PRIVATE) != 0 &&
prop_info->offset >= 0 &&
zobj->properties_table[prop_info->offset]) {
zend_hash_quick_add(zobj->properties, prop_info->name, prop_info->name_length+1, prop_info->h, (void**)&zobj->properties_table[prop_info->offset], sizeof(zval*), (void**)&zobj->properties_table[prop_info->offset]);
}
}
}
}
}
@@ -783,7 +783,7 @@ static void zend_std_unset_property(zval *object, zval *member, const zend_liter
property_info = zend_get_property_info_quick(zobj->ce, member, (zobj->ce->__unset != NULL), key TSRMLS_CC);
if (EXPECTED(property_info != NULL) &&
EXPECTED((property_info->flags & ZEND_ACC_STATIC) == 0) &&
EXPECTED((property_info->flags & ZEND_ACC_STATIC) == 0) &&
!zobj->properties &&
property_info->offset >= 0 &&
EXPECTED(zobj->properties_table[property_info->offset] != NULL)) {
@@ -815,8 +815,8 @@ static void zend_std_unset_property(zval *object, zval *member, const zend_liter
}
}
}
} else if (EXPECTED(property_info != NULL) &&
EXPECTED((property_info->flags & ZEND_ACC_STATIC) == 0) &&
} else if (EXPECTED(property_info != NULL) &&
EXPECTED((property_info->flags & ZEND_ACC_STATIC) == 0) &&
property_info->offset >= 0) {
zobj->properties_table[property_info->offset] = NULL;
}
@@ -960,12 +960,6 @@ ZEND_API int zend_check_protected(zend_class_entry *ce, zend_class_entry *scope)
}
/* }}} */
static inline zend_class_entry * zend_get_function_root_class(zend_function *fbc) /* {{{ */
{
return fbc->common.prototype ? fbc->common.prototype->common.scope : fbc->common.scope;
}
/* }}} */
static inline union _zend_function *zend_get_user_call_function(zend_class_entry *ce, const char *method_name, int method_len) /* {{{ */
{
zend_internal_function *call_user_call = emalloc(sizeof(zend_internal_function));
@@ -1143,7 +1137,7 @@ ZEND_API zend_function *zend_std_get_static_method(zend_class_entry *ce, const c
zend_str_tolower_copy(lc_function_name, function_name_strval, function_name_strlen);
hash_value = zend_hash_func(lc_function_name, function_name_strlen+1);
}
if (function_name_strlen == ce->name_length && ce->constructor) {
lc_class_name = zend_str_tolower_dup(ce->name, ce->name_length);
/* Only change the method to the constructor if the constructor isn't called __construct
@@ -1178,7 +1172,7 @@ ZEND_API zend_function *zend_std_get_static_method(zend_class_entry *ce, const c
if (UNEXPECTED(!(fbc->common.fn_flags & ZEND_ACC_STATIC))) {
zend_error_noreturn(E_ERROR, "Cannot call non static method %s::%s() without object", ZEND_FN_SCOPE_NAME(fbc), fbc->common.function_name);
}
#endif
#endif
if (fbc->op_array.fn_flags & ZEND_ACC_PUBLIC) {
/* No further checks necessary, most common case */
} else if (fbc->op_array.fn_flags & ZEND_ACC_PRIVATE) {
@@ -1220,7 +1214,7 @@ ZEND_API zval **zend_std_get_static_property(zend_class_entry *ce, const char *p
{
zend_property_info *property_info;
ulong hash_value;
if (UNEXPECTED(!key) ||
(property_info = CACHED_POLYMORPHIC_PTR(key->cache_slot, ce)) == NULL) {
if (EXPECTED(key != NULL)) {
+3
View File
@@ -146,6 +146,9 @@ struct _zend_object_handlers {
extern ZEND_API zend_object_handlers std_object_handlers;
#define zend_get_function_root_class(fbc) \
((fbc)->common.prototype ? (fbc)->common.prototype->common.scope : (fbc)->common.scope)
BEGIN_EXTERN_C()
ZEND_API union _zend_function *zend_std_get_static_method(zend_class_entry *ce, const char *function_name_strval, int function_name_strlen, const struct _zend_literal *key TSRMLS_DC);
ZEND_API zval **zend_std_get_static_property(zend_class_entry *ce, const char *property_name, int property_name_len, zend_bool silent, const struct _zend_literal *key TSRMLS_DC);
+13 -13
View File
@@ -28,7 +28,7 @@
ZEND_API void zend_object_std_init(zend_object *object, zend_class_entry *ce TSRMLS_DC)
{
object->ce = ce;
object->ce = ce;
object->properties = NULL;
object->properties_table = NULL;
object->guards = NULL;
@@ -38,7 +38,7 @@ ZEND_API void zend_object_std_dtor(zend_object *object TSRMLS_DC)
{
if (object->guards) {
zend_hash_destroy(object->guards);
FREE_HASHTABLE(object->guards);
FREE_HASHTABLE(object->guards);
}
if (object->properties) {
zend_hash_destroy(object->properties);
@@ -74,23 +74,23 @@ ZEND_API void zend_objects_destroy_object(zend_object *object, zend_object_handl
if (object->ce != EG(scope)) {
zend_class_entry *ce = object->ce;
zend_error(EG(in_execution) ? E_ERROR : E_WARNING,
"Call to private %s::__destruct() from context '%s'%s",
ce->name,
EG(scope) ? EG(scope)->name : "",
zend_error(EG(in_execution) ? E_ERROR : E_WARNING,
"Call to private %s::__destruct() from context '%s'%s",
ce->name,
EG(scope) ? EG(scope)->name : "",
EG(in_execution) ? "" : " during shutdown ignored");
return;
}
} else {
/* Ensure that if we're calling a protected function, we're allowed to do so.
*/
if (!zend_check_protected(destructor->common.scope, EG(scope))) {
if (!zend_check_protected(zend_get_function_root_class(destructor), EG(scope))) {
zend_class_entry *ce = object->ce;
zend_error(EG(in_execution) ? E_ERROR : E_WARNING,
"Call to protected %s::__destruct() from context '%s'%s",
ce->name,
EG(scope) ? EG(scope)->name : "",
zend_error(EG(in_execution) ? E_ERROR : E_WARNING,
"Call to protected %s::__destruct() from context '%s'%s",
ce->name,
EG(scope) ? EG(scope)->name : "",
EG(in_execution) ? "" : " during shutdown ignored");
return;
}
@@ -139,7 +139,7 @@ ZEND_API void zend_objects_free_object_storage(zend_object *object TSRMLS_DC)
}
ZEND_API zend_object_value zend_objects_new(zend_object **object, zend_class_entry *class_type TSRMLS_DC)
{
{
zend_object_value retval;
*object = emalloc(sizeof(zend_object));
@@ -222,7 +222,7 @@ ZEND_API zend_object_value zend_objects_clone_obj(zval *zobject TSRMLS_DC)
zend_object *new_object;
zend_object_handle handle = Z_OBJ_HANDLE_P(zobject);
/* assume that create isn't overwritten, so when clone depends on the
/* assume that create isn't overwritten, so when clone depends on the
* overwritten one then it must itself be overwritten */
old_object = zend_objects_get_address(zobject TSRMLS_CC);
new_obj_val = zend_objects_new(&new_object, old_object->ce TSRMLS_CC);
+6
View File
@@ -215,6 +215,12 @@ ZEND_API int zend_cleanup_class_data(zend_class_entry **pce TSRMLS_DC)
void _destroy_zend_class_traits_info(zend_class_entry *ce)
{
if (ce->num_traits > 0 && ce->traits) {
size_t i;
for (i = 0; i < ce->num_traits; i++) {
if (ce->traits[i]) {
destroy_zend_class(&ce->traits[i]);
}
}
efree(ce->traits);
}
+27 -5
View File
@@ -1605,7 +1605,8 @@ ZEND_API int is_identical_function(zval *result, zval *op1, zval *op2 TSRMLS_DC)
&& (!memcmp(Z_STRVAL_P(op1), Z_STRVAL_P(op2), Z_STRLEN_P(op1))));
break;
case IS_ARRAY:
Z_LVAL_P(result) = zend_hash_compare(Z_ARRVAL_P(op1), Z_ARRVAL_P(op2), (compare_func_t) hash_zval_identical_function, 1 TSRMLS_CC)==0;
Z_LVAL_P(result) = (Z_ARRVAL_P(op1) == Z_ARRVAL_P(op2) ||
zend_hash_compare(Z_ARRVAL_P(op1), Z_ARRVAL_P(op2), (compare_func_t) hash_zval_identical_function, 1 TSRMLS_CC)==0);
break;
case IS_OBJECT:
if (Z_OBJ_HT_P(op1) == Z_OBJ_HT_P(op2)) {
@@ -2035,15 +2036,36 @@ ZEND_API int zend_binary_zval_strncasecmp(zval *s1, zval *s2, zval *s3) /* {{{ *
ZEND_API void zendi_smart_strcmp(zval *result, zval *s1, zval *s2) /* {{{ */
{
int ret1, ret2;
int oflow1, oflow2;
long lval1, lval2;
double dval1, dval2;
if ((ret1=is_numeric_string(Z_STRVAL_P(s1), Z_STRLEN_P(s1), &lval1, &dval1, 0)) &&
(ret2=is_numeric_string(Z_STRVAL_P(s2), Z_STRLEN_P(s2), &lval2, &dval2, 0))) {
if ((ret1=is_numeric_string_ex(Z_STRVAL_P(s1), Z_STRLEN_P(s1), &lval1, &dval1, 0, &oflow1)) &&
(ret2=is_numeric_string_ex(Z_STRVAL_P(s2), Z_STRLEN_P(s2), &lval2, &dval2, 0, &oflow2))) {
#if ULONG_MAX == 0xFFFFFFFF
if (oflow1 != 0 && oflow1 == oflow2 && dval1 - dval2 == 0. &&
((oflow1 == 1 && dval1 > 9007199254740991. /*0x1FFFFFFFFFFFFF*/)
|| (oflow1 == -1 && dval1 < -9007199254740991.))) {
#else
if (oflow1 != 0 && oflow1 == oflow2 && dval1 - dval2 == 0.) {
#endif
/* both values are integers overflown to the same side, and the
* double comparison may have resulted in crucial accuracy lost */
goto string_cmp;
}
if ((ret1==IS_DOUBLE) || (ret2==IS_DOUBLE)) {
if (ret1!=IS_DOUBLE) {
if (oflow2) {
/* 2nd operand is integer > LONG_MAX (oflow2==1) or < LONG_MIN (-1) */
ZVAL_LONG(result, -1 * oflow2);
return;
}
dval1 = (double) lval1;
} else if (ret2!=IS_DOUBLE) {
if (oflow1) {
ZVAL_LONG(result, oflow1);
return;
}
dval2 = (double) lval2;
} else if (dval1 == dval2 && !zend_finite(dval1)) {
/* Both values overflowed and have the same sign,
@@ -2076,13 +2098,13 @@ static int hash_zval_compare_function(const zval **z1, const zval **z2 TSRMLS_DC
ZEND_API int zend_compare_symbol_tables_i(HashTable *ht1, HashTable *ht2 TSRMLS_DC) /* {{{ */
{
return zend_hash_compare(ht1, ht2, (compare_func_t) hash_zval_compare_function, 0 TSRMLS_CC);
return ht1 == ht2 ? 0 : zend_hash_compare(ht1, ht2, (compare_func_t) hash_zval_compare_function, 0 TSRMLS_CC);
}
/* }}} */
ZEND_API void zend_compare_symbol_tables(zval *result, HashTable *ht1, HashTable *ht2 TSRMLS_DC) /* {{{ */
{
ZVAL_LONG(result, zend_hash_compare(ht1, ht2, (compare_func_t) hash_zval_compare_function, 0 TSRMLS_CC));
ZVAL_LONG(result, ht1 == ht2 ? 0 : zend_hash_compare(ht1, ht2, (compare_func_t) hash_zval_compare_function, 0 TSRMLS_CC));
}
/* }}} */
+22 -2
View File
@@ -100,9 +100,12 @@ static zend_always_inline long zend_dval_to_lval(double d)
* if the number was out of long range or contained a decimal point/exponent.
* The number's value is returned into the respective pointer, *lval or *dval,
* if that pointer is not NULL.
*
* This variant also gives information if a string that represents an integer
* could not be represented as such due to overflow. It writes 1 to oflow_info
* if the integer is larger than LONG_MAX and -1 if it's smaller than LONG_MIN.
*/
static inline zend_uchar is_numeric_string(const char *str, int length, long *lval, double *dval, int allow_errors)
static inline zend_uchar is_numeric_string_ex(const char *str, int length, long *lval, double *dval, int allow_errors, int *oflow_info)
{
const char *ptr;
int base = 10, digits = 0, dp_or_e = 0;
@@ -113,6 +116,10 @@ static inline zend_uchar is_numeric_string(const char *str, int length, long *lv
return 0;
}
if (oflow_info != NULL) {
*oflow_info = 0;
}
/* Skip any whitespace
* This is much faster than the isspace() function */
while (*str == ' ' || *str == '\t' || *str == '\n' || *str == '\r' || *str == '\v' || *str == '\f') {
@@ -165,6 +172,9 @@ check_digits:
if (base == 10) {
if (digits >= MAX_LENGTH_OF_LONG) {
if (oflow_info != NULL) {
*oflow_info = *str == '-' ? -1 : 1;
}
dp_or_e = -1;
goto process_double;
}
@@ -172,6 +182,9 @@ check_digits:
if (dval) {
local_dval = zend_hex_strtod(str, &ptr);
}
if (oflow_info != NULL) {
*oflow_info = 1;
}
type = IS_DOUBLE;
}
} else if (*ptr == '.' && ZEND_IS_DIGIT(ptr[1])) {
@@ -207,6 +220,9 @@ process_double:
if (dval) {
*dval = zend_strtod(str, NULL);
}
if (oflow_info != NULL) {
*oflow_info = *str == '-' ? -1 : 1;
}
return IS_DOUBLE;
}
@@ -226,6 +242,10 @@ process_double:
}
}
static inline zend_uchar is_numeric_string(const char *str, int length, long *lval, double *dval, int allow_errors) {
return is_numeric_string_ex(str, length, lval, dval, allow_errors, NULL);
}
static inline char *
zend_memnstr(char *haystack, char *needle, int needle_len, char *end)
{
+2
View File
@@ -23,12 +23,14 @@
#include "zend.h"
BEGIN_EXTERN_C()
ZEND_API extern const char *(*zend_new_interned_string)(const char *str, int len, int free_src TSRMLS_DC);
ZEND_API extern void (*zend_interned_strings_snapshot)(TSRMLS_D);
ZEND_API extern void (*zend_interned_strings_restore)(TSRMLS_D);
void zend_interned_strings_init(TSRMLS_D);
void zend_interned_strings_dtor(TSRMLS_D);
END_EXTERN_C()
#ifndef ZTS
+5 -4
View File
@@ -2442,7 +2442,7 @@ ZEND_VM_HANDLER(59, ZEND_INIT_FCALL_BY_NAME, ANY, CONST|TMP|VAR|CV)
if (UNEXPECTED(EX(fbc) == NULL)) {
zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", Z_OBJ_CLASS_NAME_P(EX(object)), Z_STRVAL_PP(method));
}
if ((EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) != 0) {
EX(object) = NULL;
} else {
@@ -2974,7 +2974,7 @@ ZEND_VM_HANDLER(107, ZEND_CATCH, CONST, CV)
catch_ce = CACHED_PTR(opline->op1.literal->cache_slot);
} else {
catch_ce = zend_fetch_class_by_name(Z_STRVAL_P(opline->op1.zv), Z_STRLEN_P(opline->op1.zv), opline->op1.literal + 1, ZEND_FETCH_CLASS_NO_AUTOLOAD TSRMLS_CC);
CACHE_PTR(opline->op1.literal->cache_slot, catch_ce);
}
ce = Z_OBJCE_P(EG(exception));
@@ -3426,7 +3426,7 @@ ZEND_VM_HANDLER(110, ZEND_CLONE, CONST|TMP|VAR|UNUSED|CV, ANY)
} else if ((clone->common.fn_flags & ZEND_ACC_PROTECTED)) {
/* Ensure that if we're calling a protected function, we're allowed to do so.
*/
if (UNEXPECTED(!zend_check_protected(clone->common.scope, EG(scope)))) {
if (UNEXPECTED(!zend_check_protected(zend_get_function_root_class(clone), EG(scope)))) {
zend_error_noreturn(E_ERROR, "Call to protected %s::__clone() from context '%s'", ce->name, EG(scope) ? EG(scope)->name : "");
}
}
@@ -3947,7 +3947,8 @@ ZEND_VM_HANDLER(75, ZEND_UNSET_DIM, VAR|UNUSED|CV, CONST|TMP|VAR|CV)
switch (Z_TYPE_P(offset)) {
case IS_DOUBLE:
hval = zend_dval_to_lval(Z_DVAL_P(offset));
ZEND_VM_C_GOTO(num_index_dim);
zend_hash_index_del(ht, hval);
break;
case IS_RESOURCE:
case IS_BOOL:
case IS_LONG:
+29 -17
View File
@@ -2436,7 +2436,7 @@ static int ZEND_FASTCALL ZEND_CLONE_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS
} else if ((clone->common.fn_flags & ZEND_ACC_PROTECTED)) {
/* Ensure that if we're calling a protected function, we're allowed to do so.
*/
if (UNEXPECTED(!zend_check_protected(clone->common.scope, EG(scope)))) {
if (UNEXPECTED(!zend_check_protected(zend_get_function_root_class(clone), EG(scope)))) {
zend_error_noreturn(E_ERROR, "Call to protected %s::__clone() from context '%s'", ce->name, EG(scope) ? EG(scope)->name : "");
}
}
@@ -6850,7 +6850,7 @@ static int ZEND_FASTCALL ZEND_CLONE_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
} else if ((clone->common.fn_flags & ZEND_ACC_PROTECTED)) {
/* Ensure that if we're calling a protected function, we're allowed to do so.
*/
if (UNEXPECTED(!zend_check_protected(clone->common.scope, EG(scope)))) {
if (UNEXPECTED(!zend_check_protected(zend_get_function_root_class(clone), EG(scope)))) {
zend_error_noreturn(E_ERROR, "Call to protected %s::__clone() from context '%s'", ce->name, EG(scope) ? EG(scope)->name : "");
}
}
@@ -11278,7 +11278,7 @@ static int ZEND_FASTCALL ZEND_CLONE_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
} else if ((clone->common.fn_flags & ZEND_ACC_PROTECTED)) {
/* Ensure that if we're calling a protected function, we're allowed to do so.
*/
if (UNEXPECTED(!zend_check_protected(clone->common.scope, EG(scope)))) {
if (UNEXPECTED(!zend_check_protected(zend_get_function_root_class(clone), EG(scope)))) {
zend_error_noreturn(E_ERROR, "Call to protected %s::__clone() from context '%s'", ce->name, EG(scope) ? EG(scope)->name : "");
}
}
@@ -13917,7 +13917,8 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HAND
switch (Z_TYPE_P(offset)) {
case IS_DOUBLE:
hval = zend_dval_to_lval(Z_DVAL_P(offset));
goto num_index_dim;
zend_hash_index_del(ht, hval);
break;
case IS_RESOURCE:
case IS_BOOL:
case IS_LONG:
@@ -15919,7 +15920,8 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLE
switch (Z_TYPE_P(offset)) {
case IS_DOUBLE:
hval = zend_dval_to_lval(Z_DVAL_P(offset));
goto num_index_dim;
zend_hash_index_del(ht, hval);
break;
case IS_RESOURCE:
case IS_BOOL:
case IS_LONG:
@@ -18131,7 +18133,8 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLE
switch (Z_TYPE_P(offset)) {
case IS_DOUBLE:
hval = zend_dval_to_lval(Z_DVAL_P(offset));
goto num_index_dim;
zend_hash_index_del(ht, hval);
break;
case IS_RESOURCE:
case IS_BOOL:
case IS_LONG:
@@ -21166,7 +21169,8 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER
switch (Z_TYPE_P(offset)) {
case IS_DOUBLE:
hval = zend_dval_to_lval(Z_DVAL_P(offset));
goto num_index_dim;
zend_hash_index_del(ht, hval);
break;
case IS_RESOURCE:
case IS_BOOL:
case IS_LONG:
@@ -21475,7 +21479,7 @@ static int ZEND_FASTCALL ZEND_CLONE_SPEC_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARG
} else if ((clone->common.fn_flags & ZEND_ACC_PROTECTED)) {
/* Ensure that if we're calling a protected function, we're allowed to do so.
*/
if (UNEXPECTED(!zend_check_protected(clone->common.scope, EG(scope)))) {
if (UNEXPECTED(!zend_check_protected(zend_get_function_root_class(clone), EG(scope)))) {
zend_error_noreturn(E_ERROR, "Call to protected %s::__clone() from context '%s'", ce->name, EG(scope) ? EG(scope)->name : "");
}
}
@@ -22504,7 +22508,8 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_H
switch (Z_TYPE_P(offset)) {
case IS_DOUBLE:
hval = zend_dval_to_lval(Z_DVAL_P(offset));
goto num_index_dim;
zend_hash_index_del(ht, hval);
break;
case IS_RESOURCE:
case IS_BOOL:
case IS_LONG:
@@ -23662,7 +23667,8 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_UNUSED_TMP_HANDLER(ZEND_OPCODE_HAN
switch (Z_TYPE_P(offset)) {
case IS_DOUBLE:
hval = zend_dval_to_lval(Z_DVAL_P(offset));
goto num_index_dim;
zend_hash_index_del(ht, hval);
break;
case IS_RESOURCE:
case IS_BOOL:
case IS_LONG:
@@ -24820,7 +24826,8 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_UNUSED_VAR_HANDLER(ZEND_OPCODE_HAN
switch (Z_TYPE_P(offset)) {
case IS_DOUBLE:
hval = zend_dval_to_lval(Z_DVAL_P(offset));
goto num_index_dim;
zend_hash_index_del(ht, hval);
break;
case IS_RESOURCE:
case IS_BOOL:
case IS_LONG:
@@ -26244,7 +26251,8 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HAND
switch (Z_TYPE_P(offset)) {
case IS_DOUBLE:
hval = zend_dval_to_lval(Z_DVAL_P(offset));
goto num_index_dim;
zend_hash_index_del(ht, hval);
break;
case IS_RESOURCE:
case IS_BOOL:
case IS_LONG:
@@ -27222,7 +27230,7 @@ static int ZEND_FASTCALL ZEND_CLONE_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
} else if ((clone->common.fn_flags & ZEND_ACC_PROTECTED)) {
/* Ensure that if we're calling a protected function, we're allowed to do so.
*/
if (UNEXPECTED(!zend_check_protected(clone->common.scope, EG(scope)))) {
if (UNEXPECTED(!zend_check_protected(zend_get_function_root_class(clone), EG(scope)))) {
zend_error_noreturn(E_ERROR, "Call to protected %s::__clone() from context '%s'", ce->name, EG(scope) ? EG(scope)->name : "");
}
}
@@ -29498,7 +29506,8 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDL
switch (Z_TYPE_P(offset)) {
case IS_DOUBLE:
hval = zend_dval_to_lval(Z_DVAL_P(offset));
goto num_index_dim;
zend_hash_index_del(ht, hval);
break;
case IS_RESOURCE:
case IS_BOOL:
case IS_LONG:
@@ -31371,7 +31380,8 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER
switch (Z_TYPE_P(offset)) {
case IS_DOUBLE:
hval = zend_dval_to_lval(Z_DVAL_P(offset));
goto num_index_dim;
zend_hash_index_del(ht, hval);
break;
case IS_RESOURCE:
case IS_BOOL:
case IS_LONG:
@@ -33453,7 +33463,8 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER
switch (Z_TYPE_P(offset)) {
case IS_DOUBLE:
hval = zend_dval_to_lval(Z_DVAL_P(offset));
goto num_index_dim;
zend_hash_index_del(ht, hval);
break;
case IS_RESOURCE:
case IS_BOOL:
case IS_LONG:
@@ -36219,7 +36230,8 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_
switch (Z_TYPE_P(offset)) {
case IS_DOUBLE:
hval = zend_dval_to_lval(Z_DVAL_P(offset));
goto num_index_dim;
zend_hash_index_del(ht, hval);
break;
case IS_RESOURCE:
case IS_BOOL:
case IS_LONG:
+6
View File
@@ -2449,7 +2449,12 @@ AC_DEFUN([PHP_SETUP_ICONV], [
dnl
dnl Check libc first if no path is provided in --with-iconv
dnl
if test "$PHP_ICONV" = "yes"; then
dnl Reset LIBS temporarily as it may have already been included
dnl -liconv in.
LIBS_save="$LIBS"
LIBS=
AC_CHECK_FUNC(iconv, [
found_iconv=yes
],[
@@ -2459,6 +2464,7 @@ AC_DEFUN([PHP_SETUP_ICONV], [
found_iconv=yes
])
])
LIBS="$LIBS_save"
fi
dnl
+3 -3
View File
@@ -9,7 +9,7 @@ dnl Basic autoconf + automake initialization, generation of config.nice.
dnl -------------------------------------------------------------------------
AC_PREREQ(2.59)
AC_INIT(README.SVN-RULES)
AC_INIT(README.GIT-RULES)
ifdef([AC_PRESERVE_HELP_ORDER], [AC_PRESERVE_HELP_ORDER], [])
PHP_CONFIG_NICE(config.nice)
@@ -119,8 +119,8 @@ int zend_sprintf(char *buffer, const char *format, ...);
PHP_MAJOR_VERSION=5
PHP_MINOR_VERSION=4
PHP_RELEASE_VERSION=1
PHP_EXTRA_VERSION="RC1-dev"
PHP_RELEASE_VERSION=6
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`
+25
View File
@@ -2,9 +2,34 @@
unixtojd()
--SKIPIF--
<?php include 'skipif.inc'; ?>
--ENV--
TZ=UTC
--FILE--
<?php
// this line has no impact on test output on Windows
putenv('TZ=UTC');
// getenv('TZ') returns 'UTC' here
// putenv (basic_functions.c) does call tzset() when the env var being put is 'TZ'
// -adding a call direct to GetEnvironmentVariableA just before tzset() is called to check the value of 'TZ' returns 'UTC'
// putting a call to date_default_timezone_set() here doesn't help
//
// on Windows, the only thing that gets this test to pass is to put TZ=UTC in --ENV-- section
// -since putenv() is written to call tzset() when env var is TZ, I assume that putenv("TZ=UTC") is intended to work
// and should work on all platforms(including Windows).
// easter_date.phpt passes
// -doesn't use --ENV-- section
// -uses --INI-- section with date.timezone=UTC
// -uses putenv('TZ=UTC')
// date.timezone=UTC
// -if ommitted from easter_date.phpt, outputs DATE_TZ_ERRMSG warning
// -easter_date() calls mktime() and localtime()
// -whereas unixtojd(1000000000) calls localtime(1000000000)
// -if ommitted from unixtojd.phpt, does NOT output DATE_TZ_ERRMSG
//
// unixtojd() calls php_localtime_r() which for Pacific timezone systems, returns a time -8 hours
// -this incorrect localtime is passed to the julian date conversion (GregorianToSDN) function which works (probably correctly)
// but returns -1 day from expected because its input is -1 from expected
echo unixtojd(40000). "\n";
echo unixtojd(1000000000). "\n";
echo unixtojd(1152459009). "\n";
+3 -3
View File
@@ -42,7 +42,7 @@ void php_com_throw_exception(HRESULT code, char *message TSRMLS_DC)
}
}
PHPAPI void php_com_wrap_dispatch(zval *z, IDispatch *disp,
PHP_COM_DOTNET_API void php_com_wrap_dispatch(zval *z, IDispatch *disp,
int codepage TSRMLS_DC)
{
php_com_dotnet_object *obj;
@@ -65,7 +65,7 @@ PHPAPI void php_com_wrap_dispatch(zval *z, IDispatch *disp,
z->value.obj.handlers = &php_com_object_handlers;
}
PHPAPI void php_com_wrap_variant(zval *z, VARIANT *v,
PHP_COM_DOTNET_API void php_com_wrap_variant(zval *z, VARIANT *v,
int codepage TSRMLS_DC)
{
php_com_dotnet_object *obj;
@@ -92,7 +92,7 @@ PHPAPI void php_com_wrap_variant(zval *z, VARIANT *v,
/* this is a convenience function for fetching a particular
* element from a (possibly multi-dimensional) safe array */
PHPAPI int php_com_safearray_get_elem(VARIANT *array, VARIANT *dest, LONG dim1 TSRMLS_DC)
PHP_COM_DOTNET_API int php_com_safearray_get_elem(VARIANT *array, VARIANT *dest, LONG dim1 TSRMLS_DC)
{
UINT dims;
LONG lbound, ubound;
+2 -2
View File
@@ -30,7 +30,7 @@
#include "php_com_dotnet_internal.h"
PHPAPI OLECHAR *php_com_string_to_olestring(char *string, uint string_len, int codepage TSRMLS_DC)
PHP_COM_DOTNET_API OLECHAR *php_com_string_to_olestring(char *string, uint string_len, int codepage TSRMLS_DC)
{
OLECHAR *olestring = NULL;
DWORD flags = codepage == CP_UTF8 ? 0 : MB_PRECOMPOSED | MB_ERR_INVALID_CHARS;
@@ -65,7 +65,7 @@ PHPAPI OLECHAR *php_com_string_to_olestring(char *string, uint string_len, int c
return olestring;
}
PHPAPI char *php_com_olestring_to_string(OLECHAR *olestring, uint *string_len, int codepage TSRMLS_DC)
PHP_COM_DOTNET_API char *php_com_olestring_to_string(OLECHAR *olestring, uint *string_len, int codepage TSRMLS_DC)
{
char *string;
uint length = 0;
+1 -1
View File
@@ -268,7 +268,7 @@ static void istream_destructor(php_istream *stm TSRMLS_DC)
}
/* }}} */
PHPAPI IStream *php_com_wrapper_export_stream(php_stream *stream TSRMLS_DC)
PHP_COM_DOTNET_API IStream *php_com_wrapper_export_stream(php_stream *stream TSRMLS_DC)
{
php_istream *stm = (php_istream*)CoTaskMemAlloc(sizeof(*stm));
+3 -3
View File
@@ -35,7 +35,7 @@
* b) a CLSID, major, minor e.g. "{00000200-0000-0010-8000-00AA006D2EA4},2,0"
* c) a Type Library name e.g. "Microsoft OLE DB ActiveX Data Objects 1.0 Library"
*/
PHPAPI ITypeLib *php_com_load_typelib(char *search_string, int codepage TSRMLS_DC)
PHP_COM_DOTNET_API ITypeLib *php_com_load_typelib(char *search_string, int codepage TSRMLS_DC)
{
ITypeLib *TL = NULL;
char *strtok_buf, *major, *minor;
@@ -153,7 +153,7 @@ PHPAPI ITypeLib *php_com_load_typelib(char *search_string, int codepage TSRMLS_D
}
/* Given a type-library, merge it into the current engine state */
PHPAPI int php_com_import_typelib(ITypeLib *TL, int mode, int codepage TSRMLS_DC)
PHP_COM_DOTNET_API int php_com_import_typelib(ITypeLib *TL, int mode, int codepage TSRMLS_DC)
{
int i, j, interfaces;
TYPEKIND pTKind;
@@ -228,7 +228,7 @@ void php_com_typelibrary_dtor(void *pDest)
ITypeLib_Release(*Lib);
}
PHPAPI ITypeLib *php_com_load_typelib_via_cache(char *search_string,
PHP_COM_DOTNET_API ITypeLib *php_com_load_typelib_via_cache(char *search_string,
int codepage, int *cached TSRMLS_DC)
{
ITypeLib **TLp;
+3 -3
View File
@@ -98,7 +98,7 @@ bogus:
}
}
PHPAPI void php_com_variant_from_zval(VARIANT *v, zval *z, int codepage TSRMLS_DC)
PHP_COM_DOTNET_API void php_com_variant_from_zval(VARIANT *v, zval *z, int codepage TSRMLS_DC)
{
OLECHAR *olestring;
php_com_dotnet_object *obj;
@@ -166,7 +166,7 @@ PHPAPI void php_com_variant_from_zval(VARIANT *v, zval *z, int codepage TSRMLS_D
}
}
PHPAPI int php_com_zval_from_variant(zval *z, VARIANT *v, int codepage TSRMLS_DC)
PHP_COM_DOTNET_API int php_com_zval_from_variant(zval *z, VARIANT *v, int codepage TSRMLS_DC)
{
OLECHAR *olestring = NULL;
int ret = SUCCESS;
@@ -258,7 +258,7 @@ PHPAPI int php_com_zval_from_variant(zval *z, VARIANT *v, int codepage TSRMLS_DC
}
PHPAPI int php_com_copy_variant(VARIANT *dstvar, VARIANT *srcvar TSRMLS_DC)
PHP_COM_DOTNET_API int php_com_copy_variant(VARIANT *dstvar, VARIANT *srcvar TSRMLS_DC)
{
int ret = SUCCESS;
+2 -2
View File
@@ -578,7 +578,7 @@ static void disp_destructor(php_dispatchex *disp TSRMLS_DC)
CoTaskMemFree(disp);
}
PHPAPI IDispatch *php_com_wrapper_export_as_sink(zval *val, GUID *sinkid,
PHP_COM_DOTNET_API IDispatch *php_com_wrapper_export_as_sink(zval *val, GUID *sinkid,
HashTable *id_to_name TSRMLS_DC)
{
php_dispatchex *disp = disp_constructor(val TSRMLS_CC);
@@ -617,7 +617,7 @@ PHPAPI IDispatch *php_com_wrapper_export_as_sink(zval *val, GUID *sinkid,
return (IDispatch*)disp;
}
PHPAPI IDispatch *php_com_wrapper_export(zval *val TSRMLS_DC)
PHP_COM_DOTNET_API IDispatch *php_com_wrapper_export(zval *val TSRMLS_DC)
{
php_dispatchex *disp = NULL;
+8
View File
@@ -28,6 +28,14 @@ extern zend_module_entry com_dotnet_module_entry;
#include "TSRM.h"
#endif
#ifdef PHP_WIN32
# define PHP_COM_DOTNET_API __declspec(dllexport)
#elif defined(__GNUC__) && __GNUC__ >= 4
# define PHP_COM_DOTNET_API __attribute__ ((visibility("default")))
#else
# define PHP_COM_DOTNET_API
#endif
PHP_MINIT_FUNCTION(com_dotnet);
PHP_MSHUTDOWN_FUNCTION(com_dotnet);
PHP_RINIT_FUNCTION(com_dotnet);
+14 -14
View File
@@ -84,9 +84,9 @@ zend_object_iterator *php_com_saproxy_iter_get(zend_class_entry *ce, zval *objec
int php_com_saproxy_create(zval *com_object, zval *proxy_out, zval *index TSRMLS_DC);
/* com_olechar.c */
PHPAPI char *php_com_olestring_to_string(OLECHAR *olestring,
PHP_COM_DOTNET_API char *php_com_olestring_to_string(OLECHAR *olestring,
uint *string_len, int codepage TSRMLS_DC);
PHPAPI OLECHAR *php_com_string_to_olestring(char *string,
PHP_COM_DOTNET_API OLECHAR *php_com_string_to_olestring(char *string,
uint string_len, int codepage TSRMLS_DC);
@@ -112,8 +112,8 @@ int php_com_do_invoke_byref(php_com_dotnet_object *obj, char *name, int namelen,
/* com_wrapper.c */
int php_com_wrapper_minit(INIT_FUNC_ARGS);
PHPAPI IDispatch *php_com_wrapper_export_as_sink(zval *val, GUID *sinkid, HashTable *id_to_name TSRMLS_DC);
PHPAPI IDispatch *php_com_wrapper_export(zval *val TSRMLS_DC);
PHP_COM_DOTNET_API IDispatch *php_com_wrapper_export_as_sink(zval *val, GUID *sinkid, HashTable *id_to_name TSRMLS_DC);
PHP_COM_DOTNET_API IDispatch *php_com_wrapper_export(zval *val TSRMLS_DC);
/* com_persist.c */
int php_com_persist_minit(INIT_FUNC_ARGS);
@@ -147,10 +147,10 @@ PHP_FUNCTION(variant_get_type);
PHP_FUNCTION(variant_set_type);
PHP_FUNCTION(variant_cast);
PHPAPI void php_com_variant_from_zval_with_type(VARIANT *v, zval *z, VARTYPE type, int codepage TSRMLS_DC);
PHPAPI void php_com_variant_from_zval(VARIANT *v, zval *z, int codepage TSRMLS_DC);
PHPAPI int php_com_zval_from_variant(zval *z, VARIANT *v, int codepage TSRMLS_DC);
PHPAPI int php_com_copy_variant(VARIANT *dst, VARIANT *src TSRMLS_DC);
PHP_COM_DOTNET_API void php_com_variant_from_zval_with_type(VARIANT *v, zval *z, VARTYPE type, int codepage TSRMLS_DC);
PHP_COM_DOTNET_API void php_com_variant_from_zval(VARIANT *v, zval *z, int codepage TSRMLS_DC);
PHP_COM_DOTNET_API int php_com_zval_from_variant(zval *z, VARIANT *v, int codepage TSRMLS_DC);
PHP_COM_DOTNET_API int php_com_copy_variant(VARIANT *dst, VARIANT *src TSRMLS_DC);
/* com_dotnet.c */
PHP_FUNCTION(com_dotnet_create_instance);
@@ -159,17 +159,17 @@ void php_com_dotnet_mshutdown(TSRMLS_D);
/* com_misc.c */
void php_com_throw_exception(HRESULT code, char *message TSRMLS_DC);
PHPAPI void php_com_wrap_dispatch(zval *z, IDispatch *disp,
PHP_COM_DOTNET_API void php_com_wrap_dispatch(zval *z, IDispatch *disp,
int codepage TSRMLS_DC);
PHPAPI void php_com_wrap_variant(zval *z, VARIANT *v,
PHP_COM_DOTNET_API void php_com_wrap_variant(zval *z, VARIANT *v,
int codepage TSRMLS_DC);
PHPAPI int php_com_safearray_get_elem(VARIANT *array, VARIANT *dest, LONG dim1 TSRMLS_DC);
PHP_COM_DOTNET_API int php_com_safearray_get_elem(VARIANT *array, VARIANT *dest, LONG dim1 TSRMLS_DC);
/* com_typeinfo.c */
PHPAPI ITypeLib *php_com_load_typelib_via_cache(char *search_string,
PHP_COM_DOTNET_API ITypeLib *php_com_load_typelib_via_cache(char *search_string,
int codepage, int *cached TSRMLS_DC);
PHPAPI ITypeLib *php_com_load_typelib(char *search_string, int codepage TSRMLS_DC);
PHPAPI int php_com_import_typelib(ITypeLib *TL, int mode,
PHP_COM_DOTNET_API ITypeLib *php_com_load_typelib(char *search_string, int codepage TSRMLS_DC);
PHP_COM_DOTNET_API int php_com_import_typelib(ITypeLib *TL, int mode,
int codepage TSRMLS_DC);
void php_com_typelibrary_dtor(void *pDest);
ITypeInfo *php_com_locate_typeinfo(char *typelibname, php_com_dotnet_object *obj, char *dispname, int sink TSRMLS_DC);
+14
View File
@@ -3,9 +3,23 @@ Bug #49192 (PHP crashes when GC invoked on COM object)
--SKIPIF--
<?php
if (!extension_loaded("com_dotnet")) print "skip COM/.Net support not present"; ?>
--XFAIL--
1
--FILE--
<?php
// this test fails to load ADO
//
// a change in windows longhorn x64(affecting vista, 7, 8, 2008, 2008r2) broke ADO.
//
// there is a fix available, but user has to install it.
// given that ADO was deprecated a long time ago in favor of newer APIs,
// I don't think its worth the trouble of making the user install the fix to
// get an accurate test run. its better to just not run the test or expect it to fail.
//
// see: http://support.microsoft.com/kb/2517589
// see: http://www.infoq.com/news/2011/10/ADO-Win7
$dbConnection = new Com('ADODB.Connection');
var_dump(gc_collect_cycles());
?>
+1 -1
View File
@@ -2177,7 +2177,7 @@ string_copy:
convert_to_string_ex(zvalue);
if (php_check_open_basedir(Z_STRVAL_PP(zvalue) TSRMLS_CC)) {
if (Z_STRLEN_PP(zvalue) && php_check_open_basedir(Z_STRVAL_PP(zvalue) TSRMLS_CC)) {
RETVAL_FALSE;
return 1;
}
+25
View File
@@ -0,0 +1,25 @@
--TEST--
Bug #61948 (CURLOPT_COOKIEFILE '' raises open_basedir restriction)
--SKIPIF--
<?php if (!extension_loaded("curl")) print "skip";
if(substr(PHP_OS, 0, 3) != 'WIN' )
die("skip Not Valid for Linux");
?>
--INI--
open_basedir="c:/tmp"
--FILE--
<?php
$ch = curl_init();
var_dump(curl_setopt($ch, CURLOPT_COOKIEFILE, ""));
var_dump(curl_setopt($ch, CURLOPT_COOKIEFILE, "c:/tmp/foo"));
var_dump(curl_setopt($ch, CURLOPT_COOKIEFILE, "c:/xxx/bar"));
curl_close($ch);
?>
--EXPECTF--
%a
Warning: curl_setopt(): open_basedir restriction in effect. File(c:/tmp/foo) is not within the allowed path(s): (c:/tmp) in %sbug61948-win32.php on line %d
bool(false)
Warning: curl_setopt(): open_basedir restriction in effect. File(c:/xxx/bar) is not within the allowed path(s): (c:/tmp) in %sbug61948-win32.php on line %d
bool(false)
+23
View File
@@ -0,0 +1,23 @@
--TEST--
Bug #61948 (CURLOPT_COOKIEFILE '' raises open_basedir restriction)
--SKIPIF--
<?php if (!extension_loaded("curl")) print "skip";
if(substr(PHP_OS, 0, 3) == 'WIN' )
die("skip Not Valid for Windows");
?>
--INI--
open_basedir="/tmp"
--FILE--
<?php
$ch = curl_init();
var_dump(curl_setopt($ch, CURLOPT_COOKIEFILE, ""));
var_dump(curl_setopt($ch, CURLOPT_COOKIEFILE, "/tmp/foo"));
var_dump(curl_setopt($ch, CURLOPT_COOKIEFILE, "/xxx/bar"));
curl_close($ch);
?>
--EXPECTF--
bool(true)
bool(true)
Warning: curl_setopt(): open_basedir restriction in effect. File(/xxx/bar) is not within the allowed path(s): (/tmp) in %sbug61948.php on line %d
bool(false)
+635 -616
View File
File diff suppressed because it is too large. Load diff
+19
View File
@@ -3430,10 +3430,19 @@ zval *date_interval_read_property(zval *object, zval *member, int type, const ze
zval_copy_ctor(&tmp_member);
convert_to_string(&tmp_member);
member = &tmp_member;
key = NULL;
}
obj = (php_interval_obj *)zend_objects_get_address(object TSRMLS_CC);
if (!obj->initialized) {
retval = (zend_get_std_object_handlers())->read_property(object, member, type, key TSRMLS_CC);
if (member == &tmp_member) {
zval_dtor(member);
}
return retval;
}
#define GET_VALUE_FROM_STRUCT(n,m) \
if (strcmp(Z_STRVAL_P(member), m) == 0) { \
value = obj->diff->n; \
@@ -3482,9 +3491,19 @@ void date_interval_write_property(zval *object, zval *member, zval *value, const
zval_copy_ctor(&tmp_member);
convert_to_string(&tmp_member);
member = &tmp_member;
key = NULL;
}
obj = (php_interval_obj *)zend_objects_get_address(object TSRMLS_CC);
if (!obj->initialized) {
(zend_get_std_object_handlers())->write_property(object, member, value, key TSRMLS_CC);
if (member == &tmp_member) {
zval_dtor(member);
}
return;
}
#define SET_VALUE_FROM_STRUCT(n,m) \
if (strcmp(Z_STRVAL_P(member), m) == 0) { \
if (value->type != IS_LONG) { \
+5 -3
View File
@@ -13,6 +13,7 @@ date.timezone=UTC
$d = new DateTime('@100000000000');
var_dump($d->format('Y-m-d H:i:s U'));
var_dump($d->getTimestamp());
var_dump($d->format('U'));
$d->setTimestamp(100000000000);
var_dump($d->format('Y-m-d H:i:s U'));
@@ -23,7 +24,8 @@ var_dump($i->format('%s'));
?>
--EXPECT--
string(32) "5138-11-16 09:46:40 100000000000"
int(100000000000)
string(32) "5138-11-16 09:46:40 100000000000"
int(100000000000)
bool(false)
string(12) "100000000000"
string(30) "2008-07-11 04:56:32 1215752192"
int(1215752192)
string(10) "1215752192"
+28
View File
@@ -0,0 +1,28 @@
--TEST--
Bug #62500 (Segfault in DateInterval class when extended)
--INI--
date.timezone=GMT
--FILE--
<?php
class Crasher extends DateInterval {
public $foo;
public function __construct($time_spec) {
var_dump($this->foo);
$this->foo = 3;
var_dump($this->foo);
var_dump($this->{2});
parent::__construct($time_spec);
}
}
try {
$c = new Crasher('blah');
} catch (Exception $e) {
var_dump($e->getMessage());
}
--EXPECTF--
NULL
int(3)
Notice: Undefined property: Crasher::$2 in %sbug62500.php on line %d
NULL
string(%s) "DateInterval::__construct(): Unknown or bad format (blah)"
@@ -0,0 +1,24 @@
--TEST--
date_default_timezone_get() function [1]
--SKIPIF--
<?php
if(substr(PHP_OS, 0, 3) != 'WIN') die("skip skip on non windows");
?>
--INI--
date.timezone=
--FILE--
<?php
putenv('TZ=');
echo date_default_timezone_get(), "\n";
echo date('e'), "\n";
/* The behaviour on windows is to select an arbitrary timezone name from the current system settings.
This gives no chance to hardcode the timezone name, for instance for UTC+1 it could choose
from the multiple names like Europe/Berlin or Europe/Paris . For this reason the test is
parametrized so there is no hardcoded timezone data.*/
?>
--EXPECTF--
Warning: date_default_timezone_get(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone '%s' for now, but please set date.timezone to select your timezone. in %s on line %d
%s
Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone '%s' for now, but please set date.timezone to select your timezone. in %s on line %d
%s
@@ -1,5 +1,9 @@
--TEST--
date_default_timezone_get() function [1]
--SKIPIF--
<?php
if(substr(PHP_OS, 0, 3) == 'WIN') die("skip on windows");
?>
--INI--
date.timezone=
--FILE--
@@ -1,5 +1,9 @@
--TEST--
date_default_timezone_get() function [2]
--SKIPIF--
<?php
if(substr(PHP_OS, 0, 3) == 'WIN') die("skip on windows");
?>
--INI--
date.timezone=
--FILE--
+2 -2
View File
@@ -1,6 +1,6 @@
--TEST--
Read empty $value.
--CREDIT--
--CREDITS--
Jason Bouffard <jbouffard1@yahoo.com>
# TestFest Atlanta 2009-05-14
--SKIPIF--
@@ -13,4 +13,4 @@ print $attr->value."\n";
===DONE===
--EXPECTF--
===DONE===
+2 -2
View File
@@ -1,6 +1,6 @@
--TEST--
Write non-string $value property
--CREDIT--
--CREDITS--
Eric Berg <ehberg@gmail.com>
# TestFest Atlanta 2009-05-14
--SKIPIF--
@@ -12,4 +12,4 @@ $attr->value = 1;
print $attr->value;
?>
--EXPECTF--
1
1
@@ -1,6 +1,6 @@
--TEST--
Invalid State Error when getting data on DOMCharacterData out of content.
--CREDIT--
--CREDITS--
Eric Berg <ehberg@gmail.com>
# TestFest Atlanta 2009-05-14
--SKIPIF--
@@ -11,4 +11,4 @@ $character_data = new DOMCharacterData();
print $character_data->data;
?>
--EXPECTF--
Warning: main(): Invalid State Error in %s on line %d
Warning: main(): Invalid State Error in %s on line %d
@@ -1,6 +1,6 @@
--TEST--
Invalid State Error when getting length on DOMCharacterData out of content.
--CREDIT--
--CREDITS--
Jason Bouffard <jbouffard1@yahoo.com>
# TestFest Atlanta 2009-05-14
--SKIPIF--
@@ -14,4 +14,4 @@ print $character_data->length;
--EXPECTF--
Warning: main(): Invalid State Error in %s
===DONE===
@@ -12,7 +12,7 @@ require_once('skipif.inc');
require_once('dom_test.inc');
chdir(__DIR__ . "/../examples");
chdir(__DIR__);
$XMLStringGood = file_get_contents('note.xml');
$dom = new DOMDocument;
+19 -7
View File
@@ -63,12 +63,24 @@ echo "\n";
$ents = $dtd->entities;
$length = $ents->length;
echo "Length: ".$length."\n";
$xkeys = array();
foreach ($ents AS $key=>$node) {
echo "Key: $key Name: ".$node->nodeName."\n";
$xkeys[] = "Key: $key Name: ".$node->nodeName."\n";
}
sort($xkeys); // fix inconsistent output ordering (bug #61810)
foreach ($xkeys as $key => $node) {
echo $node;
}
echo "\n";
$xkeys = array();
for($x=0; $x < $length; $x++) {
echo "Index $x: ".$ents->item($x)->nodeName."\n";
$xkeys[] = "Index: ".$ents->item($x)->nodeName."\n";
}
sort($xkeys); // fix inconsistent output ordering (bug #61810)
foreach ($xkeys as $key => $node) {
echo $node;
}
echo "\n";
@@ -87,13 +99,13 @@ Index 0: GIF (image/gif) (-)
NULL
Length: 3
Key: test Name: test
Key: rdf Name: rdf
Key: myimage Name: myimage
Key: rdf Name: rdf
Key: test Name: test
Index 0: test
Index 1: rdf
Index 2: myimage
Index: myimage
Index: rdf
Index: test
NULL
NULL
+6
View File
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<!ELEMENT note (to,from,heading,body)>
<!ELEMENT to (#PCDATA)>
<!ELEMENT from (#PCDATA)>
<!ELEMENT heading (#PCDATA)>
<!ELEMENT body (#PCDATA)>
+8
View File
@@ -0,0 +1,8 @@
<?xml version="1.0"?>
<!DOCTYPE note SYSTEM "note.dtd">
<note>
<to>PHP User Group</to>
<from>Shane</from>
<heading>Reminder</heading>
<body>Don't forget the meeting tonight!</body>
</note>
+8 -1
View File
@@ -216,7 +216,7 @@ static void dom_xpath_ext_function_php(xmlXPathParserContextPtr ctxt, int nargs,
if (Z_TYPE(handler) == IS_STRING) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to call handler %s()", Z_STRVAL_P(&handler));
}
/* retval is == NULL, when an exception occured, don't report anything, because PHP itself will handle that */
/* retval is == NULL, when an exception occurred, don't report anything, because PHP itself will handle that */
} else if (retval == NULL) {
} else {
if (retval->type == IS_OBJECT && instanceof_function( Z_OBJCE_P(retval), dom_node_class_entry TSRMLS_CC)) {
@@ -321,6 +321,7 @@ int dom_xpath_document_read(dom_object *obj, zval **retval TSRMLS_DC)
xmlDoc *docp = NULL;
xmlXPathContextPtr ctx;
int ret;
zval *tmp;
ctx = (xmlXPathContextPtr) obj->ptr;
@@ -329,10 +330,16 @@ int dom_xpath_document_read(dom_object *obj, zval **retval TSRMLS_DC)
}
ALLOC_ZVAL(*retval);
tmp = *retval;
if (NULL == (*retval = php_dom_create_object((xmlNodePtr) docp, &ret, *retval, obj TSRMLS_CC))) {
FREE_ZVAL(tmp);
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot create required DOM object");
return FAILURE;
}
if (tmp != *retval) {
FREE_ZVAL(tmp);
}
return SUCCESS;
}
/* }}} */
+5 -1
View File
@@ -3254,7 +3254,7 @@ static void exif_process_APP12(image_info_type *ImageInfo, char *buffer, size_t
if ((l1 = php_strnlen(buffer+2, length-2)) > 0) {
exif_iif_add_tag(ImageInfo, SECTION_APP12, "Company", TAG_NONE, TAG_FMT_STRING, l1, buffer+2 TSRMLS_CC);
if (length > 2+l1+1) {
l2 = php_strnlen(buffer+2+l1+1, length-2-l1+1);
l2 = php_strnlen(buffer+2+l1+1, length-2-l1-1);
exif_iif_add_tag(ImageInfo, SECTION_APP12, "Info", TAG_NONE, TAG_FMT_STRING, l2, buffer+2+l1+1 TSRMLS_CC);
}
}
@@ -3404,6 +3404,10 @@ static int exif_scan_JPEG_header(image_info_type *ImageInfo TSRMLS_DC)
case M_SOF13:
case M_SOF14:
case M_SOF15:
if ((itemlen - 2) < 6) {
return FALSE;
}
exif_process_SOFn(Data, marker, &sof_info);
ImageInfo->Width = sof_info.width;
ImageInfo->Height = sof_info.height;
+14 -3
View File
@@ -270,7 +270,7 @@ ZEND_GET_MODULE(fileinfo)
PHP_MINFO_FUNCTION(fileinfo)
{
php_info_print_table_start();
php_info_print_table_header(2, "fileinfo support", "enabled");
php_info_print_table_row(2, "fileinfo support", "enabled");
php_info_print_table_row(2, "version", PHP_FILEINFO_VERSION);
php_info_print_table_end();
}
@@ -510,11 +510,22 @@ static void _php_finfo_get_type(INTERNAL_FUNCTION_PARAMETERS, int mode, int mime
wrap = php_stream_locate_url_wrapper(buffer, &tmp2, 0 TSRMLS_CC);
if (wrap) {
php_stream *stream;
php_stream_context *context = php_stream_context_from_zval(zcontext, 0);
#ifdef PHP_WIN32
if (php_stream_stat_path_ex(buffer, 0, &ssb, context) == SUCCESS) {
if (ssb.sb.st_mode & S_IFDIR) {
ret_val = mime_directory;
goto common;
}
}
#endif
#if PHP_API_VERSION < 20100412
php_stream *stream = php_stream_open_wrapper_ex(buffer, "rb", ENFORCE_SAFE_MODE | REPORT_ERRORS, NULL, context);
stream = php_stream_open_wrapper_ex(buffer, "rb", ENFORCE_SAFE_MODE | REPORT_ERRORS, NULL, context);
#else
php_stream *stream = php_stream_open_wrapper_ex(buffer, "rb", REPORT_ERRORS, NULL, context);
stream = php_stream_open_wrapper_ex(buffer, "rb", REPORT_ERRORS, NULL, context);
#endif
if (!stream) {
+496 -139
View File
@@ -1,6 +1,6 @@
diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
--- libmagic.orig/apprentice.c 2012-03-28 12:00:34.017709605 +0200
+++ libmagic/apprentice.c 2012-03-28 01:53:04.283305402 +0200
diff -u libmagic.origin/apprentice.c libmagic/apprentice.c
--- libmagic.origin/apprentice.c 2012-07-15 18:17:24.802087661 +0800
+++ libmagic/apprentice.c 2012-07-15 18:22:49.650087425 +0800
@@ -29,6 +29,8 @@
* apprentice - make one pass through /etc/magic, learning its secrets.
*/
@@ -271,7 +271,9 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
+ size_t lineno = 0;
+
+ php_stream *stream;
+
- FILE *f = fopen(ms->file = fn, "r");
- if (f == NULL) {
+ TSRMLS_FETCH();
+
+#if PHP_API_VERSION < 20100412
@@ -279,9 +281,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
+#else
+ stream = php_stream_open_wrapper((char *)fn, "rb", REPORT_ERRORS, NULL);
+#endif
- FILE *f = fopen(ms->file = fn, "r");
- if (f == NULL) {
+
+ if (stream == NULL) {
if (errno != ENOENT)
file_error(ms, errno, "cannot read magic file `%s'",
@@ -312,8 +312,12 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
}
/*
@@ -757,20 +756,16 @@
int errs = 0;
@@ -754,23 +753,19 @@
apprentice_load(struct magic_set *ms, struct magic **magicp, uint32_t *nmagicp,
const char *fn, int action)
{
- int errs = 0;
+ int errs = 0, mflen = 0;
struct magic_entry *marray;
uint32_t marraycount, i, mentrycount = 0, starttest;
- size_t slen, files = 0, maxfiles = 0;
@@ -352,7 +356,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
}
while ((d = readdir(dir)) != NULL) {
- if (asprintf(&mfn, "%s/%s", fn, d->d_name) < 0) {
+ if (snprintf(mfn, sizeof(mfn), "%s/%s", fn, d->d_name) < 0) {
+ if ((mflen = snprintf(mfn, sizeof(mfn), "%s/%s", fn, d->d_name)) < 0) {
file_oomem(ms,
strlen(fn) + strlen(d->d_name) + 2);
errs++;
@@ -364,7 +368,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
continue;
}
if (files >= maxfiles) {
@@ -803,7 +799,6 @@
@@ -803,20 +799,19 @@
if ((filearr = CAST(char **,
realloc(filearr, mlen))) == NULL) {
file_oomem(ms, mlen);
@@ -372,6 +376,21 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
closedir(dir);
errs++;
goto out;
}
}
- filearr[files++] = mfn;
+ filearr[files++] = estrndup(mfn, mflen);
}
closedir(dir);
qsort(filearr, files, sizeof(*filearr), cmpstrp);
for (i = 0; i < files; i++) {
load_1(ms, action, filearr[i], &errs, &marray,
&marraycount);
- free(filearr[i]);
+ efree(filearr[i]);
}
free(filearr);
} else
@@ -882,12 +877,7 @@
for (i = 0; i < marraycount; i++)
mentrycount += marray[i].cont_count;
@@ -386,18 +405,31 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
mentrycount = 0;
for (i = 0; i < marraycount; i++) {
@@ -897,8 +887,8 @@
@@ -896,9 +886,14 @@
mentrycount += marray[i].cont_count;
}
out:
for (i = 0; i < marraycount; i++)
- for (i = 0; i < marraycount; i++)
- free(marray[i].mp);
- free(marray);
+ efree(marray[i].mp);
+ efree(marray);
+ for (i = 0; i < marraycount; i++) {
+ if (marray[i].mp) {
+ efree(marray[i].mp);
+ }
+ }
+ if (marray) {
+ efree(marray);
+ }
if (errs) {
*magicp = NULL;
*nmagicp = 0;
@@ -1178,11 +1168,7 @@
@@ -1175,14 +1170,13 @@
return -1;
}
me = &(*mentryp)[*nmentryp - 1];
+ if (me->mp == NULL) {
+ return -1;
+ }
if (me->cont_count == me->max_count) {
struct magic *nm;
size_t cnt = me->max_count + ALLOC_CHUNK;
@@ -410,7 +442,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
me->mp = m = nm;
me->max_count = CAST(uint32_t, cnt);
}
@@ -1194,23 +1180,13 @@
@@ -1194,23 +1188,13 @@
struct magic_entry *mp;
maxmagic += ALLOC_INCR;
@@ -437,7 +469,18 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
me->mp = m;
me->max_count = ALLOC_CHUNK;
} else
@@ -1361,7 +1337,7 @@
@@ -1353,6 +1337,10 @@
if (m->type == FILE_INVALID) {
if (ms->flags & MAGIC_CHECK)
file_magwarn(ms, "type `%s' invalid", l);
+ if (me->mp) {
+ efree(me->mp);
+ me->mp = NULL;
+ }
return -1;
}
@@ -1361,7 +1349,7 @@
m->mask_op = 0;
if (*l == '~') {
@@ -446,7 +489,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
m->mask_op |= FILE_OPINVERSE;
else if (ms->flags & MAGIC_CHECK)
file_magwarn(ms, "'~' invalid for string types");
@@ -1370,7 +1346,7 @@
@@ -1370,7 +1358,7 @@
m->str_range = 0;
m->str_flags = m->type == FILE_PSTRING ? PSTRING_1_LE : 0;
if ((op = get_op(*l)) != -1) {
@@ -455,7 +498,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
uint64_t val;
++l;
m->mask_op |= op;
@@ -1558,11 +1534,6 @@
@@ -1558,11 +1546,6 @@
if (check_format(ms, m) == -1)
return -1;
}
@@ -467,7 +510,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
m->mimetype[0] = '\0'; /* initialise MIME type to none */
if (m->cont_level == 0)
++(*nmentryp); /* make room for next */
@@ -2195,56 +2166,68 @@
@@ -2195,56 +2178,69 @@
/*
* handle a compiled file.
@@ -542,6 +585,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
+ mm = emalloc((size_t)st.sb.st_size);
+ if (php_stream_read(stream, mm, (size_t)st.sb.st_size) != (size_t)st.sb.st_size) {
file_badread(ms);
+ ret = 1;
goto error1;
}
-#define RET 1
@@ -559,7 +603,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
ptr = (uint32_t *)(void *)*magicp;
if (*ptr != MAGICNO) {
if (swap4(*ptr) != MAGICNO) {
@@ -2259,35 +2242,55 @@
@@ -2259,35 +2255,55 @@
else
version = ptr[1];
if (version != VERSIONNO) {
@@ -631,7 +675,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
return -1;
}
@@ -2301,42 +2304,49 @@
@@ -2301,42 +2317,49 @@
apprentice_compile(struct magic_set *ms, struct magic **magicp,
uint32_t *nmagicp, const char *fn)
{
@@ -639,10 +683,10 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
char *dbname;
int rv = -1;
+ php_stream *stream;
+
+ TSRMLS_FETCH();
- dbname = mkdbname(ms, fn, 1);
+ TSRMLS_FETCH();
+
+ dbname = mkdbname(ms, fn, 0);
if (dbname == NULL)
@@ -692,7 +736,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
return rv;
}
@@ -2349,6 +2359,7 @@
@@ -2349,6 +2372,7 @@
{
const char *p, *q;
char *buf;
@@ -700,7 +744,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
if (strip) {
if ((p = strrchr(fn, '/')) != NULL)
@@ -2370,14 +2381,14 @@
@@ -2370,14 +2394,14 @@
q++;
/* Compatibility with old code that looked in .mime */
if (ms->flags & MAGIC_MIME) {
@@ -719,7 +763,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
/* Compatibility with old code that looked in .mime */
if (strstr(p, ".mime") != NULL)
@@ -2467,7 +2478,7 @@
@@ -2467,7 +2491,7 @@
m->offset = swap4((uint32_t)m->offset);
m->in_offset = swap4((uint32_t)m->in_offset);
m->lineno = swap4((uint32_t)m->lineno);
@@ -728,9 +772,9 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
m->str_range = swap4(m->str_range);
m->str_flags = swap4(m->str_flags);
}
diff -u libmagic.orig/ascmagic.c libmagic/ascmagic.c
--- libmagic.orig/ascmagic.c 2012-03-28 12:00:34.017709605 +0200
+++ libmagic/ascmagic.c 2012-03-28 01:53:04.287303117 +0200
diff -u libmagic.origin/ascmagic.c libmagic/ascmagic.c
--- libmagic.origin/ascmagic.c 2012-07-15 18:17:24.762087659 +0800
+++ libmagic/ascmagic.c 2012-07-15 18:20:42.730087520 +0800
@@ -139,10 +139,8 @@
/* malloc size is a conservative overestimate; could be
improved, or at least realloced after conversion. */
@@ -754,10 +798,9 @@ diff -u libmagic.orig/ascmagic.c libmagic/ascmagic.c
return rv;
}
Only in libmagic.orig: asprintf.c
diff -u libmagic.orig/cdf.c libmagic/cdf.c
--- libmagic.orig/cdf.c 2012-03-28 12:00:34.012709598 +0200
+++ libmagic/cdf.c 2012-03-28 01:53:04.299331601 +0200
diff -u libmagic.origin/cdf.c libmagic/cdf.c
--- libmagic.origin/cdf.c 2012-07-15 18:17:24.822087659 +0800
+++ libmagic/cdf.c 2012-07-15 18:20:42.730087520 +0800
@@ -43,7 +43,17 @@
#include <err.h>
#endif
@@ -776,6 +819,19 @@ diff -u libmagic.orig/cdf.c libmagic/cdf.c
#include <string.h>
#include <time.h>
#include <ctype.h>
@@ -296,10 +306,10 @@
if (info->i_fd == -1)
return -1;
- if (lseek(info->i_fd, off, SEEK_SET) == (off_t)-1)
+ if (FINFO_LSEEK_FUNC(info->i_fd, off, SEEK_SET) == (off_t)-1)
return -1;
- if (read(info->i_fd, buf, len) != (ssize_t)len)
+ if (FINFO_READ_FUNC(info->i_fd, buf, len) != (ssize_t)len)
return -1;
return (ssize_t)len;
@@ -1135,7 +1145,7 @@
cdf_directory_t *d;
char name[__arraycount(d->d_name)];
@@ -806,9 +862,9 @@ diff -u libmagic.orig/cdf.c libmagic/cdf.c
cdf_print_elapsed_time(buf, sizeof(buf), tp);
(void)fprintf(stderr, "timestamp %s\n", buf);
} else {
diff -u libmagic.orig/cdf.h libmagic/cdf.h
--- libmagic.orig/cdf.h 2012-03-28 12:00:34.017709605 +0200
+++ libmagic/cdf.h 2012-03-28 01:53:04.299331601 +0200
diff -u libmagic.origin/cdf.h libmagic/cdf.h
--- libmagic.origin/cdf.h 2012-07-15 18:17:25.046087660 +0800
+++ libmagic/cdf.h 2012-07-15 18:20:42.730087520 +0800
@@ -35,7 +35,7 @@
#ifndef _H_CDF_
#define _H_CDF_
@@ -844,9 +900,9 @@ diff -u libmagic.orig/cdf.h libmagic/cdf.h
int cdf_read_header(const cdf_info_t *, cdf_header_t *);
void cdf_swap_header(cdf_header_t *);
void cdf_unpack_header(cdf_header_t *, char *);
diff -u libmagic.orig/cdf_time.c libmagic/cdf_time.c
--- libmagic.orig/cdf_time.c 2012-03-28 12:00:34.017709605 +0200
+++ libmagic/cdf_time.c 2012-03-28 01:53:04.299331601 +0200
diff -u libmagic.origin/cdf_time.c libmagic/cdf_time.c
--- libmagic.origin/cdf_time.c 2012-07-15 18:17:24.734087660 +0800
+++ libmagic/cdf_time.c 2012-07-15 18:20:42.734087519 +0800
@@ -96,7 +96,7 @@
}
@@ -903,9 +959,9 @@ diff -u libmagic.orig/cdf_time.c libmagic/cdf_time.c
static const cdf_timestamp_t tst = 0x01A5E403C2D59C00ULL;
static const char *ref = "Sat Apr 23 01:30:00 1977";
char *p, *q;
diff -u libmagic.orig/compress.c libmagic/compress.c
--- libmagic.orig/compress.c 2012-03-28 12:00:34.012709598 +0200
+++ libmagic/compress.c 2012-03-28 01:53:04.299331601 +0200
diff -u libmagic.origin/compress.c libmagic/compress.c
--- libmagic.origin/compress.c 2012-07-15 18:17:24.730087657 +0800
+++ libmagic/compress.c 2012-07-15 18:20:42.734087519 +0800
@@ -32,6 +32,7 @@
* uncompress(method, old, n, newch) - uncompress old into new,
* using method, return sizeof new
@@ -990,7 +1046,23 @@ diff -u libmagic.orig/compress.c libmagic/compress.c
for (cnt = 0;; cnt++) {
fd_set check;
struct timeval tout = {0, 100 * 1000};
@@ -301,7 +307,8 @@
@@ -218,7 +224,7 @@
nocheck:
do
- switch ((rv = read(fd, buf, n))) {
+ switch ((rv = FINFO_READ_FUNC(fd, buf, n))) {
case -1:
if (errno == EINTR)
continue;
@@ -295,13 +301,14 @@
return -1;
}
(void)close(tfd);
- if (lseek(fd, (off_t)0, SEEK_SET) == (off_t)-1) {
+ if (FINFO_LSEEK_FUNC(fd, (off_t)0, SEEK_SET) == (off_t)-1) {
file_badseek(ms);
return -1;
}
return fd;
}
@@ -1011,6 +1083,15 @@ diff -u libmagic.orig/compress.c libmagic/compress.c
/* XXX: const castaway, via strchr */
z.next_in = (Bytef *)strchr((const char *)old + data_start,
@@ -400,7 +405,7 @@
(void) close(0);
if (fd != -1) {
(void) dup(fd);
- (void) lseek(0, (off_t)0, SEEK_SET);
+ (void) FINFO_LSEEK_FUNC(0, (off_t)0, SEEK_SET);
} else {
(void) dup(fdin[0]);
(void) close(fdin[0]);
@@ -465,20 +470,14 @@
fdin[1] = -1;
}
@@ -1041,11 +1122,9 @@ diff -u libmagic.orig/compress.c libmagic/compress.c
}
-#endif
+#endif /* if PHP_FILEINFO_UNCOMPRESS */
Only in libmagic: config.h
Only in libmagic.orig: file.c
diff -u libmagic.orig/file.h libmagic/file.h
--- libmagic.orig/file.h 2012-03-28 12:00:34.017709605 +0200
+++ libmagic/file.h 2012-03-28 01:53:04.304322598 +0200
diff -u libmagic.origin/file.h libmagic/file.h
--- libmagic.origin/file.h 2012-07-15 18:17:25.046087660 +0800
+++ libmagic/file.h 2012-07-15 18:20:42.734087519 +0800
@@ -33,11 +33,9 @@
#ifndef __file_h__
#define __file_h__
@@ -1165,7 +1244,13 @@ diff -u libmagic.orig/file.h libmagic/file.h
protected void file_showstr(FILE *, const char *, size_t);
protected size_t file_mbswidth(const char *);
protected const char *file_getbuffer(struct magic_set *);
@@ -443,11 +439,8 @@
@@ -438,16 +434,14 @@
size_t *);
protected size_t file_pstring_length_size(const struct magic *);
protected size_t file_pstring_get_length(const struct magic *, const char *);
+protected size_t file_printedlen(const struct magic_set *ms);
#ifdef __EMX__
protected int file_os2_apptype(struct magic_set *, const char *, const void *,
size_t);
#endif /* __EMX__ */
@@ -1177,7 +1262,7 @@ diff -u libmagic.orig/file.h libmagic/file.h
#ifndef HAVE_STRERROR
extern int sys_nerr;
@@ -460,17 +453,10 @@
@@ -460,17 +454,10 @@
#define strtoul(a, b, c) strtol(a, b, c)
#endif
@@ -1197,10 +1282,22 @@ diff -u libmagic.orig/file.h libmagic/file.h
size_t strlcat(char *dst, const char *src, size_t siz);
#endif
#ifndef HAVE_GETLINE
Only in libmagic.orig: file_opts.h
diff -u libmagic.orig/fsmagic.c libmagic/fsmagic.c
--- libmagic.orig/fsmagic.c 2012-03-28 12:00:34.012709598 +0200
+++ libmagic/fsmagic.c 2012-03-28 01:53:04.304322598 +0200
@@ -500,4 +487,12 @@
#define FILE_RCSID(id)
#endif
+#ifdef PHP_WIN32
+#define FINFO_LSEEK_FUNC _lseek
+#define FINFO_READ_FUNC _read
+#else
+#define FINFO_LSEEK_FUNC lseek
+#define FINFO_READ_FUNC read
+#endif
+
#endif /* __file_h__ */
diff -u libmagic.origin/fsmagic.c libmagic/fsmagic.c
--- libmagic.origin/fsmagic.c 2012-07-15 18:17:24.730087657 +0800
+++ libmagic/fsmagic.c 2012-07-15 18:20:42.734087519 +0800
@@ -59,27 +59,21 @@
# define minor(dev) ((dev) & 0xff)
#endif
@@ -1411,10 +1508,10 @@ diff -u libmagic.orig/fsmagic.c libmagic/fsmagic.c
-#else
- if (file_printf(ms, "block special") == -1)
- return -1;
-#endif
#endif
- }
- return 1;
#endif
-#endif
- /* TODO add code to handle V7 MUX and Blit MUX files */
+
#ifdef S_IFIFO
@@ -1523,9 +1620,9 @@ diff -u libmagic.orig/fsmagic.c libmagic/fsmagic.c
}
/*
diff -u libmagic.orig/funcs.c libmagic/funcs.c
--- libmagic.orig/funcs.c 2012-03-28 12:00:34.012709598 +0200
+++ libmagic/funcs.c 2012-03-28 11:49:56.089607390 +0200
diff -u libmagic.origin/funcs.c libmagic/funcs.c
--- libmagic.origin/funcs.c 2012-07-15 18:17:25.046087660 +0800
+++ libmagic/funcs.c 2012-07-15 18:20:42.734087519 +0800
@@ -41,52 +41,42 @@
#if defined(HAVE_WCTYPE_H)
#include <wctype.h>
@@ -1763,7 +1860,7 @@ diff -u libmagic.orig/funcs.c libmagic/funcs.c
+ pcre_cache_entry *pce;
+ char *res;
+ zval *repl;
+ int res_len, rep_cnt;
+ int res_len, rep_cnt = 0;
+ TSRMLS_FETCH();
+
+ MAKE_STD_ZVAL(patt);
@@ -1819,12 +1916,10 @@ diff -u libmagic.orig/funcs.c libmagic/funcs.c
+ return rep_cnt;
}
+
Only in libmagic.orig: getline.c
Only in libmagic.orig: getopt_long.c
Only in libmagic: LICENSE
diff -u libmagic.orig/magic.c libmagic/magic.c
--- libmagic.orig/magic.c 2012-03-28 12:00:34.012709598 +0200
+++ libmagic/magic.c 2012-03-28 11:42:50.404750579 +0200
Common subdirectories: libmagic.origin/.libs and libmagic/.libs
diff -u libmagic.origin/magic.c libmagic/magic.c
--- libmagic.origin/magic.c 2012-07-15 18:17:25.046087660 +0800
+++ libmagic/magic.c 2012-07-15 18:20:42.734087519 +0800
@@ -25,11 +25,6 @@
* SUCH DAMAGE.
*/
@@ -2200,9 +2295,9 @@ diff -u libmagic.orig/magic.c libmagic/magic.c
public const char *
magic_error(struct magic_set *ms)
diff -u libmagic.orig/magic.h libmagic/magic.h
--- libmagic.orig/magic.h 2012-03-28 12:00:34.017709605 +0200
+++ libmagic/magic.h 2012-03-28 01:53:04.304322598 +0200
diff -u libmagic.origin/magic.h libmagic/magic.h
--- libmagic.origin/magic.h 2012-07-15 18:17:24.734087660 +0800
+++ libmagic/magic.h 2012-07-15 18:20:42.734087519 +0800
@@ -85,6 +85,7 @@
const char *magic_getpath(const char *, int);
@@ -2219,25 +2314,20 @@ diff -u libmagic.orig/magic.h libmagic/magic.h
int magic_list(magic_t, const char *);
int magic_errno(magic_t);
Only in libmagic.orig: Makefile.am
Only in libmagic.orig: Makefile.in
Only in libmagic.orig: mygetopt.h
Only in libmagic: names.h
Only in libmagic: patchlevel.h
diff -u libmagic.orig/print.c libmagic/print.c
--- libmagic.orig/print.c 2012-03-28 12:00:34.017709605 +0200
+++ libmagic/print.c 2012-03-28 01:53:04.304322598 +0200
diff -u libmagic.origin/print.c libmagic/print.c
--- libmagic.origin/print.c 2012-07-15 18:21:02.846087501 +0800
+++ libmagic/print.c 2012-07-15 18:20:42.734087519 +0800
@@ -29,6 +29,9 @@
* print.c - debugging printout routines
*/
+#define _GNU_SOURCE
+#include "php.h"
+#include "main/snprintf.h"
+
#include "file.h"
#ifndef lint
@@ -45,174 +48,21 @@
@@ -46,174 +49,21 @@
#define SZOF(a) (sizeof(a) / sizeof(a[0]))
@@ -2419,9 +2509,206 @@ diff -u libmagic.orig/print.c libmagic/print.c
}
protected const char *
diff -u libmagic.orig/readcdf.c libmagic/readcdf.c
--- libmagic.orig/readcdf.c 2012-03-28 12:00:34.012709598 +0200
+++ libmagic/readcdf.c 2012-03-28 01:53:04.304322598 +0200
diff -u libmagic.origin/print.c.rej libmagic/print.c.rej
--- libmagic.origin/print.c.rej 2012-07-15 18:17:24.762087659 +0800
+++ libmagic/print.c.rej 2012-07-15 18:20:27.186087168 +0800
@@ -1,12 +1,184 @@
---- libmagic/print.c 2012-05-29 14:34:03.770376387 +0200
-+++ libmagic.orig/print.c 2012-05-29 14:40:41.710960045 +0200
-@@ -29,9 +29,6 @@
- * print.c - debugging printout routines
- */
+--- libmagic.orig/print.c 2012-05-29 14:40:41.710960045 +0200
++++ libmagic/print.c 2012-05-29 14:34:03.770376387 +0200
+@@ -48,174 +51,21 @@
--#include "php.h"
--#include "main/snprintf.h"
+ #define SZOF(a) (sizeof(a) / sizeof(a[0]))
+
+-#ifndef COMPILE_ONLY
+-protected void
+-file_mdump(struct magic *m)
+-{
+- private const char optyp[] = { FILE_OPS };
+-
+- (void) fprintf(stderr, "%u: %.*s %u", m->lineno,
+- (m->cont_level & 7) + 1, ">>>>>>>>", m->offset);
+-
+- if (m->flag & INDIR) {
+- (void) fprintf(stderr, "(%s,",
+- /* Note: type is unsigned */
+- (m->in_type < file_nnames) ?
+- file_names[m->in_type] : "*bad*");
+- if (m->in_op & FILE_OPINVERSE)
+- (void) fputc('~', stderr);
+- (void) fprintf(stderr, "%c%u),",
+- ((size_t)(m->in_op & FILE_OPS_MASK) <
+- SZOF(optyp)) ?
+- optyp[m->in_op & FILE_OPS_MASK] : '?',
+- m->in_offset);
+- }
+- (void) fprintf(stderr, " %s%s", (m->flag & UNSIGNED) ? "u" : "",
+- /* Note: type is unsigned */
+- (m->type < file_nnames) ? file_names[m->type] : "*bad*");
+- if (m->mask_op & FILE_OPINVERSE)
+- (void) fputc('~', stderr);
+-
+- if (IS_STRING(m->type)) {
+- if (m->str_flags) {
+- (void) fputc('/', stderr);
+- if (m->str_flags & STRING_COMPACT_WHITESPACE)
+- (void) fputc(CHAR_COMPACT_WHITESPACE, stderr);
+- if (m->str_flags & STRING_COMPACT_OPTIONAL_WHITESPACE)
+- (void) fputc(CHAR_COMPACT_OPTIONAL_WHITESPACE,
+- stderr);
+- if (m->str_flags & STRING_IGNORE_LOWERCASE)
+- (void) fputc(CHAR_IGNORE_LOWERCASE, stderr);
+- if (m->str_flags & STRING_IGNORE_UPPERCASE)
+- (void) fputc(CHAR_IGNORE_UPPERCASE, stderr);
+- if (m->str_flags & REGEX_OFFSET_START)
+- (void) fputc(CHAR_REGEX_OFFSET_START, stderr);
+- if (m->str_flags & STRING_TEXTTEST)
+- (void) fputc(CHAR_TEXTTEST, stderr);
+- if (m->str_flags & STRING_BINTEST)
+- (void) fputc(CHAR_BINTEST, stderr);
+- if (m->str_flags & PSTRING_1_BE)
+- (void) fputc(CHAR_PSTRING_1_BE, stderr);
+- if (m->str_flags & PSTRING_2_BE)
+- (void) fputc(CHAR_PSTRING_2_BE, stderr);
+- if (m->str_flags & PSTRING_2_LE)
+- (void) fputc(CHAR_PSTRING_2_LE, stderr);
+- if (m->str_flags & PSTRING_4_BE)
+- (void) fputc(CHAR_PSTRING_4_BE, stderr);
+- if (m->str_flags & PSTRING_4_LE)
+- (void) fputc(CHAR_PSTRING_4_LE, stderr);
+- if (m->str_flags & PSTRING_LENGTH_INCLUDES_ITSELF)
+- (void) fputc(
+- CHAR_PSTRING_LENGTH_INCLUDES_ITSELF,
+- stderr);
+- }
+- if (m->str_range)
+- (void) fprintf(stderr, "/%u", m->str_range);
+- }
+- else {
+- if ((size_t)(m->mask_op & FILE_OPS_MASK) < SZOF(optyp))
+- (void) fputc(optyp[m->mask_op & FILE_OPS_MASK], stderr);
+- else
+- (void) fputc('?', stderr);
+-
+- if (m->num_mask) {
+- (void) fprintf(stderr, "%.8llx",
+- (unsigned long long)m->num_mask);
+- }
+- }
+- (void) fprintf(stderr, ",%c", m->reln);
+-
+- if (m->reln != 'x') {
+- switch (m->type) {
+- case FILE_BYTE:
+- case FILE_SHORT:
+- case FILE_LONG:
+- case FILE_LESHORT:
+- case FILE_LELONG:
+- case FILE_MELONG:
+- case FILE_BESHORT:
+- case FILE_BELONG:
+- (void) fprintf(stderr, "%d", m->value.l);
+- break;
+- case FILE_BEQUAD:
+- case FILE_LEQUAD:
+- case FILE_QUAD:
+- (void) fprintf(stderr, "%" INT64_T_FORMAT "d",
+- (unsigned long long)m->value.q);
+- break;
+- case FILE_PSTRING:
+- case FILE_STRING:
+- case FILE_REGEX:
+- case FILE_BESTRING16:
+- case FILE_LESTRING16:
+- case FILE_SEARCH:
+- file_showstr(stderr, m->value.s, (size_t)m->vallen);
+- break;
+- case FILE_DATE:
+- case FILE_LEDATE:
+- case FILE_BEDATE:
+- case FILE_MEDATE:
+- (void)fprintf(stderr, "%s,",
+- file_fmttime(m->value.l, 1));
+- break;
+- case FILE_LDATE:
+- case FILE_LELDATE:
+- case FILE_BELDATE:
+- case FILE_MELDATE:
+- (void)fprintf(stderr, "%s,",
+- file_fmttime(m->value.l, 0));
+- break;
+- case FILE_QDATE:
+- case FILE_LEQDATE:
+- case FILE_BEQDATE:
+- (void)fprintf(stderr, "%s,",
+- file_fmttime((uint32_t)m->value.q, 1));
+- break;
+- case FILE_QLDATE:
+- case FILE_LEQLDATE:
+- case FILE_BEQLDATE:
+- (void)fprintf(stderr, "%s,",
+- file_fmttime((uint32_t)m->value.q, 0));
+- break;
+- case FILE_FLOAT:
+- case FILE_BEFLOAT:
+- case FILE_LEFLOAT:
+- (void) fprintf(stderr, "%G", m->value.f);
+- break;
+- case FILE_DOUBLE:
+- case FILE_BEDOUBLE:
+- case FILE_LEDOUBLE:
+- (void) fprintf(stderr, "%G", m->value.d);
+- break;
+- case FILE_DEFAULT:
+- /* XXX - do anything here? */
+- break;
+- default:
+- (void) fputs("*bad*", stderr);
+- break;
+- }
+- }
+- (void) fprintf(stderr, ",\"%s\"]\n", m->desc);
+-}
+-#endif
+-
+ /*VARARGS*/
+ protected void
+ file_magwarn(struct magic_set *ms, const char *f, ...)
+ {
+ va_list va;
++ char *expanded_format;
++ TSRMLS_FETCH();
+
+- /* cuz we use stdout for most, stderr here */
+- (void) fflush(stdout);
-
- #include "file.h"
+- if (ms->file)
+- (void) fprintf(stderr, "%s, %lu: ", ms->file,
+- (unsigned long)ms->line);
+- (void) fprintf(stderr, "Warning: ");
+ va_start(va, f);
+- (void) vfprintf(stderr, f, va);
++ vasprintf(&expanded_format, f, va);
+ va_end(va);
+- (void) fputc('\n', stderr);
++
++ php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Warning: %s", expanded_format);
++
++ free(expanded_format);
+ }
- #ifndef lint
+ protected const char *
diff -u libmagic.origin/readcdf.c libmagic/readcdf.c
--- libmagic.origin/readcdf.c 2012-07-15 18:17:24.734087660 +0800
+++ libmagic/readcdf.c 2012-07-15 18:20:42.734087519 +0800
@@ -30,7 +30,11 @@
#endif
@@ -2467,9 +2754,9 @@ diff -u libmagic.orig/readcdf.c libmagic/readcdf.c
c = cdf_ctime(&ts.tv_sec);
if ((ec = strchr(c, '\n')) != NULL)
*ec = '\0';
diff -u libmagic.orig/readelf.c libmagic/readelf.c
--- libmagic.orig/readelf.c 2012-03-28 12:00:34.017709605 +0200
+++ libmagic/readelf.c 2012-03-28 01:53:04.308322618 +0200
diff -u libmagic.origin/readelf.c libmagic/readelf.c
--- libmagic.origin/readelf.c 2012-07-15 18:17:25.046087660 +0800
+++ libmagic/readelf.c 2012-07-15 18:20:42.734087519 +0800
@@ -49,7 +49,7 @@
off_t, int *, int);
private int doshn(struct magic_set *, int, int, int, off_t, int, size_t,
@@ -2479,6 +2766,34 @@ diff -u libmagic.orig/readelf.c libmagic/readelf.c
int, size_t, int *);
#define ELF_ALIGN(a) ((((a) + align - 1) / align) * align)
@@ -309,11 +309,11 @@
* Loop through all the program headers.
*/
for ( ; num; num--) {
- if (lseek(fd, off, SEEK_SET) == (off_t)-1) {
+ if (FINFO_LSEEK_FUNC(fd, off, SEEK_SET) == (off_t)-1) {
file_badseek(ms);
return -1;
}
- if (read(fd, xph_addr, xph_sizeof) == -1) {
+ if (FINFO_READ_FUNC(fd, xph_addr, xph_sizeof) == -1) {
file_badread(ms);
return -1;
}
@@ -331,11 +331,11 @@
* This is a PT_NOTE section; loop through all the notes
* in the section.
*/
- if (lseek(fd, xph_offset, SEEK_SET) == (off_t)-1) {
+ if (FINFO_LSEEK_FUNC(fd, xph_offset, SEEK_SET) == (off_t)-1) {
file_badseek(ms);
return -1;
}
- bufsize = read(fd, nbuf,
+ bufsize = FINFO_READ_FUNC(fd, nbuf,
((xph_filesz < sizeof(nbuf)) ? xph_filesz : sizeof(nbuf)));
if (bufsize == -1) {
file_badread(ms);
@@ -357,7 +357,7 @@
#endif
@@ -2496,6 +2811,20 @@ diff -u libmagic.orig/readelf.c libmagic/readelf.c
(void)memcpy(xnh_addr, &nbuf[offset], xnh_sizeof);
offset += xnh_sizeof;
@@ -859,11 +858,11 @@
}
for ( ; num; num--) {
- if (lseek(fd, off, SEEK_SET) == (off_t)-1) {
+ if (FINFO_LSEEK_FUNC(fd, off, SEEK_SET) == (off_t)-1) {
file_badseek(ms);
return -1;
}
- if (read(fd, xsh_addr, xsh_sizeof) == -1) {
+ if (FINFO_READ_FUNC(fd, xsh_addr, xsh_sizeof) == -1) {
file_badread(ms);
return -1;
}
@@ -888,20 +887,16 @@
/* Things we can determine when we seek */
switch (xsh_type) {
@@ -2505,22 +2834,24 @@ diff -u libmagic.orig/readelf.c libmagic/readelf.c
- " for note");
- return -1;
- }
- if ((noff = lseek(fd, (off_t)xsh_offset, SEEK_SET)) ==
+ nbuf = emalloc((size_t)xsh_size);
if ((noff = lseek(fd, (off_t)xsh_offset, SEEK_SET)) ==
+ if ((noff = FINFO_LSEEK_FUNC(fd, (off_t)xsh_offset, SEEK_SET)) ==
(off_t)-1) {
file_badread(ms);
- free(nbuf);
+ efree(nbuf);
return -1;
}
if (read(fd, nbuf, (size_t)xsh_size) !=
- if (read(fd, nbuf, (size_t)xsh_size) !=
+ if (FINFO_READ_FUNC(fd, nbuf, (size_t)xsh_size) !=
(ssize_t)xsh_size) {
- free(nbuf);
+ efree(nbuf);
file_badread(ms);
return -1;
}
@@ -916,7 +911,7 @@
@@ -916,10 +911,10 @@
if (noff == 0)
break;
}
@@ -2528,10 +2859,61 @@ diff -u libmagic.orig/readelf.c libmagic/readelf.c
+ efree(nbuf);
break;
case SHT_SUNW_cap:
if (lseek(fd, (off_t)xsh_offset, SEEK_SET) ==
diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
--- libmagic.orig/softmagic.c 2012-03-28 12:00:34.012709598 +0200
+++ libmagic/softmagic.c 2012-03-28 01:53:04.308322618 +0200
- if (lseek(fd, (off_t)xsh_offset, SEEK_SET) ==
+ if (FINFO_LSEEK_FUNC(fd, (off_t)xsh_offset, SEEK_SET) ==
(off_t)-1) {
file_badseek(ms);
return -1;
@@ -932,7 +927,7 @@
MAX(sizeof cap32, sizeof cap64)];
if ((coff += xcap_sizeof) > (off_t)xsh_size)
break;
- if (read(fd, cbuf, (size_t)xcap_sizeof) !=
+ if (FINFO_READ_FUNC(fd, cbuf, (size_t)xcap_sizeof) !=
(ssize_t)xcap_sizeof) {
file_badread(ms);
return -1;
@@ -1051,12 +1046,12 @@
}
for ( ; num; num--) {
- if (lseek(fd, off, SEEK_SET) == (off_t)-1) {
+ if (FINFO_LSEEK_FUNC(fd, off, SEEK_SET) == (off_t)-1) {
file_badseek(ms);
return -1;
}
- if (read(fd, xph_addr, xph_sizeof) == -1) {
+ if (FINFO_READ_FUNC(fd, xph_addr, xph_sizeof) == -1) {
file_badread(ms);
return -1;
}
@@ -1095,11 +1090,11 @@
* This is a PT_NOTE section; loop through all the notes
* in the section.
*/
- if (lseek(fd, xph_offset, SEEK_SET) == (off_t)-1) {
+ if (FINFO_LSEEK_FUNC(fd, xph_offset, SEEK_SET) == (off_t)-1) {
file_badseek(ms);
return -1;
}
- bufsize = read(fd, nbuf, ((xph_filesz < sizeof(nbuf)) ?
+ bufsize = FINFO_READ_FUNC(fd, nbuf, ((xph_filesz < sizeof(nbuf)) ?
xph_filesz : sizeof(nbuf)));
if (bufsize == -1) {
file_badread(ms);
@@ -1161,7 +1156,7 @@
/*
* If we cannot seek, it must be a pipe, socket or fifo.
*/
- if((lseek(fd, (off_t)0, SEEK_SET) == (off_t)-1) && (errno == ESPIPE))
+ if((FINFO_LSEEK_FUNC(fd, (off_t)0, SEEK_SET) == (off_t)-1) && (errno == ESPIPE))
fd = file_pipe2file(ms, fd, buf, nbytes);
if (fstat(fd, &st) == -1) {
diff -u libmagic.origin/softmagic.c libmagic/softmagic.c
--- libmagic.origin/softmagic.c 2012-07-15 18:17:24.722087658 +0800
+++ libmagic/softmagic.c 2012-07-15 18:20:42.734087519 +0800
@@ -41,6 +41,11 @@
#include <stdlib.h>
#include <time.h>
@@ -2718,7 +3100,7 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
}
}
@@ -1669,6 +1642,65 @@
@@ -1669,6 +1642,42 @@
return file_strncmp(a, b, len, flags);
}
@@ -2734,29 +3116,6 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
+
+ for (i=0; i<Z_STRLEN_P(pattern); i++, j++) {
+ switch (Z_STRVAL_P(pattern)[i]) {
+ case '?':
+ t[j] = '.';
+ break;
+ case '*':
+ t[j++] = '.';
+ t[j] = '*';
+ break;
+ case '.':
+ t[j++] = '\\';
+ t[j] = '.';
+ break;
+ case '\\':
+ t[j++] = '\\';
+ t[j] = '\\';
+ break;
+ case '(':
+ t[j++] = '\\';
+ t[j] = '(';
+ break;
+ case ')':
+ t[j++] = '\\';
+ t[j] = ')';
+ break;
+ case '~':
+ t[j++] = '\\';
+ t[j] = '~';
@@ -2784,7 +3143,7 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
private int
magiccheck(struct magic_set *ms, struct magic *m)
{
@@ -1825,67 +1857,163 @@
@@ -1825,67 +1834,163 @@
break;
}
case FILE_REGEX: {
@@ -2795,23 +3154,7 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
- if (ms->search.s == NULL)
- return 0;
-
+ zval *pattern;
+ int options = 0;
+ pcre_cache_entry *pce;
+ TSRMLS_FETCH();
+
+ MAKE_STD_ZVAL(pattern);
+ ZVAL_STRINGL(pattern, (char *)m->value.s, m->vallen, 0);
+
+ options |= PCRE_MULTILINE;
+
+ if (m->str_flags & STRING_IGNORE_CASE) {
+ options |= PCRE_CASELESS;
+ }
+
+ convert_libmagic_pattern(pattern, options);
+
l = 0;
- l = 0;
- rc = regcomp(&rx, m->value.s,
- REG_EXTENDED|REG_NEWLINE|
- ((m->str_flags & STRING_IGNORE_CASE) ? REG_ICASE : 0));
@@ -2828,6 +3171,23 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
- size_t l = ms->search.s_len - 1;
- char c = ms->search.s[l];
- ((char *)(intptr_t)ms->search.s)[l] = '\0';
+ zval *pattern;
+ int options = 0;
+ pcre_cache_entry *pce;
+ TSRMLS_FETCH();
+
+ MAKE_STD_ZVAL(pattern);
+ ZVAL_STRINGL(pattern, (char *)m->value.s, m->vallen, 0);
+
+ options |= PCRE_MULTILINE;
+
+ if (m->str_flags & STRING_IGNORE_CASE) {
+ options |= PCRE_CASELESS;
+ }
+
+ convert_libmagic_pattern(pattern, options);
+
+ l = v = 0;
+#if (PHP_MAJOR_VERSION < 6)
+ if ((pce = pcre_get_compiled_regex_cache(Z_STRVAL_P(pattern), Z_STRLEN_P(pattern) TSRMLS_CC)) == NULL) {
#else
@@ -2999,6 +3359,3 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
default:
file_magerror(ms, "invalid type %d in magiccheck()", m->type);
return -1;
Only in libmagic.orig: strlcat.c
Only in libmagic.orig: strlcpy.c
Only in libmagic.orig: vasprintf.c
+20 -7
View File
@@ -753,7 +753,7 @@ private int
apprentice_load(struct magic_set *ms, struct magic **magicp, uint32_t *nmagicp,
const char *fn, int action)
{
int errs = 0;
int errs = 0, mflen = 0;
struct magic_entry *marray;
uint32_t marraycount, i, mentrycount = 0, starttest;
size_t files = 0, maxfiles = 0;
@@ -782,7 +782,7 @@ apprentice_load(struct magic_set *ms, struct magic **magicp, uint32_t *nmagicp,
goto out;
}
while ((d = readdir(dir)) != NULL) {
if (snprintf(mfn, sizeof(mfn), "%s/%s", fn, d->d_name) < 0) {
if ((mflen = snprintf(mfn, sizeof(mfn), "%s/%s", fn, d->d_name)) < 0) {
file_oomem(ms,
strlen(fn) + strlen(d->d_name) + 2);
errs++;
@@ -804,14 +804,14 @@ apprentice_load(struct magic_set *ms, struct magic **magicp, uint32_t *nmagicp,
goto out;
}
}
filearr[files++] = mfn;
filearr[files++] = estrndup(mfn, mflen);
}
closedir(dir);
qsort(filearr, files, sizeof(*filearr), cmpstrp);
for (i = 0; i < files; i++) {
load_1(ms, action, filearr[i], &errs, &marray,
&marraycount);
free(filearr[i]);
efree(filearr[i]);
}
free(filearr);
} else
@@ -886,9 +886,14 @@ apprentice_load(struct magic_set *ms, struct magic **magicp, uint32_t *nmagicp,
mentrycount += marray[i].cont_count;
}
out:
for (i = 0; i < marraycount; i++)
efree(marray[i].mp);
efree(marray);
for (i = 0; i < marraycount; i++) {
if (marray[i].mp) {
efree(marray[i].mp);
}
}
if (marray) {
efree(marray);
}
if (errs) {
*magicp = NULL;
*nmagicp = 0;
@@ -1165,6 +1170,9 @@ parse(struct magic_set *ms, struct magic_entry **mentryp, uint32_t *nmentryp,
return -1;
}
me = &(*mentryp)[*nmentryp - 1];
if (me->mp == NULL) {
return -1;
}
if (me->cont_count == me->max_count) {
struct magic *nm;
size_t cnt = me->max_count + ALLOC_CHUNK;
@@ -1329,6 +1337,10 @@ parse(struct magic_set *ms, struct magic_entry **mentryp, uint32_t *nmentryp,
if (m->type == FILE_INVALID) {
if (ms->flags & MAGIC_CHECK)
file_magwarn(ms, "type `%s' invalid", l);
if (me->mp) {
efree(me->mp);
me->mp = NULL;
}
return -1;
}
@@ -2219,6 +2231,7 @@ apprentice_map(struct magic_set *ms, struct magic **magicp, uint32_t *nmagicp,
mm = emalloc((size_t)st.sb.st_size);
if (php_stream_read(stream, mm, (size_t)st.sb.st_size) != (size_t)st.sb.st_size) {
file_badread(ms);
ret = 1;
goto error1;
}
ret = 1;
+2 -2
View File
@@ -306,10 +306,10 @@ cdf_read(const cdf_info_t *info, off_t off, void *buf, size_t len)
if (info->i_fd == -1)
return -1;
if (lseek(info->i_fd, off, SEEK_SET) == (off_t)-1)
if (FINFO_LSEEK_FUNC(info->i_fd, off, SEEK_SET) == (off_t)-1)
return -1;
if (read(info->i_fd, buf, len) != (ssize_t)len)
if (FINFO_READ_FUNC(info->i_fd, buf, len) != (ssize_t)len)
return -1;
return (ssize_t)len;
+3 -3
View File
@@ -224,7 +224,7 @@ sread(int fd, void *buf, size_t n, int canbepipe)
nocheck:
do
switch ((rv = read(fd, buf, n))) {
switch ((rv = FINFO_READ_FUNC(fd, buf, n))) {
case -1:
if (errno == EINTR)
continue;
@@ -301,7 +301,7 @@ file_pipe2file(struct magic_set *ms, int fd, const void *startbuf,
return -1;
}
(void)close(tfd);
if (lseek(fd, (off_t)0, SEEK_SET) == (off_t)-1) {
if (FINFO_LSEEK_FUNC(fd, (off_t)0, SEEK_SET) == (off_t)-1) {
file_badseek(ms);
return -1;
}
@@ -405,7 +405,7 @@ uncompressbuf(struct magic_set *ms, int fd, size_t method,
(void) close(0);
if (fd != -1) {
(void) dup(fd);
(void) lseek(0, (off_t)0, SEEK_SET);
(void) FINFO_LSEEK_FUNC(0, (off_t)0, SEEK_SET);
} else {
(void) dup(fdin[0]);
(void) close(fdin[0]);
+9
View File
@@ -434,6 +434,7 @@ protected int file_looks_utf8(const unsigned char *, size_t, unichar *,
size_t *);
protected size_t file_pstring_length_size(const struct magic *);
protected size_t file_pstring_get_length(const struct magic *, const char *);
protected size_t file_printedlen(const struct magic_set *ms);
#ifdef __EMX__
protected int file_os2_apptype(struct magic_set *, const char *, const void *,
size_t);
@@ -486,4 +487,12 @@ static const char *rcsid(const char *p) { \
#define FILE_RCSID(id)
#endif
#ifdef PHP_WIN32
#define FINFO_LSEEK_FUNC _lseek
#define FINFO_READ_FUNC _read
#else
#define FINFO_LSEEK_FUNC lseek
#define FINFO_READ_FUNC read
#endif
#endif /* __file_h__ */
+1 -1
View File
@@ -438,7 +438,7 @@ file_replace(struct magic_set *ms, const char *pat, const char *rep)
pcre_cache_entry *pce;
char *res;
zval *repl;
int res_len, rep_cnt;
int res_len, rep_cnt = 0;
TSRMLS_FETCH();
MAKE_STD_ZVAL(patt);
+15 -15
View File
@@ -309,11 +309,11 @@ dophn_core(struct magic_set *ms, int clazz, int swap, int fd, off_t off,
* Loop through all the program headers.
*/
for ( ; num; num--) {
if (lseek(fd, off, SEEK_SET) == (off_t)-1) {
if (FINFO_LSEEK_FUNC(fd, off, SEEK_SET) == (off_t)-1) {
file_badseek(ms);
return -1;
}
if (read(fd, xph_addr, xph_sizeof) == -1) {
if (FINFO_READ_FUNC(fd, xph_addr, xph_sizeof) == -1) {
file_badread(ms);
return -1;
}
@@ -331,11 +331,11 @@ dophn_core(struct magic_set *ms, int clazz, int swap, int fd, off_t off,
* This is a PT_NOTE section; loop through all the notes
* in the section.
*/
if (lseek(fd, xph_offset, SEEK_SET) == (off_t)-1) {
if (FINFO_LSEEK_FUNC(fd, xph_offset, SEEK_SET) == (off_t)-1) {
file_badseek(ms);
return -1;
}
bufsize = read(fd, nbuf,
bufsize = FINFO_READ_FUNC(fd, nbuf,
((xph_filesz < sizeof(nbuf)) ? xph_filesz : sizeof(nbuf)));
if (bufsize == -1) {
file_badread(ms);
@@ -858,11 +858,11 @@ doshn(struct magic_set *ms, int clazz, int swap, int fd, off_t off, int num,
}
for ( ; num; num--) {
if (lseek(fd, off, SEEK_SET) == (off_t)-1) {
if (FINFO_LSEEK_FUNC(fd, off, SEEK_SET) == (off_t)-1) {
file_badseek(ms);
return -1;
}
if (read(fd, xsh_addr, xsh_sizeof) == -1) {
if (FINFO_READ_FUNC(fd, xsh_addr, xsh_sizeof) == -1) {
file_badread(ms);
return -1;
}
@@ -888,13 +888,13 @@ doshn(struct magic_set *ms, int clazz, int swap, int fd, off_t off, int num,
switch (xsh_type) {
case SHT_NOTE:
nbuf = emalloc((size_t)xsh_size);
if ((noff = lseek(fd, (off_t)xsh_offset, SEEK_SET)) ==
if ((noff = FINFO_LSEEK_FUNC(fd, (off_t)xsh_offset, SEEK_SET)) ==
(off_t)-1) {
file_badread(ms);
efree(nbuf);
return -1;
}
if (read(fd, nbuf, (size_t)xsh_size) !=
if (FINFO_READ_FUNC(fd, nbuf, (size_t)xsh_size) !=
(ssize_t)xsh_size) {
efree(nbuf);
file_badread(ms);
@@ -914,7 +914,7 @@ doshn(struct magic_set *ms, int clazz, int swap, int fd, off_t off, int num,
efree(nbuf);
break;
case SHT_SUNW_cap:
if (lseek(fd, (off_t)xsh_offset, SEEK_SET) ==
if (FINFO_LSEEK_FUNC(fd, (off_t)xsh_offset, SEEK_SET) ==
(off_t)-1) {
file_badseek(ms);
return -1;
@@ -927,7 +927,7 @@ doshn(struct magic_set *ms, int clazz, int swap, int fd, off_t off, int num,
MAX(sizeof cap32, sizeof cap64)];
if ((coff += xcap_sizeof) > (off_t)xsh_size)
break;
if (read(fd, cbuf, (size_t)xcap_sizeof) !=
if (FINFO_READ_FUNC(fd, cbuf, (size_t)xcap_sizeof) !=
(ssize_t)xcap_sizeof) {
file_badread(ms);
return -1;
@@ -1046,12 +1046,12 @@ dophn_exec(struct magic_set *ms, int clazz, int swap, int fd, off_t off,
}
for ( ; num; num--) {
if (lseek(fd, off, SEEK_SET) == (off_t)-1) {
if (FINFO_LSEEK_FUNC(fd, off, SEEK_SET) == (off_t)-1) {
file_badseek(ms);
return -1;
}
if (read(fd, xph_addr, xph_sizeof) == -1) {
if (FINFO_READ_FUNC(fd, xph_addr, xph_sizeof) == -1) {
file_badread(ms);
return -1;
}
@@ -1090,11 +1090,11 @@ dophn_exec(struct magic_set *ms, int clazz, int swap, int fd, off_t off,
* This is a PT_NOTE section; loop through all the notes
* in the section.
*/
if (lseek(fd, xph_offset, SEEK_SET) == (off_t)-1) {
if (FINFO_LSEEK_FUNC(fd, xph_offset, SEEK_SET) == (off_t)-1) {
file_badseek(ms);
return -1;
}
bufsize = read(fd, nbuf, ((xph_filesz < sizeof(nbuf)) ?
bufsize = FINFO_READ_FUNC(fd, nbuf, ((xph_filesz < sizeof(nbuf)) ?
xph_filesz : sizeof(nbuf)));
if (bufsize == -1) {
file_badread(ms);
@@ -1156,7 +1156,7 @@ file_tryelf(struct magic_set *ms, int fd, const unsigned char *buf,
/*
* If we cannot seek, it must be a pipe, socket or fifo.
*/
if((lseek(fd, (off_t)0, SEEK_SET) == (off_t)-1) && (errno == ESPIPE))
if((FINFO_LSEEK_FUNC(fd, (off_t)0, SEEK_SET) == (off_t)-1) && (errno == ESPIPE))
fd = file_pipe2file(ms, fd, buf, nbytes);
if (fstat(fd, &st) == -1) {
+1 -24
View File
@@ -1654,29 +1654,6 @@ convert_libmagic_pattern(zval *pattern, int options)
for (i=0; i<Z_STRLEN_P(pattern); i++, j++) {
switch (Z_STRVAL_P(pattern)[i]) {
case '?':
t[j] = '.';
break;
case '*':
t[j++] = '.';
t[j] = '*';
break;
case '.':
t[j++] = '\\';
t[j] = '.';
break;
case '\\':
t[j++] = '\\';
t[j] = '\\';
break;
case '(':
t[j++] = '\\';
t[j] = '(';
break;
case ')':
t[j++] = '\\';
t[j] = ')';
break;
case '~':
t[j++] = '\\';
t[j] = '~';
@@ -1873,7 +1850,7 @@ magiccheck(struct magic_set *ms, struct magic *m)
convert_libmagic_pattern(pattern, options);
l = 0;
l = v = 0;
#if (PHP_MAJOR_VERSION < 6)
if ((pce = pcre_get_compiled_regex_cache(Z_STRVAL_P(pattern), Z_STRLEN_P(pattern) TSRMLS_CC)) == NULL) {
#else
+69
View File
@@ -0,0 +1,69 @@
--TEST--
Bug #61964 (finfo_open with directory cause invalid free)
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php
$magic_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'magic';
$ret = @finfo_open(FILEINFO_NONE, $magic_file . ".non-exits");
var_dump($ret);
$dir = __DIR__ . "/test-folder";
@mkdir($dir);
$magic_file_copy = $dir . "/magic.copy";
$magic_file_copy2 = $magic_file_copy . "2";
copy($magic_file, $magic_file_copy);
copy($magic_file, $magic_file_copy2);
$ret = finfo_open(FILEINFO_NONE, $dir);
var_dump($ret);
$ret = @finfo_open(FILEINFO_NONE, $dir);
var_dump($ret);
$ret = @finfo_open(FILEINFO_NONE, $dir. "/non-exits-dir");
var_dump($ret);
// write some test files to test folder
file_put_contents($dir . "/test1.txt", "string\n> Core\n> Me");
file_put_contents($dir . "/test2.txt", "a\nb\n");
@mkdir($dir . "/test-inner-folder");
finfo_open(FILEINFO_NONE, $dir);
echo "DONE: testing dir with files\n";
rmdir($dir . "/test-inner-folder");
unlink($dir . "/test1.txt");
unlink($dir . "/test2.txt");
unlink($magic_file_copy);
unlink($magic_file_copy2);
rmdir($dir);
?>
===DONE===
--EXPECTF--
bool(false)
resource(%d) of type (file_info)
resource(%d) of type (file_info)
bool(false)
Notice: finfo_open(): Warning: offset `string' invalid in %sbug61964.php on line %d
Notice: finfo_open(): Warning: offset ` Core' invalid in %sbug61964.php on line %d
Notice: finfo_open(): Warning: type `Core' invalid in %sbug61964.php on line %d
Notice: finfo_open(): Warning: offset `a' invalid in %sbug61964.php on line %d
Notice: finfo_open(): Warning: type `a' invalid in %sbug61964.php on line %d
Notice: finfo_open(): Warning: offset `b' invalid in %sbug61964.php on line %d
Notice: finfo_open(): Warning: type `b' invalid in %sbug61964.php on line %d
Warning: finfo_open(): Failed to load magic database at '%stest-folder'. in %sbug61964.php on line %d
DONE: testing dir with files
===DONE===
+3 -1
View File
@@ -18,9 +18,11 @@ ksort($results);
var_dump($results);
?>
--EXPECTF--
array(6) {
array(7) {
["%s/resources/dir.zip"]=>
string(15) "application/zip"
["%s/resources/test.awk"]=>
string(10) "text/plain"
["%s/resources/test.bmp"]=>
string(14) "image/x-ms-bmp"
["%s/resources/test.gif"]=>
@@ -0,0 +1,36 @@
--TEST--
Test finfo_file() function : regex rules
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc');
if (substr(PHP_OS, 0, 3) != 'WIN') {
die('skip.. only for Windows');
}
?>
--FILE--
<?php
/**
* Works with the unix file command:
* $ file -m magic resources/test.awk
* resources/test.awk: awk script, ASCII text
*/
$magicFile = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'magic';
$finfo = finfo_open( FILEINFO_MIME, $magicFile );
echo "*** Testing finfo_file() : regex rules ***\n";
// Calling finfo_file() with all possible arguments
$file = __DIR__ . '/resources/test.awk';
var_dump( finfo_file( $finfo, $file ) );
var_dump( finfo_file( $finfo, $file, FILEINFO_CONTINUE ) );
// Windows uses libfileinfo 1.0.5-dev
// this may be causing the slightly different output from the first
// finfo_file() call
?>
===DONE===
--EXPECTF--
*** Testing finfo_file() : regex rules ***
string(10) "text/plain"
string(22) "awk script, ASCII text"
===DONE===
+32
View File
@@ -0,0 +1,32 @@
--TEST--
Test finfo_file() function : regex rules
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc');
if (substr(PHP_OS, 0, 3) == 'WIN') {
die('skip.. only for Non Windows Systems');
}
?>
--FILE--
<?php
/**
* Works with the unix file command:
* $ file -m magic resources/test.awk
* resources/test.awk: awk script, ASCII text
*/
$magicFile = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'magic';
$finfo = finfo_open( FILEINFO_MIME, $magicFile );
echo "*** Testing finfo_file() : regex rules ***\n";
// Calling finfo_file() with all possible arguments
$file = __DIR__ . '/resources/test.awk';
var_dump( finfo_file( $finfo, $file ) );
var_dump( finfo_file( $finfo, $file, FILEINFO_CONTINUE ) );
?>
===DONE===
--EXPECTF--
*** Testing finfo_file() : regex rules ***
string(28) "text/plain; charset=us-ascii"
string(22) "awk script, ASCII text"
===DONE===
+9 -9
View File
@@ -19,23 +19,23 @@ bool(false)
resource(%d) of type (file_info)
resource(%d) of type (file_info)
Warning: finfo_open(%s/123): failed to open stream: No such file or directory in %s on line %d
Warning: finfo_open(%s123): failed to open stream: No such file or directory in %s on line %d
Warning: finfo_open(%s/123): failed to open stream: No such file or directory in %s on line %d
Warning: finfo_open(%s123): failed to open stream: No such file or directory in %s on line %d
Warning: finfo_open(): Failed to load magic database at '%s/123'. in %s on line %d
Warning: finfo_open(): Failed to load magic database at '%s123'. in %s on line %d
bool(false)
Warning: finfo_open(%s/1): failed to open stream: No such file or directory in %s on line %d
Warning: finfo_open(%s1): failed to open stream: No such file or directory in %s on line %d
Warning: finfo_open(%s/1): failed to open stream: No such file or directory in %s on line %d
Warning: finfo_open(%s1): failed to open stream: No such file or directory in %s on line %d
Warning: finfo_open(): Failed to load magic database at '%s/1'. in %s on line %d
Warning: finfo_open(): Failed to load magic database at '%s1'. in %s on line %d
bool(false)
Warning: finfo_open(/foo/bar/inexistent): failed to open stream: No such file or directory in %s on line %d
Warning: finfo_open(%sinexistent): failed to open stream: No such file or directory in %s on line %d
Warning: finfo_open(/foo/bar/inexistent): failed to open stream: No such file or directory in %s on line %d
Warning: finfo_open(%sinexistent): failed to open stream: No such file or directory in %s on line %d
Warning: finfo_open(): Failed to load magic database at '/foo/bar/inexistent'. in %s on line %d
Warning: finfo_open(): Failed to load magic database at '%sinexistent'. in %s on line %d
bool(false)
@@ -0,0 +1,53 @@
--TEST--
Test finfo_open() function : error functionality
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc');
if(substr(PHP_OS, 0, 3) != 'WIN' )
die("skip Not Valid for Linux");
?>
--FILE--
<?php
/* Prototype : resource finfo_open([int options [, string arg]])
* Description: Create a new fileinfo resource.
* Source code: ext/fileinfo/fileinfo.c
* Alias to functions:
*/
$magicFile = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'magic';
echo "*** Testing finfo_open() : error functionality ***\n";
// on 5_4, this line generates additional warning messages that 5_3 does not. functionally, it should be fine (should pass)
var_dump( finfo_open( FILEINFO_MIME, 'foobarfile' ) );
var_dump( finfo_open( array(), $magicFile ) );
var_dump( finfo_open( FILEINFO_MIME, $magicFile, 'extraArg' ) );
var_dump( finfo_open( PHP_INT_MAX - 1, $magicFile ) );
var_dump( finfo_open( 'foobar' ) );
var_dump( new finfo('foobar') );
?>
===DONE===
--EXPECTF--
*** Testing finfo_open() : error functionality ***
Warning: finfo_open(%sfoobarfile): failed to open stream: No such file or directory in %sfinfo_open_error-win32.php on line %d
Warning: finfo_open(%sfoobarfile): failed to open stream: No such file or directory in %sfinfo_open_error-win32.php on line %d
Warning: finfo_open(): Failed to load magic database at '%sfoobarfile'. in %sfinfo_open_error-win32.php on line %d
bool(false)
Warning: finfo_open() expects parameter 1 to be long, array given in %sfinfo_open_error-win32.php on line %d
bool(false)
Warning: finfo_open() expects at most 2 parameters, 3 given in %sfinfo_open_error-win32.php on line %d
bool(false)
resource(6) of type (file_info)
Warning: finfo_open() expects parameter 1 to be long, string given in %sfinfo_open_error-win32.php on line %d
bool(false)
Warning: finfo::finfo() expects parameter 1 to be long, string given in %sfinfo_open_error-win32.php on line %d
NULL
===DONE===
+7 -4
View File
@@ -1,7 +1,10 @@
--TEST--
Test finfo_open() function : error functionality
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
<?php require_once(dirname(__FILE__) . '/skipif.inc');
if(substr(PHP_OS, 0, 3) == 'WIN' )
die("skip Not Valid for Windows");
?>
--FILE--
<?php
/* Prototype : resource finfo_open([int options [, string arg]])
@@ -27,11 +30,11 @@ var_dump( new finfo('foobar') );
--EXPECTF--
*** Testing finfo_open() : error functionality ***
Warning: finfo_open(%s/foobarfile): failed to open stream: No such file or directory in %s on line %d
Warning: finfo_open(%sfoobarfile): failed to open stream: No such file or directory in %s on line %d
Warning: finfo_open(%s/foobarfile): failed to open stream: No such file or directory in %s on line %d
Warning: finfo_open(%sfoobarfile): failed to open stream: No such file or directory in %s on line %d
Warning: finfo_open(): Failed to load magic database at '%s/foobarfile'. in %s on line %d
Warning: finfo_open(): Failed to load magic database at '%sfoobarfile'. in %s on line %d
bool(false)
Warning: finfo_open() expects parameter 1 to be long, array given in %s on line %d
+1
View File
@@ -0,0 +1 @@
BEGIN { print "START" }
+7 -1
View File
@@ -1,7 +1,13 @@
--TEST--
Bug #52209 (INPUT_ENV returns NULL for set variables (CLI))
--SKIPIF--
<?php if (!extension_loaded("filter") || !empty($_ENV['PWD'])) die("skip"); ?>
<?php
/* This test makes no sense on windows as an empty variable
would never show up in the "set" list. Which means, it's
always undefined in PHP. */
if(substr(PHP_OS, 0, 3) == "WIN") die("skip Not for Windows");
if (!extension_loaded("filter") || !empty($_ENV['PWD'])) die("skip");
?>
--INI--
variables_order=GPCSE
--FILE--
+16 -4
View File
@@ -10,10 +10,22 @@ Bug #48555 (ImageFTBBox() differs from previous versions for texts with new line
$cwd = dirname(__FILE__);
$font = "$cwd/Tuffy.ttf";
$box = ImageFTBBox(14, 0, $font, "Text without line-break");
echo 'Top without line-break: ' . $box[7] . "\n";
//echo 'Top without line-break: ' . $box[7] . "\n";
$without_line_break = $box[7];
$box = ImageFTBBox(14, 0, $font, "Text with\nline-break\none more");
echo 'Top with line-break: ' . $box[7] . "\n";
//echo 'Top with line-break: ' . $box[7] . "\n";
$with_line_break = $box[7];
var_dump($without_line_break);
var_dump($with_line_break);
if ($with_line_break==$without_line_break) {
echo "with line break == without line break".PHP_EOL;
} else {
echo "with line break != without line break".PHP_EOL;
}
?>
--EXPECTF--
Top without line-break: -14
Top with line-break: -14
int(-%d)
int(-%d)
with line break == without line break
+90
View File
@@ -0,0 +1,90 @@
--TEST--
gmp_gcdext() basic tests
--SKIPIF--
<?php if (!extension_loaded("gmp")) print "skip";
if(substr(PHP_OS, 0, 3) != 'WIN' ) {
die('skip windows only test');
}
?>
--FILE--
<?php
$n = gmp_init("34293864345");
$n1 = gmp_init("23434293864345");
$a = array(
array(123,45),
array(4341,9734),
array(23487,333),
array(-234234,-123123),
array(-100,-2234),
array(345,"34587345"),
array(345,"0"),
array("345556456",345873),
array("34545345556456","323432445873"),
array($n, $n1),
);
foreach ($a as $val) {
$r = gmp_gcdext($val[0],$val[1]);
var_dump(gmp_strval($r['g']));
var_dump(gmp_strval($r['s']));
var_dump(gmp_strval($r['t']));
}
var_dump(gmp_gcdext($val[0],array()));
var_dump(gmp_gcdext(array(),array()));
var_dump(gmp_gcdext(array(),array(),1));
var_dump(gmp_gcdext(array()));
var_dump(gmp_gcdext());
echo "Done\n";
?>
--EXPECTF--
string(1) "3"
string(2) "41"
string(4) "-112"
string(1) "1"
string(4) "-805"
string(3) "359"
string(1) "3"
string(2) "32"
string(5) "-2257"
string(4) "3003"
string(3) "-10"
string(2) "19"
string(1) "2"
string(2) "67"
string(2) "-3"
string(2) "15"
string(7) "-601519"
string(1) "6"
string(3) "345"
string(1) "1"
string(1) "0"
string(1) "1"
string(5) "84319"
string(9) "-84241831"
string(1) "1"
string(12) "167180205823"
string(15) "-17856272782919"
string(3) "195"
string(15) "-23387298979862"
string(11) "34225091793"
Warning: gmp_gcdext(): Unable to convert variable to GMP - wrong type in %s on line %d
bool(false)
Warning: gmp_gcdext(): Unable to convert variable to GMP - wrong type in %s on line %d
bool(false)
Warning: gmp_gcdext() expects exactly 2 parameters, 3 given in %s on line %d
NULL
Warning: gmp_gcdext() expects exactly 2 parameters, 1 given in %s on line %d
NULL
Warning: gmp_gcdext() expects exactly 2 parameters, 0 given in %s on line %d
NULL
Done
+5 -1
View File
@@ -1,7 +1,11 @@
--TEST--
gmp_gcdext() basic tests
--SKIPIF--
<?php if (!extension_loaded("gmp")) print "skip"; ?>
<?php if (!extension_loaded("gmp")) print "skip";
if (substr(PHP_OS, 0, 3) == 'WIN') {
die('skip.. only for Non Windows Systems');
}
?>
--FILE--
<?php
+45
View File
@@ -0,0 +1,45 @@
--TEST--
gmp_nextprime()
--SKIPIF--
<?php if (!extension_loaded("gmp")) print "skip";
if(substr(PHP_OS, 0, 3) != 'WIN' ) {
die('skip windows only test');
}
?>
--FILE--
<?php
$n = gmp_nextprime(-1);
var_dump(gmp_strval($n));
$n = gmp_nextprime(0);
var_dump(gmp_strval($n));
$n = gmp_nextprime(-1000);
var_dump(gmp_strval($n));
$n = gmp_nextprime(1000);
var_dump(gmp_strval($n));
$n = gmp_nextprime(100000);
var_dump(gmp_strval($n));
$n = gmp_nextprime(array());
var_dump(gmp_strval($n));
$n = gmp_nextprime("");
var_dump(gmp_strval($n));
$n = gmp_nextprime(new stdclass());
var_dump(gmp_strval($n));
echo "Done\n";
?>
--EXPECTF--
string(1) "2"
string(1) "2"
string(4) "-997"
string(4) "1009"
string(6) "100003"
Warning: gmp_nextprime(): Unable to convert variable to GMP - wrong type in %s on line %d
string(1) "0"
string(1) "0"
Warning: gmp_nextprime(): Unable to convert variable to GMP - wrong type in %s on line %d
string(1) "0"
Done
Loaded 100 of 679 files, more files were not shown because too many files have changed in this diff. Show more