1
0
mirror of https://github.com/php/php-src.git synced 2026-04-16 12:31:06 +02:00
Commit Graph

109918 Commits

Author SHA1 Message Date
Remi Collet
e5fcea0bcd Merge branch 'PHP-7.3'
* PHP-7.3:
  missing entry for #77020
2018-12-18 16:30:09 +01:00
Remi Collet
4efa618b9e Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  missing entry for #77020
2018-12-18 16:29:53 +01:00
Remi Collet
3245d1bb09 missing entry for #77020 2018-12-18 16:29:31 +01:00
Dmitry Stogov
868c1b7377 Reduce executor size 2018-12-18 17:34:18 +03:00
Remi Collet
6ff95809b0 Merge branch 'PHP-7.3'
* PHP-7.3:
  bump to 7.2.15-dev
2018-12-18 13:12:25 +01:00
Remi Collet
c04ef40026 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  bump to 7.2.15-dev
2018-12-18 13:12:05 +01:00
Remi Collet
7161fe629d bump to 7.2.15-dev 2018-12-18 13:11:32 +01:00
Christoph M. Becker
f0b79bf798 Merge branch 'PHP-7.3'
* PHP-7.3:
  [ci skip] Fix release date
2018-12-18 13:10:35 +01:00
Christoph M. Becker
8734d6a73d [ci skip] Fix release date 2018-12-18 13:10:03 +01:00
Christoph M. Becker
1df1acb871 Merge branch 'PHP-7.3'
* PHP-7.3:
  Prepare main branch for 7.3.2
2018-12-18 12:16:40 +01:00
Christoph M. Becker
a65133a17a Prepare main branch for 7.3.2 2018-12-18 12:15:25 +01:00
Dmitry Stogov
5341d17c34 Fixed expectation 2018-12-17 15:59:16 +03:00
Nikita Popov
da1e6679b7 CFG construction: Avoid code duplication
These code for those two cases is the same nowadays, so merge them.
2018-12-17 11:29:23 +01:00
Christoph M. Becker
cde2e35bf0 Merge branch 'PHP-7.3'
* PHP-7.3:
  Fix #77297: SodiumException segfaults on PHP 7.3
2018-12-16 16:37:15 +01:00
Scott
e0e08d376e Fix #77297: SodiumException segfaults on PHP 7.3
Instead of trying to clean the argument arrays from the backtrace, we
overwrite them with empty arrays.
2018-12-16 16:36:47 +01:00
Christoph M. Becker
9216f5b92b Merge branch 'PHP-7.3'
* PHP-7.3:
  Fix #77291: magic methods inherited from a trait may be ignored
2018-12-16 13:36:02 +01:00
Christoph M. Becker
0061db5503 Fix #77291: magic methods inherited from a trait may be ignored
When adding methods from a trait, we must not assume that a method name
with the same length as the name of the using class is either a PHP 4
style constructor, or not a magic method at all – it may well be
another magic method.

We mostly preserve the spirit of the optimization which caused this
regression, and avoid string comparisons for all method names which can
never be magic methods.
2018-12-16 13:30:11 +01:00
BohwaZ
82af24f2b2 Implement SQLite3Stmt::getSQL method, returning the original statement SQL, eventually expanded 2018-12-15 17:27:33 +01:00
Christoph M. Becker
3b0f051193 Allow empty $escape to eschew escaping CSV
Albeit CSV is still a widespread data exchange format, it has never been
officially standardized.  There exists, however, the “informational” RFC
4180[1] which has no notion of escape characters, but rather defines
`escaped` as strings enclosed in double-quotes where contained
double-quotes have to be doubled.  While this concept is supported by
PHP's implementation (`$enclosure`), the `$escape` sometimes interferes,
so that `fgetcsv()` is unable to correctly parse externally generated
CSV, and `fputcsv()` is sometimes generating non-compliant CSV.  Since
PHP's `$escape` concept is availble for many years, we cannot drop it
for BC reasons (even though many consider it as bug).  Instead we allow
to pass an empty string as `$escape` parameter to the respective
functions, which results in ignoring/omitting any escaping, and as such
is more inline with RFC 4180.  It is noteworthy that this is almost no
userland BC break, since formerly most functions did not accept an empty
string, and failed in this case.  The only exception was `str_getcsv()`
which did accept an empty string, and used a backslash as escape
character then (which appears to be unintended behavior, anyway).

The changed functions are `fputcsv()`, `fgetcsv()` and `str_getcsv()`,
and also the `::setCsvControl()`, `::getCsvControl()`, `::fputcsv()`,
and `::fgetcsv()` methods of `SplFileObject`.

The implementation also changes the type of the escape parameter of the
PHP_APIs `php_fgetcsv()` and `php_fputcsv()` from `char` to `int`, where
`PHP_CSV_NO_ESCAPE` means to ignore/omit escaping.  The parameter
accepts the same values as `isalpha()` and friends, i.e. “the value of
which shall be representable as an `unsigned char` or shall equal the
value of the macro `EOF`.  If the argument has any other value, the
behavior is undefined.”  This is a subtle BC break, since the character
`chr(128)` has the value `-1` if `char` is signed, and so likely would
be confused with `EOF` when converted to `int`.  We consider this BC
break to be acceptable, since it's rather unlikely that anybody uses
`chr(128)` as escape character, and it easily can be fixed by casting
all `escape` arguments to `unsigned char`.

This patch implements the feature requests 38301[2] and 51496[3].

