Commit Graph

9648 Commits

Author SHA1 Message Date
Christoph M. Becker
8da8dc04b6 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  updated NEWS
  Fixed bug #69768 (escapeshell*() doesn't cater to !)
  bump API version to 6.8
2015-06-24 00:23:39 +02:00
Christoph M. Becker
a621781fdb Fixed bug #69768 (escapeshell*() doesn't cater to !)
When delayed variable substitution is enabled (can be set in the
Registry, for instance), !ENV! works similar to %ENV%, and so ! should
be escaped like %.
2015-06-24 00:15:55 +02:00
Rasmus Lerdorf
28d7bb97a1 Fix more proto comments 2015-06-23 17:46:20 -04:00
Dmitry Stogov
6bf3ecf69a Revert "Simplify php_implode(). Fill the resulting string in direct order."
The patch slightly improved performance of string imploding, but reduced speed of integers imploding.

This reverts commit 36d39b7044.
2015-06-23 16:46:41 +03:00
Dmitry Stogov
36d39b7044 Simplify php_implode(). Fill the resulting string in direct order. 2015-06-23 12:57:36 +03:00
Nikita Popov
8a83aed458 Drop duplicate object-to-type notices
We already generate a recoverable fatal for these earlier, no need
to throw an additional notice.
2015-06-22 16:25:32 +02:00
Dmitry Stogov
b97df475df Fixed crash in Zend/tests/bug69891.phpt on x86 (32-bit).
compare_function() now has to be compatible with binary_op_type (use fastcall convention).
Introduced new zval_compare_function() to be used as zval comparison callback instead of compare_function().
2015-06-22 12:53:52 +03:00
Nikita Popov
257054e81d Fix bug #62922
Off by one error...
2015-06-20 14:39:55 +02:00
Xinchen Hui
f75308eda1 Micro optimization 2015-06-20 10:52:58 +08:00
Xinchen Hui
dc72b70b7e Remove unused var 2015-06-20 10:37:53 +08:00
Xinchen Hui
a7635e82f6 Improve strtr (Fixed a bug which the lenth check doesn't work at all) 2015-06-19 22:59:31 +08:00
Yasuo Ohgaki
d263ecd864 Move strlen() check to php_mail_detect_multiple_crlf() 2015-06-19 15:17:56 +09:00
Yasuo Ohgaki
dacea3f6fb Fixed Bug #69874 : Can't set empty additional_headers for mail() 2015-06-19 12:19:12 +09:00
Xinchen Hui
29087f00f6 Merge branch 'PHP-5.6' 2015-06-19 09:36:27 +08:00
Xinchen Hui
bca005c8d9 Merge branch 'PHP-5.5' into PHP-5.6 2015-06-19 09:35:52 +08:00
Xinchen Hui
6a8db93115 Merge branch 'patch-3' of https://github.com/s0ph1e/php-src into PHP-5.5 2015-06-19 09:35:28 +08:00
Anatol Belski
cdde1be056 Merge branch 'PHP-5.6'
* PHP-5.6:
  update NEWS
  updated NEWS
  fixes bug #69835: phpinfo() does not report many Windows SKUs
2015-06-18 22:05:07 +02:00
Anatol Belski
657f93e7b9 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  updated NEWS
  fixes bug #69835: phpinfo() does not report many Windows SKUs
2015-06-18 22:03:28 +02:00
Christian Wenz
a85156db7d fixes bug #69835: phpinfo() does not report many Windows SKUs 2015-06-18 22:01:20 +02:00
Sophia Nepochataya
1edb2e9a10 Remove excess variable in mail.c (5.5 branch) 2015-06-18 20:06:08 +03:00
Xinchen Hui
20f3416682 Fixed bug #69872 (uninitialised value in strtr with array) 2015-06-18 22:28:29 +08:00
Anatol Belski
269acaa363 Merge branch 'pull-request/1284'
* pull-request/1284:
  Rename interface macros
  Fix typo in UPGRADING
  Move definition of Throwable to zend_exceptions.h/c
  Check for zend_ce_throwable instead
  Fix some missed tests
  Add Throwable tests
  Fix previous exception type check
  Updated UPGRADING with RFC link
  Changed AssertionException to AssertionError
  Update exception error messages
  Throwable method signatures.
  Update exception names in tests after formatting changes.
  Merge exception formatting changes.
  Make zend_get_exception_base static.
  Fix a few missed tests.
  Fix handler double copy.
  Updated tests to reflect exception class changes.
  Remodel exceptions based on Throwable interface
2015-06-17 21:55:03 +02:00
Dmitry Stogov
a0b3fd7803 Improved variable name validation 2015-06-17 12:05:58 +03:00
Nikita Popov
fb346c8f93 Support references in convert_to_*
conver_to_* functions now accept REFERENCE values, which will be
unwrapped before performing the usual conversion. This is consistent
with convert_scalar_to_number and matches the expected behavior in
a couple random use-sites I checked.

Also includes a couple fixes/cleanups elsewhere and two tests for
cases that previously didn't work (though the reference issue existed
all over the place).
2015-06-16 19:55:33 +02:00
Nikita Popov
183c00ddb6 Fix references handling in convert_scalar_to_number 2015-06-16 18:02:45 +02:00
Aaron Piotrowski
482985ca38 Changed AssertionException to AssertionError 2015-06-14 23:52:39 -05:00
Aaron Piotrowski
110e0a5a2c Merge branch 'master' into throwable-interface
# Conflicts:
#	Zend/zend_language_scanner.c
#	Zend/zend_language_scanner.l
#	ext/simplexml/tests/SimpleXMLElement_xpath.phpt
2015-06-14 18:53:11 -05:00
Dmitry Stogov
1c754f0b71 Get rid of more ZVAL_ZVAL() macros 2015-06-12 13:33:14 +03:00
Dmitry Stogov
8e10e8f921 Avoid zval duplication in ZVAL_ZVAL() macro (it was necessary only in few places).
Switch from ZVAL_ZVAL() to simpler macros where possible (it makes sense to review remaining places)
2015-06-12 12:33:23 +03:00
Nikita Popov
5d3cf577aa Make convert_to_* safe with rc>1
This only involves switching zval_dtor to zval_ptr_dtor for arrays
and making the convert_to_object for arrays a bit more generic.

