Commit graph

1427 commits

Author SHA1 Message Date
Anatol Belski
3c0bd0014d Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #75574 putenv does not work properly if parameter contains non-ASCII unicode character
2017-11-27 18:50:05 +01:00
Anatol Belski
2b7d283cc5 Fixed bug #75574 putenv does not work properly if parameter contains non-ASCII unicode character 2017-11-27 18:49:02 +01:00
Sara Golemon
7ca5a7d84e
Add net_get_interfaces() 2017-11-27 10:17:55 -05:00
Dmitry Stogov
ccc12b82da Avoid unnecessary reference-counting on strings. 2017-11-16 17:09:32 +03:00
Xinchen Hui
a8a17a72b0 RC manipulation cleanup 2017-11-01 10:25:10 +08:00
Dmitry Stogov
fcc08ce19f Prevent reference-counting on persistent zvals (internal constants, default properties and constants of internal classes).
New macro ZVAL_COPY_OR_DUP() is used perform duplication, if necessary.
This should eliminate related race-coditions in ZTS build and prevent reference-counting bugs after unclean shutdown.
2017-10-30 23:13:10 +03:00
Dmitry Stogov
61ef91bf0d Revert "Allow internal functions to return values by reference (this was disabled in implementation of DO_ICALL, but enabled in DO_FCALL)."
This reverts commit da781a5ac2.
2017-10-17 13:25:19 +03:00
Dmitry Stogov
da781a5ac2 Allow internal functions to return values by reference (this was disabled in implementation of DO_ICALL, but enabled in DO_FCALL).
However, don't require internal functions returning by reference to return a reference.
Mark unserialize() as returning by reference and remove unwrap_reference hack, to allow proper returning of self referenced arrays using a reference.
Currently unserialize() is the only internal function that may return a reference.
2017-10-17 11:50:34 +03:00
Dmitry Stogov
ef5ea48741 Always use IS_CONSTANT_AST (IS_CONSTANT is removed). 2017-10-10 10:11:05 +03:00
Kalle Sommer Nielsen
d3bc8beb4f Removed support for BeOS, development for BeOS was supported 17 years ago.
This patch however does not drop support for the BeOS compatible variant, Haiku, see Github PR #2697 which is currently a WiP

I intentionally left out some fragments for BeOS in the build system for that seems to be bundles
2017-08-29 22:03:56 +02:00
Kalle Sommer Nielsen
4fbff82c10 Kill compiler warnings in ext/standard 2017-08-24 01:36:14 +02:00
Anatol Belski
b06caa0e5f remove casts 2017-07-30 18:23:34 +02:00
Anatol Belski
0d1eeeb68d move zend_ato*() to size_t and remove casts 2017-07-28 14:59:31 +02:00
Nikita Popov
035a27cbc6 Only compute callback name in error cases
Mostly the callback name is only used to report an error. Try to
avoid calculating it if no error occurred.
2017-06-25 18:45:59 +02:00
Dmitry Stogov
9c2a1f52a5 Avoid useless dereferences and separations during paramter passing. 2017-06-19 12:55:59 +03:00
Remi Collet
66a018ccb4 Merge branch 'PHP-7.1'
* PHP-7.1:
  NEWS
  NEWS
  Fixes bug #74708 reflection signatures for random_bytes+random_int
2017-06-13 08:15:33 +02:00
Remi Collet
3aa80c482c Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  NEWS
  Fixes bug #74708 reflection signatures for random_bytes+random_int