[1] <https://tools.ietf.org/html/rfc4180>
[2] <https://bugs.php.net/bug.php?id=38301>
[3] <https://bugs.php.net/bug.php?id=51496>
2018-12-15 14:38:15 +01:00
Dmitry Stogov
d206630f13 Fixed memory leaks 2018-12-13 16:21:08 +03:00
Dmitry Stogov
db30e0ce16 Improve unserialize() 2018-12-13 12:55:29 +03:00
Dmitry Stogov
71f430cf06 Improve unserialize() 2018-12-12 20:04:36 +03:00
Christoph M. Becker
8c781c1c20 Resolve imagecropauto() default $mode quirk
The `$mode` parameter of `imagecropauto()` defaults to `-1`.  However,
`-1` is changed to `GD_CROP_DEFAULT` right away, so basically the
default is `GD_CROP_DEFAULT`, which is rather confusing and
unnecessary.

Therefore, we change the default to `IMG_CROP_DEFAULT`, but still allow
an explicit `-1` to be passed for BC reasons, in which case we trigger
a deprecation notice, so we can rid the `-1` support eventually.
2018-12-12 17:25:37 +01:00
Craig Andrews
40c4d7f182 Implement FR #72510: systemd service should be hardened 2018-12-12 17:12:02 +01:00
Dmitry Stogov
4d0a2f68a9 Provide is_zend_ptr() function to check if a pointer lays in Zend MM heap. 2018-12-12 13:02:28 +03:00
Dmitry Stogov
05f3706588 Split php_array_merge_or_replace_wrapper() into php_array_merge_wrapper() and php_array_replace_wrapper().
Avoid array duplication when merging with an empty array.
2018-12-11 15:59:44 +03:00
Xinchen Hui
b3804831ad Merge branch 'PHP-7.3'
* PHP-7.3:
  Update NEWS
2018-12-11 15:25:29 +08:00
Xinchen Hui
54739c7e66 Update NEWS 2018-12-11 15:25:19 +08:00
Xinchen Hui
3ecaba68e4 Merge branch 'PHP-7.3'
* PHP-7.3:
  Fix __zend_cpuid on i386 PIC without __cpuid_count
2018-12-11 15:23:25 +08:00
Xinchen Hui
c3eb291e41 Merge branch 'i386-PIC' of https://github.com/ryandesign/php-src into PHP-7.3
* 'i386-PIC' of https://github.com/ryandesign/php-src:
  Fix __zend_cpuid on i386 PIC without __cpuid_count
2018-12-11 15:22:50 +08:00
Anatol Belski
282581ee8c Merge branch 'PHP-7.3'
* PHP-7.3:
  Remove BOM
2018-12-11 00:39:55 +01:00
Anatol Belski
7dc1c7f630 Remove BOM 2018-12-11 00:38:54 +01:00
Christoph M. Becker
ad06f1aa2e Merge branch 'PHP-7.3'
* PHP-7.3:
  Update/fix UPGRADING
2018-12-10 14:33:04 +01:00
Christoph M. Becker
9b335c5649 Update/fix UPGRADING 2018-12-10 14:32:20 +01:00
Nikita Popov
6debea2fd8 Merge branch 'PHP-7.3' 2018-12-10 13:36:54 +01:00
Nikita Popov
93aabf1533 Fixed bug #77275
Instead of juggling with this problem during literal compaction,
make sure that we always initialize Z_EXTRA for literals, which
seems like the more robust solution.
2018-12-10 13:36:23 +01:00
Nikita Popov
59cacdcefd Fix typos in compact literals debugging code 2018-12-10 13:35:55 +01:00
Christopher Jones
be318f1720 Merge branch 'PHP-7.3' 2018-12-10 21:54:35 +11:00
Christopher Jones
6f6a15e1ae Merge branch 'PHP-7.2' into PHP-7.3 2018-12-10 21:54:23 +11:00
Christopher Jones
3aee9ca571 LOL I had 2.10 on my mind 2018-12-10 21:54:13 +11:00
Peter Kokot
7e445ef3b1 Set AC_CONFIG_AUX_DIR to build directory
The Autoconf macro AC_CONFIG_AUX_DIR can set the location of the
auxiliary build tools such as config.guess, config.sub, and bundled
libtool scripts and moves these bundled files from the root directory
to the build subdirectory.

Additionally some changes in this context or as a part of obsoletion:
- The LT_TARGETS variable in build/build2.mk file was once used as a part
  of the Automake step. It's not used anymore and has been refactored to
  separate makedist script directly.
- ltconfig is not used anymore since libtool 1.4+
  cf8d1563c2
- phpize file locations for the config.guess, config.sub, and ltmain.sh
  has been refactored accordingly.
2018-12-10 08:11:44 +01:00
Christopher Jones
a680f4f2be Link to the fast_zpp RFC 2018-12-10 12:53:12 +11:00
Christopher Jones
46a4bc140d Merge branch 'master' of https://git.php.net/repository/php-src 2018-12-10 11:00:38 +11:00
Christopher Jones
5b72f49c9e Merge branch 'PHP-7.3' of https://git.php.net/repository/php-src into PHP-7.3 2018-12-10 11:00:32 +11:00
Christopher Jones
211b64f950 Merge branch 'PHP-7.3' 2018-12-10 10:58:44 +11:00
Christopher Jones
95581c6dd9 Merge branch 'PHP-7.2' into PHP-7.3 2018-12-10 10:57:10 +11:00
Christopher Jones
444e400c3b Bundle the new test 2018-12-10 10:45:43 +11:00
Christoph M. Becker
222b7e78e3 Merge branch 'PHP-7.3'
* PHP-7.3:
  Fix version numbers in main branch
2018-12-10 00:21:59 +01:00
Christopher Jones
c18d2a801a Merge branch 'PHP-7.3'
* PHP-7.3:
  Improve test portability
  Update for newer Oracle versions
2018-12-10 10:16:53 +11:00
Christopher Jones
e47025ffc5 Merge branch 'PHP-7.2' into PHP-7.3 2018-12-10 10:16:27 +11:00