All the other changes outside zend_operators.c just make use of
this new ability (use COPY instead of DUP).

What's still missing: Proper references handling. I've seen many
convert_to* calls that will break when a reference is used.

Also fixes bug #69788.
2015-06-11 23:23:57 +02:00
Anatol Belski
0228ccf246 Merge branch 'PHP-5.6'
* PHP-5.6:
  added test for bug #69646
2015-06-11 12:08:09 +02:00
Anatol Belski
b19790ab34 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  added test for bug #69646
2015-06-11 12:07:32 +02:00
Anatol Belski
e711325ca6 added test for bug #69646 2015-06-11 12:06:59 +02:00
Anatol Belski
23e8956386 Merge branch 'PHP-5.6'
* PHP-5.6:
  updated NEWS
  updated NEWS
  Fix #69781: phpinfo() reports Professional Editions of Windows 7/8/8.1/10 as "Business"
  Revert "Fix #69781: phpinfo() reports Professional Editions of Windows 7/8/8.1/10 as "Business""
  Fix #69781: phpinfo() reports Professional Editions of Windows 7/8/8.1/10 as "Business"
2015-06-10 11:26:49 +02:00
Anatol Belski
64df05d5b1 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  updated NEWS
  Fix #69781: phpinfo() reports Professional Editions of Windows 7/8/8.1/10 as "Business"
  Revert "Fix #69781: phpinfo() reports Professional Editions of Windows 7/8/8.1/10 as "Business""
  Fix #69781: phpinfo() reports Professional Editions of Windows 7/8/8.1/10 as "Business"
2015-06-10 11:25:21 +02:00
Christian Wenz
0c8136654d Fix #69781: phpinfo() reports Professional Editions of Windows 7/8/8.1/10 as "Business" 2015-06-10 11:22:30 +02:00
Christian Wenz
82e5260104 Revert "Fix #69781: phpinfo() reports Professional Editions of Windows 7/8/8.1/10 as "Business""
This reverts commit 4a05c81b85.
2015-06-10 11:22:29 +02:00
Christian Wenz
741b949a6f Fix #69781: phpinfo() reports Professional Editions of Windows 7/8/8.1/10 as "Business" 2015-06-10 11:22:28 +02:00
Stanislav Malyshev
d4407e1cb9 Merge branch 'PHP-5.6'
* PHP-5.6:
  add NEWS
  Fixed bug #68776
  fix test
  update NEWS
  Fix bug #69646	OS command injection vulnerability in escapeshellarg
  Fix #69719 - more checks for nulls in paths
  fix test description
  Fixed Buf #68812 Unchecked return value.

