1
0
mirror of https://github.com/php/php-src.git synced 2026-04-27 10:16:41 +02:00
Commit Graph

102022 Commits

Author SHA1 Message Date
Sara Golemon 131fd3baa0 Remove unnecesary shadow of new_val 2017-03-14 11:29:22 -07:00
Sara Golemon c74bc87c74 Minor optimizations to array_keys()/array_values()
array_values():
When the input is an empty array or a packed array with no gaps,
return the original array.

array_keys():
When the input is an empty array, return the original array.
When the input is a packed array with no holes
(and no search key specified), populate the return with
a simple range(0, count($input) - 1)
2017-03-14 11:23:02 -07:00
Nikita Popov 16ae9f82e8 Fix SKIPIF conditions 2017-03-14 12:06:58 +01:00
Nikita Popov edcabf6d07 Drop unnecessary allocator return value checks 2017-03-13 22:07:15 +01:00
Anatol Belski e8c85a854b Merge branch 'PHP-7.1'
* PHP-7.1:
  update binary sdk tools version for appveyor
2017-03-13 12:33:51 +01:00
Anatol Belski 7018a0502f Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  update binary sdk tools version for appveyor
2017-03-13 12:32:46 +01:00
Anatol Belski 8e45583006 update binary sdk tools version for appveyor 2017-03-13 12:31:31 +01:00
Remi Collet 196ba4e194 Merge branch 'PHP-7.1'
* PHP-7.1:
  rely on provided openssl.cnf to avoid possible failure with system defaults
2017-03-13 08:17:59 +01:00
Remi Collet 1ffb1b9597 rely on provided openssl.cnf to avoid possible failure with system defaults 2017-03-13 08:17:42 +01:00
Nikita Popov 1e196110d3 Fix __sleep() returning undefined declared properties 2017-03-12 22:20:08 +01:00
Nikita Popov ddc0dbf1a3 Clean up __sleep() related code 2017-03-12 22:20:07 +01:00
Joe Watkins d2285e1613 Merge branch 'pull-request/2414'
* pull-request/2414:
  zend-test extension to house code that is required for testing internal APIs, but that we would not want to expose for regular builds
2017-03-12 19:00:06 +00:00
Nikita Popov b3ca0c2500 zend-test extension to house code that is required for testing internal APIs, but that we would not want to expose for regular builds 2017-03-12 18:58:50 +00:00
David Carlier ea91c08232 Drop unnecessary checks of pemalloc() return value 2017-03-12 17:06:25 +01:00
Nikita Popov e31342ef84 Merge branch 'PHP-7.1' 2017-03-12 17:04:02 +01:00
andrewnester fbf0e0587f Implement FR #74217: deterministic sqlite functions 2017-03-12 17:03:00 +01:00
Nikita Popov 22e6b5ef22 Merge branch 'PHP-7.1' 2017-03-10 18:21:09 +01:00
Nikita Popov 280e8dafe4 Merge branch 'PHP-7.0' into PHP-7.1 2017-03-10 18:20:58 +01:00
Nikita Popov 29ee3e3c49 Fixed bug #73960 2017-03-10 18:20:32 +01:00
Remi Collet ec31924cd6 Constify to void build warning for C++ ext. [-Wwrite-strings]
Example (with v8js):

/builddir/build/BUILD/php-pecl-v8js-1.3.4/NTS/v8js_class.cc: In function 'void v8js_execute_script(zval*, v8js_script*, long int, long int, long int, zval**)':
/usr/include/php/Zend/zend.h:204:57: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
 #define zend_bailout()  _zend_bailout(__FILE__, __LINE__)
                                                         ^
/builddir/build/BUILD/php-pecl-v8js-1.3.4/NTS/v8js_class.cc:633:3: note: in expansion of macro 'zend_bailout'
   zend_bailout();
   ^~~~~~~~~~~~