2017-06-13 08:14:57 +02:00
Tyson Andre
81b2533a68 Fixes bug #74708 reflection signatures for random_bytes+random_int
They have 1 and 2 required parameters, respectively
See https://secure.php.net/manual/en/function.random-int.php
2017-06-13 08:11:25 +02:00
Dmitry Stogov
a08723d3d3 Use interned empty and "one char" strings. 2017-05-18 17:59:59 +03:00
Sebastian Bergmann
6035ebd4a6 Merge branch 'PHP-7.1' 2017-04-11 08:29:14 +02:00
Sebastian Bergmann
25c941807b Merge branch 'PHP-7.0' into PHP-7.1 2017-04-11 08:28:55 +02:00
Sebastian Bergmann
7cdf520319 Fix bug #74409 2017-04-11 08:27:17 +02:00
Nikita Popov
e3b2b05229 Merge branch 'PHP-7.1' 2017-03-27 19:02:50 +02:00
x-xiang
e9e860a05b Don't retain mt_rand() seeds across requests
In particular, this prevents manual seeding of mt_rand() to leak
across requests.
2017-03-27 19:02:39 +02:00
Nikita Popov
8015daeddb Merge branch 'PHP-7.1' 2017-03-16 12:57:43 +01:00
Nikita Popov
63e59c75a5 Merge branch 'PHP-7.0' into PHP-7.1 2017-03-16 12:57:36 +01:00
Adam Saponara
98f4ce9363 Return FALSE if error_log fails to write all bytes 2017-03-16 12:56:36 +01:00
Xinchen Hui
b717c7ffb0 Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed bug #74148 (ReflectionFunction incorrectly reports the number of arguments)
2017-02-23 11:02:48 +08:00
Xinchen Hui
48fcc5ddc2 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #74148 (ReflectionFunction incorrectly reports the number of arguments)
2017-02-23 11:02:37 +08:00
Xinchen Hui
1d4eead995 Fixed bug #74148 (ReflectionFunction incorrectly reports the number of arguments) 2017-02-23 11:02:23 +08:00
Joe Watkins
4e3a4c119d
Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed bug #73994 incorrect arginfo for unpack
2017-01-26 06:58:53 +00:00
Joe Watkins
76a7470160
Fixed bug #73994 incorrect arginfo for unpack 2017-01-26 06:58:08 +00:00
Joe Watkins
5b23f5d73a
Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed #72974 imap is undefined service on AIX
2017-01-09 05:15:48 +00:00
Joe Watkins
c39f71ba9f
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed #72974 imap is undefined service on AIX
2017-01-09 05:15:34 +00:00
Joe Watkins
b8215c0817
Fixed #72974 imap is undefined service on AIX 2017-01-09 05:15:21 +00:00
Sammy Kaye Powers
dac6c639bb Update copyright headers to 2017 2017-01-04 11:23:42 -06:00
Sammy Kaye Powers
478f119ab9 Update copyright headers to 2017 2017-01-04 11:14:55 -06:00
Sammy Kaye Powers
9e29f841ce Update copyright headers to 2017 2017-01-02 09:30:12 -06:00
Sara Golemon
5c919ee30b Use new param API in standard/basic_functions 2016-12-30 16:13:14 -08:00
Dmitry Stogov
72616c5ede Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed arginfo
2016-12-19 11:13:21 +03:00
Dmitry Stogov
6ea44908fb Fixed arginfo 2016-12-19 11:13:02 +03:00
Anatol Belski
b204b3abd1 further normalizations, uint vs uint32_t
fix merge mistake

yet one more replacement run
2016-11-26 17:29:01 +01:00
Dmitry Stogov
628cde2fae Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed memory leaks in parse_ini_file()
2016-11-18 16:19:00 +03:00
Dmitry Stogov
d769a020df Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed memory leaks in parse_ini_file()
2016-11-18 16:18:22 +03:00
Dmitry Stogov
97b65cc9c2 Fixed memory leaks in parse_ini_file() 2016-11-18 16:17:52 +03:00
Kalle Sommer Nielsen
2104bea5d7 Remove Netware support
If this does not break the Unix system somehow, I'll be amazed. This should get most of it out, apologies for any errors this may cause on non-Windows ends which I cannot test atm.
2016-11-12 11:20:01 +01:00
Michele Locati
33301d5bae Add VT100 support for Windows
Fix function names prefix

Use Unicode version of GetFinalPathNameByHandle

Use EG(windows_version_info) instead of RtlGetVersion

Use the specified handle_id instead of STD_OUTPUT_HANDLE

Switch from stream name to stream resource

Allow running tests capturing only stdout and/or stderr

Add tests for stream_vt100_support function

Export Win32 console functions

Fix x64 build

Use zend_long instead of long long, use GetConsole instead of GetFinalPathNameByHandleW to check if a handle is a valid console stream

Always use zend_long on any platform

Use _get_osfhandle to determine the standard handle

Accept stream names

Raise warnings in case of invalid stream parameter

Return true if disabling VT100 support on a not-console/redirected stream or on old Windows versions

Remove php_win32_console_os_supports_vt100

Differentiate stdin vs stdout/stderr

Simplify setting flag

Allow avoid piping STDIN

Let stream_vt100_support accept only resources

Fix run-tests

Revert console flags in case of failure

Simplify logic of stream_vt100_support when setting the flag

Return true if succeeded, false otherwise

Drop support for STDIN

More comprehensive tests for stream_vt100_support

Remove old tests

Fix name of included file and use absolute paths

Enable ENABLE_VIRTUAL_TERMINAL_PROCESSING on Windows by default

Remove tests for stream_vt100_support

Split stream_vt100_support into stream_isatty+sapi_windows_vt100_support

Add tests for stream_isatty

Add tests for sapi_windows_vt100_support

Return null from stream_isatty is neither Windows nor Posix

Fallback to S_ISCHR if neither Windows nor Posix

Avoid defining argc since it's only used once

Better comment about php_win32_console_fileno_is_console

Use events instead of cNumberOfEvents

Do not restore previous console mode

We need to restore previous console mode on failing SetConsole calls only for STDIN

Don't configure STDOUT/STDERR on Windows with PHP_CLI_WIN32_NO_CONSOLE
2016-10-28 19:23:00 +02:00
Andrea Faulds
d8f27b2be8 Merge branch 'DedupNANINF' 2016-10-26 16:46:36 +01:00
Andrea Faulds
1a512eed44 Move utf8_encode and utf8_decode to ext/standard 2016-10-17 15:39:02 +01:00
Nikita Popov
02ba9d71ab Unwrap reference returns in cufa etc 2016-09-30 22:10:01 +02:00