Conflicts:
	ext/dom/document.c
	ext/gd/gd.c
	ext/standard/exec.c
2015-06-09 21:39:59 -07:00
Stanislav Malyshev
563462fbf8 Fixed bug #69646 (OS command injection vulnerability in escapeshellarg) 2015-06-09 21:37:17 -07:00
Stanislav Malyshev
c095af584c Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fixed bug #68776
2015-06-09 21:34:06 -07:00
Stanislav Malyshev
e10af61862 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed bug #68776
2015-06-09 21:33:38 -07:00
Yasuo Ohgaki
9d168b863e Fixed bug #68776 2015-06-09 21:32:54 -07:00
Stanislav Malyshev
8b1919ed73 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fix bug #69646	OS command injection vulnerability in escapeshellarg
  Fix #69719 - more checks for nulls in paths
  fix test description
  Fixed Buf #68812 Unchecked return value.
2015-06-09 15:32:27 -07:00
Stanislav Malyshev
4e2fb47092 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix bug #69646	OS command injection vulnerability in escapeshellarg
  Fix #69719 - more checks for nulls in paths
  fix test description
  Fixed Buf #68812 Unchecked return value.

Conflicts:
	ext/dom/document.c
	ext/gd/gd.c
2015-06-09 15:31:27 -07:00
Stanislav Malyshev
8036758491 Fix bug #69646 OS command injection vulnerability in escapeshellarg 2015-06-09 10:52:38 -07:00
Anatol Belski
021effbe97 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  backport the basic code to properly recognize win 8.1 and 10
  backport the manifest changes for makefile
  backport the manifest changes in js
  add default manifest
  add test
2015-05-31 19:32:21 +02:00
Anatol Belski
1e9522021a backport the basic code to properly recognize win 8.1 and 10 2015-05-31 19:01:58 +02:00
Anatol Belski
05351f9ccb add test 2015-05-31 18:13:33 +02:00
Anatol Belski
9237a0de1c run credits script 2015-05-30 09:43:10 +02:00
Antony Dovgal
110a146b88 add tests for proc_open() and pipes 2015-05-29 17:35:12 +03:00
Antony Dovgal
ad60549958 remove hardcoded limit on number of pipes in proc_open() 2015-05-29 15:30:06 +03:00
Anatol Belski
6f46fa376b add test 2015-05-29 11:48:00 +02:00
Xinchen Hui
d844e96464 Merge branch 'master' of git.php.net:php-src 2015-05-29 13:51:02 +08:00
Xinchen Hui
ed8d1ba7dd Fixed bug #69723 (Passing parameters by reference and array_column) 2015-05-29 13:50:44 +08:00
Anatol Belski
e4ca770f95 using correct manifest, GetVersionEx can recognise versions 2015-05-28 23:23:27 +02:00
Remi Collet
0437aa2abf Merge branch 'PHP-5.6'
* PHP-5.6:
  Relax a little this test, because random is not reliable
2015-05-28 10:37:52 +02:00
Remi Collet
7611d1c41b Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Relax a little this test, because random is not reliable
2015-05-28 10:37:39 +02:00
Remi Collet
09b92a3a54 Relax a little this test, because random is not reliable
Usual values are 3500-3950, but >4000 can happen.
2015-05-28 10:35:19 +02:00
Kalle Sommer Nielsen
0a7f792b6f [16:45] <@bjori> salathe: http://git.php.net/?p=php-src.git;a=commit;h=d4324a5e4ba3ae668cf1a3c2426241fd6ac385a5 && http://git.php.net/?p=php-src.git;a=commit;h=9de8833bea9fe39556066e7ff77b136697652d02
[16:45] <@bjori> you should probably move philip to authors, and yourself out of the author list
2015-05-27 16:50:01 +02:00
Peter Cowburn
d47815d5ee updated manual editor 2015-05-27 11:20:21 +01:00
Bob Weinand
1a7bf16dd6 Ran wrong tests, fixed bug in impl; simplified 2015-05-26 01:43:56 +02:00
Bob Weinand
bb552908a0 Speed up implod()'ing between 5% and 30% (by time)
Significantly speed up implode()'ing on integers now...
Previously I accidentally committed the first part of the patch in 69b54ba926
2015-05-26 01:12:23 +02:00
Bob Weinand
69b54ba926 Also unreserve T_CLASS 2015-05-25 22:58:30 +02:00
Anatol Belski
d713fcc14d cleanup redundant S_IFDIR declaration 2015-05-25 18:03:24 +02:00
Anatol Belski
5d1731b2fb move some stat declarations into zend_virtual_cwd.h
more cleanup to go
2015-05-25 18:03:21 +02:00
Nikita Popov
f3dde29394 Fixes for x32 ABI
I'm assuming that we want to have 64bit zend_longs on x32 here.