2017-03-10 11:52:26 +01:00
Xinchen Hui 9ad8e8f8ee Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed bug #74218 (ArrayIterator error message is confusing)
2017-03-10 15:17:29 +08:00
Xinchen Hui 9f263c257a Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #74218 (ArrayIterator error message is confusing)
2017-03-10 15:16:01 +08:00
Xinchen Hui c398198c0a Fixed bug #74218 (ArrayIterator error message is confusing) 2017-03-10 15:15:31 +08:00
Sara Golemon dde62b14df Merge branch 'PHP-7.1' 2017-03-09 11:58:19 -08:00
Sara Golemon 7cb3e90162 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Add NEWS entry for bab0b99f
2017-03-09 11:56:54 -08:00
Sara Golemon 9b16d4c999 Add NEWS entry for bab0b99f 2017-03-09 11:56:06 -08:00
Nikita Popov 8a34b33c59 Merge branch 'PHP-7.1' 2017-03-09 20:48:32 +01:00
Nikita Popov 305f3c2b76 Merge branch 'PHP-7.0' into PHP-7.1 2017-03-09 20:48:24 +01:00
Nikita Popov 177f87cf05 Fixed bug #73370
If len=0 malloc() is allowed to return NULL.
2017-03-09 20:47:06 +01:00
Nikita Popov 30be110c5a Merge branch 'PHP-7.1' 2017-03-09 17:32:08 +01:00
Nikita Popov 314ef0ff69 Merge branch 'PHP-7.0' into PHP-7.1 2017-03-09 17:32:01 +01:00
Thomas Orozco 247ce052cd Fixed bug #71003: Add PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT 2017-03-09 17:31:21 +01:00
Nikita Popov 065b3700b6 Merge branch 'PHP-7.1' 2017-03-09 16:45:40 +01:00
Nikita Popov 6635639b75 Merge branch 'PHP-7.0' into PHP-7.1 2017-03-09 16:45:28 +01:00
mcq8 b224e74267 Fixed bug #72096 Swatch time value incorrect for dates before 1970 2017-03-09 16:44:02 +01:00
Nikita Popov 3d51d4c90c Drop outdated makerpm script
Not updated since 2003, uses Copyright tag (not supported since
2005), uses a number of configure options that have been dropped
ages ago, etc.
2017-03-09 16:26:45 +01:00
Dennis Birkholz d0c8aba3d8 Pcntl: Make realtime signals available
Expose constants SIGRTMIN and SIGRTMAX and adjust range checks to
support realtime signals.
2017-03-09 15:59:09 +01:00
c9s 85243eea35 Enable ccache on Travis 2017-03-09 15:44:04 +01:00
Joe Watkins 89e403982c Merge branch 'PHP-7.1'
* PHP-7.1:
  Fix bug #74149 static embed SAPI linkage error
2017-03-09 07:44:42 +00:00
Joe Watkins 8599ce4f18 Fix bug #74149 static embed SAPI linkage error 2017-03-09 07:43:58 +00:00
Nikita Popov f68968f7e0 Merge branch 'PHP-7.1' 2017-03-09 00:10:31 +01:00
andrewnester 8f799137d7 Fixed bug #74058
Fall back from get_property_ptr_ptr to read_property if offsetGet
is overridden.
2017-03-09 00:10:00 +01:00
Sara Golemon b63c45c69e Try fallback on IPv4 ANYADDR when IPv6 ANYADDR fails
https://bugs.php.net/bug.php?id=74166
A host system with no/limited IPv6 support will fail at binding
the IPv6 ANYADDR address (::) as the address family is unsupported.

Deal with this by handling failure to implicitly bind to ::
as a soft failure, falling back to 0.0.0.0.

If binding to :: failed for some other reason (e.g. port in use)
then binding to 0.0.0.0 will likely fail as well, but we'll
get appropriate warnings for that.
2017-03-08 11:02:54 -08:00
Sara Golemon 2ba2b768cc Merge branch 'PHP-7.1'
* PHP-7.1:
  Detect invalid port in xp_socket parse ip address
2017-03-07 12:11:31 -08:00
Sara Golemon 1a19b97ac3 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Detect invalid port in xp_socket parse ip address
2017-03-07 12:11:22 -08:00
Sara Golemon bab0b99f37 Detect invalid port in xp_socket parse ip address
For historical reasons, fsockopen() accepts the port and hostname
separately: fsockopen('127.0.0.1', 80)

However, with the introdcution of stream transports in PHP 4.3,
it became possible to include the port in the hostname specifier:

fsockopen('127.0.0.1:80')
Or more formally: fsockopen('tcp://127.0.0.1:80')

Confusing results when these two forms are combined, however.
fsockopen('127.0.0.1:80', 443) results in fsockopen() attempting
to connect to '127.0.0.1:80:443' which any reasonable stack would
consider invalid.

Unfortunately, PHP parses the address looking for the first colon
(with special handling for IPv6, don't worry) and calls atoi()
from there.  atoi() in turn, simply stops parsing at the first
non-numeric character and returns the value so far.

The end result is that the explicitly supplied port is treated
as ignored garbage, rather than producing an error.

This diff replaces atoi() with strtol() and inspects the
stop character.  If additional "garbage" of any kind is found,
it fails and returns an error.
2017-03-07 12:10:53 -08:00
Anatol Belski fdba33922a move to hash API for interned strings ht management 2017-03-07 19:01:00 +01:00
Anatol Belski fe8112e8f8 drop redundant checks 2017-03-07 15:42:19 +01:00
Anatol Belski c20ae623c2 Merge branch 'PHP-7.1'
* PHP-7.1:
  sync with the incremental and inter-file analysis option
2017-03-07 15:31:54 +01:00
Anatol Belski b8f75e75f6 sync with the incremental and inter-file analysis option
available as of cppcheck 1.77
2017-03-07 15:27:57 +01:00