This fixes two typos in __x86_64__ macros and adds sign-extension
when assigning STREAM_COPY_ALL to zend_long.
2015-05-23 21:18:33 +02:00
Anthony Ferrara
ed4052f1d5 Fixed bug #69686 password_verify reports back error on PHP7 will null string.
The deprecation of DES salts created a warning when trying to verify them with password_hash. This bug fix adds a quiet mode to php_crypt() which is used by password_verify.
2015-05-21 17:12:51 -04:00
Anatol Belski
fc94fb3e5b Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  updated NEWS
  added missing GLOB_BRACE support check
  added SKIPIF section to test to make sure that GLOB_BRACE is supported
  fix #69628: complex GLOB_BRACE fails on Windows
  added PHPT to check for bug #69628
2015-05-21 09:47:30 +02:00
Christoph M. Becker
96629091a6 added missing GLOB_BRACE support check 2015-05-21 09:44:18 +02:00
Christoph M. Becker
6895ae4553 added SKIPIF section to test to make sure that GLOB_BRACE is supported 2015-05-21 09:44:17 +02:00
Christoph M. Becker
90aee01c85 added PHPT to check for bug #69628 2015-05-21 09:44:14 +02:00
Anatol Belski
eef762d576 Merge branch 'pull-request/1278' 2015-05-21 08:52:41 +02:00
Anatol Belski
360d8fd712 Merge branch 'PHP-5.6'
* PHP-5.6:
  fix handling VAR vs VAR= in putenv
2015-05-21 08:22:30 +02:00
Anatol Belski
ad4d022bdf Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  fix handling VAR vs VAR= in putenv
2015-05-21 08:21:53 +02:00
Anatol Belski
75286ece1a fix handling VAR vs VAR= in putenv
using _putenv_s eliminates behavior diff in TS/NTS
2015-05-21 08:19:54 +02:00
Christoph M. Becker
99d7852d18 added missing GLOB_BRACE support check 2015-05-20 20:23:21 +02:00
Christoph M. Becker
b654aa4606 added SKIPIF section to test to make sure that GLOB_BRACE is supported 2015-05-20 18:39:07 +02:00
Anatol Belski
8dbd39d96e fixed test 2015-05-20 15:56:16 +02:00
Kalle Sommer Nielsen
e634f07f1e Merge branch 'master' of https://git.php.net/push/php-src 2015-05-20 15:50:00 +02:00
Kalle Sommer Nielsen
22fc3baa7a Windows support for getrusage()
* See getrusage.c/h for implementation details and limitations
* Tests passes and have had their SKIPIF updated
* psapi.lib is now linked to by default
2015-05-20 15:45:37 +02:00
Dmitry Patsura
b6f8b4e949 [Math] ceil, floor added FAST_ZPP parameters pass 2015-05-19 21:19:13 +08:00
Anatol Belski
0f766a28cb fix mbrlen prototype availability 2015-05-18 22:37:19 +02:00
Aaron Piotrowski
e97d5fab35 Update exception names in tests after formatting changes. 2015-05-17 17:31:43 -05:00
Aaron Piotrowski
fb7206e452 Merge branch 'master' into throwable-interface 2015-05-17 16:15:35 -05:00
Nikita Popov
440481fb3e Display TypeExceptions like normal exceptions
We currently don't show the argument at which the error actually
occured in the trace - should probably either add it or don't
display args on incomplete frames altogether, otherwise this'll
probably be confusing.
2015-05-17 19:54:12 +02:00
Aaron Piotrowski
0eba6f597a Merge branch 'master' into throwable-interface 2015-05-17 12:12:02 -05:00
Nikita Popov
3ae995f03c Tweak uncaught exception message display
This implements a reduced variant of #1226 with just the following
change:

-Fatal error: Uncaught exception 'EngineException' with message 'Call to private method foo::bar() from context ''' in %s:%d
+Fatal error: Uncaught EngineException: Call to private method foo::bar() from context '' in %s:%d

The '' wrapper around messages is very weird if the exception
message itself contains ''. Futhermore having the message wrapped
in '' doesn't work for the "and defined" suffix of
TypeExceptions.
2015-05-17 18:47:06 +02:00
Aaron Piotrowski
64b167d201 Updated tests to reflect exception class changes. 2015-05-16 16:49:14 -05:00
Stanislav Malyshev
2660fb96aa Merge branch 'pull-request/1277'
* pull-request/1277:
  fix typos
2015-05-16 14:20:41 -07:00
Nikita Popov
c9f27ee422 Display EngineExceptions like ordinary exceptions
TypeException stays as-is for now because it uses messages that are
incompatible with the way exception messages are displayed.

closure_038.phpt and a few others now show that we're generating
too many exceptions for compound operations on undefined properties
-- this needs to be fixed in a followup.
2015-05-15 23:40:32 +02:00
Dmitry Stogov
a464045726 Improve strtr() 2015-05-15 04:03:30 +03:00
Christoph M. Becker
43315f32e7 added PHPT to check for bug #69628 2015-05-13 22:37:33 +02:00
olshevskiy87
8bdec7a248 fix typos
Signed-off-by: olshevskiy87 <olshevskiy87@bk.ru>
2015-05-13 22:28:35 +04:00
Dmitry Stogov
f69b30eaae Partial revert of 6a819bba40. 2015-05-13 09:43:05 +03:00
Stanislav Malyshev
5a1bef8eef Merge branch 'PHP-5.6'
* PHP-5.6:
  fix format
  update NEWS
  Add test for bug #69522
  Update tests
  Fix bug #69522 - do not allow int overflow
  Forgot test file
  Fix bug #69403 and other int overflows
  Fixed bug #69418 - more s->p fixes for filenames
  Fixed bug #69364 - use smart_str to assemble strings
  Fix bug #69453 - don't try to cut empty string
  Fix bug #69545 - avoid overflow when reading list

Conflicts:
	Zend/zend_alloc.c
	Zend/zend_operators.c
	ext/ftp/ftp.c
	ext/pcntl/pcntl.c
	ext/standard/basic_functions.c
	ext/standard/dir.c
	ext/standard/file.c
	ext/standard/pack.c
	ext/standard/string.c
	main/rfc1867.c
2015-05-12 15:00:24 -07:00
Stanislav Malyshev
587ddf6ddc Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  fix format
  update NEWS
  Add test for bug #69522
  Update tests
  Fix bug #69522 - do not allow int overflow
  Forgot test file
  Fix bug #69403 and other int overflows
  Fixed bug #69418 - more s->p fixes for filenames
  Fixed bug #69364 - use smart_str to assemble strings
  Fix bug #69453 - don't try to cut empty string
  Fix bug #69545 - avoid overflow when reading list

Conflicts:
	ext/standard/pack.c
2015-05-12 14:26:06 -07:00
Stanislav Malyshev
c08f9c2c78 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fix format
  update NEWS
  Add test for bug #69522
  Update tests
  Fix bug #69522 - do not allow int overflow
  Forgot test file
  Fix bug #69403 and other int overflows
  Fixed bug #69418 - more s->p fixes for filenames
  Fixed bug #69364 - use smart_str to assemble strings
  Fix bug #69453 - don't try to cut empty string
  Fix bug #69545 - avoid overflow when reading list

Conflicts:
	ext/pcntl/pcntl.c
	ext/standard/basic_functions.c
	ext/standard/pack.c
	ext/standard/tests/dir/opendir_variation1-win32.phpt
2015-05-12 14:24:15 -07:00
Julien Pauli
6a819bba40 Fix for #66048 2015-05-12 16:15:01 +02:00
Christoph M. Becker
613f747579 prohibit empty cookie names for setcookie() 2015-05-12 10:47:35 +02:00