Commit Graph

11886 Commits

Author SHA1 Message Date
Nikita Popov
7ac3c2fa65 Fix ZEND_NORMALIZE_BOOL usage
Typo introduced in cdd8368d6f.
2019-01-02 09:56:40 +01:00
Xinchen Hui
c5c76fbd61 Merge branch 'PHP-7.3'
* PHP-7.3:
  Update NEWS
  Fixed bug #77395 (segfault about array_multisort)
2019-01-02 12:10:41 +08:00
Xinchen Hui
e527626d9f Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fixed bug #77395 (segfault about array_multisort)
2019-01-02 12:10:04 +08:00
Xinchen Hui
8ebae84674 Fixed bug #77395 (segfault about array_multisort) 2019-01-02 12:09:47 +08:00
Anatol Belski
67c0415d86 Merge branch 'PHP-7.3'
* PHP-7.3:
  Increase timeout for test on AppVeyor
2018-12-29 17:52:10 +01:00
Anatol Belski
d4b7cc1dba Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Increase timeout for test on AppVeyor
2018-12-29 17:51:39 +01:00
Anatol Belski
54a2b42778 Increase timeout for test on AppVeyor 2018-12-29 17:48:25 +01:00
Nikita Popov
27e9c05e81 Remove preg_options param from pcre_get_compiled_regex()
This parameter is always zero and not necessary to call pcre2_match.

I'm leaving the parameter behind on the _ex() variant, so the preg_flags
are still accessible in some way.
2018-12-26 17:20:13 +01:00
Nikita Popov
fc30c0f7ad Merge branch 'PHP-7.3' 2018-12-26 17:13:21 +01:00
Nikita Popov
b1deb98c42 Fixed bug #77338
Set preg_options to 0 in php_pcre_get_compiled_regex(_ex). These
options are intended to be passed to pcre2_match. However, we do
not have any flags that actually need to be set during matching
(all relevant flags are set during compilation), and the preg_flags
value is used for PHP-specific flags instead.

This parameter should be removed entirely in master to avoid confusion.
2018-12-26 17:11:27 +01:00
Nikita Popov
1fbc309e2c Merge branch 'PHP-7.3' 2018-12-23 20:21:16 +01:00
Nikita Popov
69f54dd549 Merge branch 'PHP-7.2' into PHP-7.3 2018-12-23 20:20:53 +01:00
Nikita Popov
64de5bc224 Fix invalid efree in browscap
Related to bug #77338.
2018-12-23 20:20:04 +01:00
Dmitry Stogov
9acfe1f8f0 Fixed compilation warnings 2018-12-19 16:15:49 +03:00
Dmitry Stogov
cec091176c Replace zend_hash_apply... with ZEND_HASH_FOREACH... 2018-12-19 02:49:56 +03: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
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
Stanislav Malyshev
7bd513a492 Merge branch 'PHP-7.3'
* PHP-7.3:
  Fix null pointer deref in qprint-encode filter (bug #77231)
2018-12-03 10:20:17 -08:00
Stanislav Malyshev
36534afd10 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix null pointer deref in qprint-encode filter (bug #77231)
2018-12-03 10:20:07 -08:00
Stanislav Malyshev
a9ef7ecc60 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix null pointer deref in qprint-encode filter (bug #77231)
2018-12-03 10:20:02 -08:00
Stanislav Malyshev
d5dc3c69f9 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix null pointer deref in qprint-encode filter (bug #77231)
2018-12-03 10:19:57 -08:00
Stanislav Malyshev
036bc5c1fb Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fix null pointer deref in qprint-encode filter (bug #77231)
2018-12-03 10:19:49 -08:00
Stanislav Malyshev
78bffa72c1 Fix null pointer deref in qprint-encode filter (bug #77231) 2018-12-03 10:19:08 -08:00
Gabriel Caruso
cdd8368d6f Clean up unnecessary ternary expressions and simplify some returns
- Simplify conditions
- Use ZEND_HASH_APPLY_* instead of hard-coded booleans
- Use ZEND_NORMALIZE_BOOL
- Drop sign in favor of ZEND_NORMALIZE_BOOL
2018-12-03 01:22:14 +01:00
Steve Walk
ea1ea33bd5 [ci skip] remove test per discussion on github 2018-11-29 23:20:49 +01:00
Steve Walk
4e63df88d5 fix bad assumption of strncmp return value 2018-11-29 23:19:16 +01:00
Gabriel Caruso
35be0590ed
Remove unecessaries SKIPIF sections for necessary extensions 2018-11-21 08:08:09 -02:00
Sara Golemon
534df87c9e
Implement password mechanism registry
RFC: https://wiki.php.net/rfc/password_registry
2018-11-20 17:26:55 -05:00
Rijnard van Tonder
8881c3c82f Remove redundant continue in for loops 2018-11-20 21:23:24 +01:00
Nikita Popov
2fac9d9ec1 Remove some mentions of RECOVERABLE_ERROR in tests
Mostly drop error handlers that are no longer necessary.
2018-11-15 22:13:46 +01:00
Peter Kokot
f0251a8b16 Remove lexer files generated by RE2C
This patch removes generated lexer files by re2c during the build
process so they are not tracked by Git yet can be still shipped when
PHP is released. The genfiles script additionally provides generation
of these lexer files when creating a release of the PHP source code.

The genfiles script refactorings:
- added file header
- echoing steps instead of comments
- cleaning only lines starting with `#line`
- eval removed in favor of direct executed commands
- the debug mode `set -x` removed
- script can be called from any path
- improved comments
2018-11-11 02:55:46 +01:00
Dmitry Stogov
bc53642c05 *printf() optimization and v*printf() warning message fix. 2018-11-07 02:40:15 +03:00
Dmitry Stogov
cdbbc802b4 Removed dead checks 2018-11-06 23:11:28 +03:00
Dan Wallis
eb1233533e Fix #77105: Use position:sticky for <th> in phpinfo()
This ensures tables remain legible when scrolling. If the user agent
does not support this feature, then it will gracefully degrade to
existing behaviour.

This patch implements: https://bugs.php.net/bug.php?id=77105
2018-11-05 14:27:06 +01:00
Zeev Suraski
9afce019e0 Future-proof email addresses 2018-11-01 18:35:32 +02:00
Zeev Suraski
67e0138c0d Future-proof email addresses... 2018-11-01 18:30:28 +02:00
Anatol Belski
9c9178af51 Merge branch 'PHP-7.3'
* PHP-7.3:
  Fix error condition
  Fixed bug #77081 ftruncate() changes seek pointer in c mode
2018-10-30 20:50:07 +01:00
Anatol Belski
8827cc34cf Fixed bug #77081 ftruncate() changes seek pointer in c mode 2018-10-30 20:42:00 +01:00
Dmitry Stogov
359f19edc9 Optimize substr() edge-case conditions 2018-10-29 13:11:41 +03:00
Anatol Belski
40808ac41e Remove unused var 2018-10-24 23:37:32 +02:00
Dmitry Stogov
d1e14e2cc0 Merge branch 'PHP-7.3'
* PHP-7.3:
  Make php_plain_files_wrapper to be writable (workaround for swoole)
2018-10-24 11:50:18 +03:00
Dmitry Stogov
770fe51bfd Make php_plain_files_wrapper to be writable (workaround for swoole) 2018-10-24 11:49:44 +03:00
Dmitry Stogov
fd080a06d8 Fixed test failurs introduced by 9c144e0d82 2018-10-23 12:46:12 +03:00
Nikita Popov
149e6aaa99 Fix accessibility checks for dynamic properties
A dynamic property may be shadowed by a private/protected property.
Make sure we check property accessibility for non-indirect
properties as well.

Closes #3626.
2018-10-22 16:46:33 +02:00
Peter Kokot
0e60b812c0 Move all testing docs to qa.php.net
The qa.php.net currently includes nice collection of information about
tests and how to run them. Instead of maintaining two locations of this
information, this patch removes the README.TESTING from the php-src
repo. Patch for qa.php.net has been sent separately to that repo.
2018-10-18 08:01:22 +02:00
Nikita Popov
1cfbb21790 Classify object handlers are required/optional 2018-10-16 20:53:59 +02:00
Peter Kokot
d679f02295 Sync leading and final newlines in *.phpt sections
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines in all
*.phpt sections.

According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-15 04:33:09 +02:00
Peter Kokot
b746e69887 Sync leading and final newlines in *.phpt sections
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines in all
*.phpt sections.

According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-15 04:32:30 +02:00
Peter Kokot
f1d7e3ca0b Sync leading and final newlines in *.phpt sections
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines in all
*.phpt sections.

According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-15 04:31:31 +02:00
Peter Kokot
113213f027 Sync leading and final newlines in *.phpt sections
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines in all
*.phpt sections.

According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-15 04:29:24 +02:00
Peter Kokot
d7a3edd45d Trim trailing whitespace in *.phpt 2018-10-14 19:46:15 +02:00
Peter Kokot
782352c54a Trim trailing whitespace in *.phpt 2018-10-14 19:45:12 +02:00
Peter Kokot
17ccbeec32 Trim trailing whitespace in *.phpt 2018-10-14 19:44:14 +02:00
Peter Kokot
7af945e271 Trim trailing whitespace in *.phpt 2018-10-14 19:43:12 +02:00
Gabriel Caruso
9c144e0d82
Trim trailing whitespace in tests 2018-10-14 12:07:20 -03:00
Peter Kokot
1ad08256f3 Sync leading and final newlines in source code files
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines.

According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-14 12:56:38 +02:00
Peter Kokot
1c850bfcca Sync leading and final newlines in source code files
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines.

According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-14 12:55:24 +02:00
Peter Kokot
60a69daec6 Sync leading and final newlines in source code files
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines.

According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-14 12:54:08 +02:00
Peter Kokot
03f3b8479b Sync leading and final newlines in source code files
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines.

According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-14 12:51:01 +02:00
Peter Kokot
37c329d715 Trim trailing whitespace in source code files 2018-10-13 14:17:28 +02:00
Peter Kokot
3362620b5f Trim trailing whitespace in source code files 2018-10-13 14:16:33 +02:00
Peter Kokot
902d39a3a7 Trim trailing whitespace in source code files 2018-10-13 14:14:50 +02:00
Peter Kokot
7f6387b59a Trim trailing whitespace in source code files 2018-10-13 14:12:55 +02:00
Peter Kokot
be2ddc6b65 Convert CRLF line endings to LF
This patch simplifies line endings tracked in the Git repository and
syncs them to all include the LF style instead of the CRLF files.

Newline characters:
- LF (\n) (*nix and Mac)
- CRLF (\r\n) (Windows)
- CR (\r) (old Mac, obsolete)

To see which line endings are in the index and in the working copy the
following command can be used:
`git ls-files --eol`

Git additionally provides `.gitattributes` file to specify if some files
need to have specific line endings on all platforms (either CRLF or LF).

Changed files shouldn't cause issues on modern Windows platforms because
also Git can do output conversion is core.autocrlf=true is set on
Windows and use CRLF newlines in all files in the working tree.

Unless CRLF files are tracked specifically, Git by default tracks all
files in the index using LF newlines.
2018-10-13 11:23:52 +02:00
Peter Kokot
85290bbfcc Convert CRLF line endings to LF
This patch simplifies line endings tracked in the Git repository and
syncs them to all include the LF style instead of the CRLF files.

Newline characters:
- LF (\n) (*nix and Mac)
- CRLF (\r\n) (Windows)
- CR (\r) (old Mac, obsolete)

To see which line endings are in the index and in the working copy the
following command can be used:
`git ls-files --eol`

Git additionally provides `.gitattributes` file to specify if some files
need to have specific line endings on all platforms (either CRLF or LF).

Changed files shouldn't cause issues on modern Windows platforms because
also Git can do output conversion is core.autocrlf=true is set on
Windows and use CRLF newlines in all files in the working tree.

Unless CRLF files are tracked specifically, Git by default tracks all
files in the index using LF newlines.
2018-10-13 11:23:20 +02:00
Peter Kokot
2aa897476f Convert CRLF line endings to LF
This patch simplifies line endings tracked in the Git repository and
syncs them to all include the LF style instead of the CRLF files.

Newline characters:
- LF (\n) (*nix and Mac)
- CRLF (\r\n) (Windows)
- CR (\r) (old Mac, obsolete)

To see which line endings are in the index and in the working copy the
following command can be used:
`git ls-files --eol`

Git additionally provides `.gitattributes` file to specify if some files
need to have specific line endings on all platforms (either CRLF or LF).

Changed files shouldn't cause issues on modern Windows platforms because
also Git can do output conversion is core.autocrlf=true is set on
Windows and use CRLF newlines in all files in the working tree.

Unless CRLF files are tracked specifically, Git by default tracks all
files in the index using LF newlines.
2018-10-13 11:22:30 +02:00
Peter Kokot
3f72c77ce4 Convert CRLF line endings to LF
This patch simplifies line endings tracked in the Git repository and
syncs them to all include the LF style instead of the CRLF files.

Newline characters:
- LF (\n) (*nix and Mac)
- CRLF (\r\n) (Windows)
- CR (\r) (old Mac, obsolete)

To see which line endings are in the index and in the working copy the
following command can be used:
`git ls-files --eol`

Git additionally provides `.gitattributes` file to specify if some files
need to have specific line endings on all platforms (either CRLF or LF).

Changed files shouldn't cause issues on modern Windows platforms because
also Git can do output conversion is core.autocrlf=true is set on
Windows and use CRLF newlines in all files in the working tree.

Unless CRLF files are tracked specifically, Git by default tracks all
files in the index using LF newlines.
2018-10-13 11:21:27 +02:00
Nikita Popov
0b6063f331 Restore array_key_exists() compatibility for ArrayObject
Doing this by special-casing array_key_exists() for ArrayObject.
2018-10-11 16:10:22 +02:00
Nikita Popov
a27f772a46 Remove redundant HASH_OF in mail.c
And use ZEND_HASH_FOREACH_STR_KEY_VAL where the integer key is not
needed.
2018-10-11 13:04:08 +02:00
Nikita Popov
4ca5b35771 Use ARRAY_OR_OBJECT arg in http_build_query
Instead of checking the type manually. Peculiarily the zpp
message does not use "array or object", but that's a general issue.
And I guess it's good that object support is not being advertised.
2018-10-11 13:04:08 +02:00
Nikita Popov
a710ceee62 Remove leftover code dealing with curl wrappers 2018-10-11 12:12:31 +02:00
Nikita Popov
7ec8087f80 Introduce get_properties_for() handler
This handler allows getting the object properties for a particular
purpose, such as array casting, serialization, etc.
2018-10-10 10:39:10 +02:00
Nikita Popov
01cc547f44 Merge branch 'PHP-7.3' 2018-10-08 13:16:54 +02:00
Nikita Popov
d982bbe175 Fix ref ID handling when serializing $GLOBALS
This was already broken previously, but in PHP 7.3 stricter
validation during unserialization made this into an error.
2018-10-08 13:16:23 +02:00
Pedro Magalhães
d87fdd9a96 Merge branch 'PHP-7.3'
* PHP-7.3:
  Remove unstable dns tests
2018-10-06 15:59:05 +01:00
Pedro Magalhães
484b79e868 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Remove unstable dns tests
2018-10-06 15:58:51 +01:00
Pedro Magalhães
608b48e5f4 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Remove unstable dns tests
2018-10-06 15:58:32 +01:00
Pedro Magalhães
49835e1436 Remove unstable dns tests 2018-10-06 15:58:01 +01:00
Pedro Magalhães
418e2264dc Merge branch 'PHP-8.3'
* PHP-7.3:
  Fix #76888 - Remove unstable test
2018-10-06 15:46:30 +01:00
Pedro Magalhães
ef36419af4 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #76888 - Remove unstable test
2018-10-06 15:46:11 +01:00
Pedro Magalhães
82e10f3974 Fix #76888 - Remove unstable test 2018-10-06 15:45:07 +01:00
Pedro Magalhães
7b10e71b9d Use the locally defined constants for dns record types 2018-10-05 16:38:06 +01:00
Gabriel Caruso
257bec33f8
Use already set variable 2018-09-30 02:01:10 -03:00
bugreportuser
59d99a2c47 Remove unnecessary base64_encode() return value check
php_base64_encode() never returns NULL, so base64_encode() will never return
false.
2018-09-23 14:49:10 +02:00
Peter Kokot
5da3ed69a6 Rename *.p5c files to *.inc
When including files in PHP tests a good practice so far has been to use
the *.inc extension. This patch renames few *.p5c files that are
included in phpt files.
2018-09-21 23:21:14 +02:00
Peter Kokot
bfa2c7158f Fix permissions
Certain files don't need to be executables.
2018-09-21 14:12:25 +02:00
Nikita Popov
cdde07d059 Merge branch 'PHP-7.3' 2018-09-18 20:51:50 +02:00
Nikita Popov
c2da50bc41 Merge branch 'PHP-7.2' into PHP-7.3 2018-09-18 20:51:28 +02:00
Nikita Popov
6bf681249f Merge branch 'PHP-7.1' into PHP-7.2 2018-09-18 20:50:37 +02:00
Manabu Matsui
ab6c45f524 Fix bug #75533: array_reduce is slow when $carry is large array 2018-09-18 20:49:59 +02:00
Peter Kokot
d3ca28f569 Remove HAVE_STRING_H
The C89 standard and later defines the `<string.h>` header as part of
the standard headers [1] and on current systems it is always present.

Code included also `<strings.h>` header as an alterinative in some
files. This kind of check was relevant on some older systems where the
`<strings.h>` file included definitions for the C89 compliant
`<string.h>`. Today such alternative check is not required anymore. The
`<strings.h>` file is part of the POSIX definition these days.

Also Autoconf suggests doing this and relying on C89 or above [2] and [3].

This patch also cleans few unused `<strings.h>` inclusions in the libmbfl.

[1]: https://port70.net/~nsz/c/c89/c89-draft.html#4.1.2
[2]: http://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/headers.m4
[3]: https://www.gnu.org/software/autoconf/manual/autoconf-2.69/autoconf.html
2018-09-18 05:32:08 +02:00
Anatol Belski
44fa6be16e Set correct error code and adapt test 2018-09-17 17:19:39 +02:00
Anatol Belski
321c0cc349 Fix localized error messages and memory leaks
The FormatMessage API needs to LocalFree the delivered error messages.
In cases where messages are delivered in non ASCII compatible encoding,
the messages might be unreadable. This aligns the error message encoding
with the encoding settings in PHP, the focus is UTF-8 as default.

Initialize error buffer

Avoid code duplication
2018-09-17 10:56:50 +02:00
Peter Kokot
03bbdf275a Make PHP development tools files executable
This patch makes few remaining PHP development tools files
executable and adds a shebang to them.

The `#!/usr/bin/env php` shebang provides running the script via
`./script.php` and uses env to find PHP script location on the system.
At the same time it still provides running the script with a user
defined PHP location using `php script.php`. Shebang is not visible in
the output of the generated file.
2018-09-17 00:02:36 +02:00
Gabriel Caruso
f72b6c5e19
Use EXPECT instead of EXPECTF when possible 2018-09-16 15:39:18 -03:00
Nikita Popov
dfa166e7ed Remove unused ZEND_FILE_LINE in i_zval_ptr_dtor 2018-09-16 17:16:26 +02:00
Christoph M. Becker
6da3a1e3ce Revert "Implement #67331: Have parse_ini_file add empty entries"
This reverts commit 3f3e914df3.

The commit broke some tests on Windows, and generally needs more
though.
2018-09-15 17:08:58 +02:00
Christoph M. Becker
3f3e914df3 Implement #67331: Have parse_ini_file add empty entries
Some INI processors allow to specify empty values by just giving the
key without the equals sign, for instance MySQL and Python.  It appears
to be sensible to add this possibility to our INI parser, so that it
can be used for such INI files as well.  We choose NULL as the value of
empty values.

This syntactical enhancement is a (minor) BC break, though, as can be
seen by the necessary change to bug49692.ini.  The “comment” formerly
has been simply ignored, but now it would be parsed as key with an
empty value.

This PR is based on Adam's former patch.
2018-09-15 15:37:01 +02:00
Peter Kokot
77118fc925 Remove HAVE_ASSERT_H
The `<assert.h>` header file is part of the standard C89 headers [1] and
on older systems there needed to be also a manual check if header is
present.

Since PHP requires at least C89 manual check and the `HAVE_ASSERT_H`
symbol defined by Autoconf in configure.ac can be both removed [2].

This patch also removes unused <assert.h> includes where c files don't
use the `assert()` macro.

Refs:
[1] https://port70.net/~nsz/c/c89/c89-draft.html#4.2
[2] https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/headers.m4
2018-09-09 09:43:03 +02:00
Peter Kokot
29dc0470c8
Remove AC_FUNC_UTIME_NULL
Autoconf 2.59d (released in 2006) [1] started promoting several macros
as not relevant for newer systems, including the AC_FUNC_UTIME_NULL.

This macro checks if `utime(file, NULL)` sets file's timestamp to the
current time and defines the `HAVE_UTIME_NULL` symbol. This check was
relevant on very old systems (for example, 4.3BSD released in 1986) and
today can be omitted for systems with utime since it should be well
supported by now. [2]

Refs:
[1] http://git.savannah.gnu.org/cgit/autoconf.git/tree/NEWS
[2] https://www.gnu.org/software/autoconf/manual/autoconf-2.69/autoconf.html
2018-09-04 12:03:34 +02:00
Peter Kokot
eff22dc511
Remove AC_HEADER_DIRENT
Autoconf 2.59d (released in 2006) [1] started promoting several macros
as not relevant for newer systems anymore, including the `AC_HEADER_DIRENT`.

This macro checks which header defines the `DIR` type. If `<dirent.h>`
is available it defines the `HAVE_DIRENT_H` symbol. Since the `<dirent.h>`
header is already checked in the `configure.ac`, this check is not needed
anymore. This macro also additionally checks for SCO Xenix (discontinued,
latest release 1989) dir and x libraries. [2]

Commit 6ed790685f introduced also
`<sys/dir.h>`. This header exists from times of UNIX System V and
provided definition of DIR type on these systems such as 4.3BSD.
Today `<sys/dir.h>` is kept for backwards compatibility and includes
the `<dirent.h>` on current systems. With `dirent.h>` present this
include is no longer required.

Refs:
[1] http://git.savannah.gnu.org/cgit/autoconf.git/tree/NEWS
[2] https://www.gnu.org/software/autoconf/manual/autoconf-2.69/autoconf.html

Remove unused dirent.h includes
2018-09-04 12:01:24 +02:00
Joe Watkins
efbc05a5a8
Merge branch 'PHP-7.3'
* PHP-7.3:
  Fix bug #74764 and add a test case
2018-09-04 11:14:57 +02:00
Joe Watkins
6b5e7e6b42
Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix bug #74764 and add a test case
2018-09-04 11:13:14 +02:00
Joe Watkins
21f8cd2a92
Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix bug #74764 and add a test case
2018-09-04 11:12:39 +02:00
Ville Hukkamaki
0f724453c0
Fix bug #74764 and add a test case 2018-09-04 11:12:04 +02:00
Anatol Belski
2476fb76a7 Fixed bug #76833, backport change to stream_socket_enable_crypto-win32.phpt from 7.3
It would probably be better to remove this test as it's too much
maintanance for a little gain.
2018-09-04 10:53:35 +02:00
Nikita Popov
e48e9c0002 Merge branch 'PHP-7.3' 2018-09-04 04:58:44 +02:00
Nikita Popov
6122f67492 Merge branch 'PHP-7.2' into PHP-7.3 2018-09-04 04:57:13 +02:00
Nikita Popov
fcf78dfb89 Merge branch 'PHP-7.1' into PHP-7.2 2018-09-04 04:55:15 +02:00
Ville Hukkamaki
742783c3ee Fixed bug #73457
Correctly report errors when opening FTP data connection.
2018-09-04 04:53:38 +02:00
Gabriel Caruso
6dd9fad0c0
Revert changes in test file
This reverts changes made in 2f700384 and 4fcaebba. This test is
supposed to run
only on Windows indeed, as in a Unix environment with a mail server
configured,
an email will be send. On Windows, only emptying the SMTP ini directives
is enough.
2018-08-31 08:48:48 -03:00
Gabriel Caruso
4fcaebbab8
Fix tests in some builds
Looks like the EXPECTREGEX was eating the =DONE= section
2018-08-31 08:09:14 -03:00
Peter Kokot
cbc785dc8c Remove AC_STRUCT_TM macro
Autoconf 2.59d (released in 2006) [1] started promoting several macros
as not relevant for newer systems anymore, including the `AC_STRUCT_TM`.

This macro checks if `struct tm` is defined in either `<sys/time.h>` or
`<time.h>` and defines the `TM_IN_SYS_TIME` symbol accordingly. This
check was relevant in times before the C89 for some embedded systems,
microcontrollers or very old systems. For newer systems it can be
avoided and the `<time.h>` should be included instead since current
systems should be well supported by now. [2]

Since PHP requires at least C89, this patch removes the obsolescent call
and time.h checks.

Refs:

- [1]: http://git.savannah.gnu.org/cgit/autoconf.git/tree/NEWS
- [2]: https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Particular-Structures.html
2018-08-29 21:22:47 +02:00
Gabriel Caruso
2f7003847d
Make more tests run on Linux 2018-08-28 21:20:00 -03:00
Anatol Belski
8b4b41696e Merge branch 'PHP-7.3'
* PHP-7.3:
  Fixed bug #76803 ftruncate changes file pointer
2018-08-28 15:43:34 +02:00
Anatol Belski
7728160784 Fixed bug #76803 ftruncate changes file pointer 2018-08-28 15:42:39 +02:00
Anatol Belski
e42e8b1051 Refactor stat implementation
- move relevant parts into win32
- general cleanup
- use Windows API and fallback to POSIX
- improve filetime to timestamp conversion
- improve stat/fsat
- handle ino by using file index
- handle st_dev by using volume serial number

The inode implementation is based on file indexes from NTFS. On 32-bit,
fake inodes are shown, that may lead to unexpeted results. 64-bit
implementation is most reliable.
2018-08-26 22:30:06 +02:00
Peter Kokot
3ceecaa9a0 Replace HAVE_ST_BLOCKS with HAVE_STRUCT_STAT_ST_BLOCKS
Since Autoconf 2.50+ macro AC_STRUCT_ST_BLOCKS defines the new
HAVE_STRUCT_STAT_ST_BLOCKS symbol and has deprecated the previous
HAVE_ST_BLOCKS.

PHP 5.3 required Autoconf 2.13 (released in 1999) or newer, since PHP
5.4 the autoconf 2.59 (released in 2003) or newer was required, and
since PHP 7.2, autoconf 2.64 (released in 2008) or newer is required.
2018-08-24 18:33:23 +02:00
Christoph M. Becker
4bf1d0b3a4 Merge branch 'PHP-7.3'
* PHP-7.3:
  Simplify regression test
2018-08-23 12:52:31 +02:00
Christoph M. Becker
5fe8e49baa Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Simplify regression test
2018-08-23 12:51:11 +02:00
Christoph M. Becker
1c3d5659bd Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Simplify regression test
2018-08-23 12:49:26 +02:00
Christoph M. Becker
6644bd005f Simplify regression test
There's no need to actually try to trigger an out-of-memory condition
to proof the leak; instead we can simply rely on the Zend MM to report
the memory leaks in debug mode (at least on Linux).  Therefore we
simplify the regression test, which also makes it run much faster.
2018-08-23 12:48:09 +02:00
Christoph M. Becker
4b5d26596a Merge branch 'PHP-7.3'
* PHP-7.3:
  Increase memory_limit to prevent test failures
2018-08-22 14:32:04 +02:00
Christoph M. Becker
6cf382b667 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Increase memory_limit to prevent test failures
2018-08-22 14:31:36 +02:00
Christoph M. Becker
10661e28d1 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Increase memory_limit to prevent test failures
2018-08-22 14:30:23 +02:00
Christoph M. Becker
5fb01a3a42 Increase memory_limit to prevent test failures 2018-08-22 14:29:28 +02:00
Christoph M. Becker
5aac8fdbfc Merge branch 'PHP-7.3'
* PHP-7.3:
  Fix #76778: array_reduce leaks memory if callback throws exception
2018-08-22 13:51:55 +02:00
Christoph M. Becker
1de17428f6 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #76778: array_reduce leaks memory if callback throws exception
2018-08-22 13:51:16 +02:00
Christoph M. Becker
cdd9eb8c4a Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix #76778: array_reduce leaks memory if callback throws exception
2018-08-22 13:49:35 +02:00
Christoph M. Becker
70b2fca220 Fix #76778: array_reduce leaks memory if callback throws exception
We have to release the result variable in the error case, too.
2018-08-22 13:40:24 +02:00
Dmitry Stogov
93f9ee7217 Use zend_class_entry/zend_function type names instead of _zend_class_entry/_zend_function tags. 2018-08-22 14:01:14 +03:00
Nikita Popov
5e74a1f411 Merge branch 'PHP-7.3' 2018-08-21 06:27:27 +02:00
David Carlier
16a9dd74f4 Avoid directly adding to string literal
This fixes a Clang warning.
2018-08-21 06:25:41 +02:00
Gabriel Caruso
c86ce117c2
Merge branch 'PHP-7.3'
* PHP-7.3:
  Make array parsing parameters error messages consistency with ZPP failure
2018-08-19 21:33:41 -03:00
Gabriel Caruso
efbf846fd2
Make array parsing parameters error messages consistency with ZPP failure 2018-08-19 21:27:57 -03:00
Xinchen Hui
e81b0b29d3 Merge branch 'PHP-7.3'
* PHP-7.3:
  Fixed same bug #76755 in setrawcookie
2018-08-17 16:20:37 +08:00
Xinchen Hui
5c1a2d8375 Fixed same bug #76755 in setrawcookie 2018-08-17 16:19:26 +08:00
Xinchen Hui
3ca89ba007 Merge branch 'PHP-7.3'
* PHP-7.3:
  Cheaper checking
2018-08-17 15:22:50 +08:00
Xinchen Hui
0a16af043e Cheaper checking 2018-08-17 15:21:48 +08:00
Xinchen Hui
13658428a2 Merge branch 'PHP-7.3'
* PHP-7.3:
  Micro optimization & fixed invalid key handling
2018-08-17 14:56:43 +08:00
Xinchen Hui
751bbaa41f Micro optimization & fixed invalid key handling 2018-08-17 14:56:24 +08:00
Xinchen Hui
ed0c581808 Merge branch 'PHP-7.3'
* PHP-7.3:
  Fixed bug #76755 (setcookie does not accept "double" type for expire time)
2018-08-17 13:46:08 +08:00
Xinchen Hui
d61ff37f45 Fixed bug #76755 (setcookie does not accept "double" type for expire time) 2018-08-17 13:45:43 +08:00
Anatol Belski
2dfb74682f Merge branch 'PHP-7.3'
* PHP-7.3:
  Sync with e0fe6674
2018-08-13 09:22:07 +02:00
Anatol Belski
fdaa540fd8 Sync with e0fe6674 2018-08-13 09:18:38 +02:00
Gabriel Caruso
84b195d9fc Fix some misspellings 2018-08-12 16:15:45 +02:00
Christoph M. Becker
9ea7d259ef Merge branch 'PHP-7.3'
* PHP-7.3:
  Fix #76688: Disallow excessive parameters after options array
2018-08-12 15:49:46 +02:00
Pedro Magalhães
a16aee6cee Fix #76688: Disallow excessive parameters after options array 2018-08-12 15:49:13 +02:00
Peter Kokot
f689223b4e Merge branch 'PHP-7.3'
* PHP-7.3:
  Fix bug #76030 RE2C_FLAGS rarely honoured
2018-08-12 11:16:06 +02:00
Cristian Rodríguez
e0fe667421 Fix bug #76030 RE2C_FLAGS rarely honoured
Since PHP 5.3 the default lexer generator is RE2C. On Unix-alike build
systems there is also optional configure option --enable-re2c-cgoto
which enables optimized conditional jumps using non-standard computed
goto extension. It is available since RE2C 0.10.3 so it's well covered
by RE2C versions PHP uses. This patch syncs usage of -g option accross
the PHP Unix-alike build system.
2018-08-12 11:15:18 +02:00
Xinchen Hui
333cc376c4 Merge branch 'PHP-7.3'
* PHP-7.3:
  Fixed bug #76713 (Segmentation fault caused by property corruption)
2018-08-07 12:36:48 +08:00
Xinchen Hui
2b1d79ce66 Fixed bug #76713 (Segmentation fault caused by property corruption) 2018-08-07 12:36:36 +08:00
Gabriel Caruso
d570b7382d
Fix SKIPIF conditions for online tests
Add when necessary, as well remove when not
2018-08-05 18:28:28 -03:00
Christoph M. Becker
c9861bd7a9 Create and expose php_sys_symlink() and php_sys_link()
These macros are supposed to behave like POSIX's symlink() and link(),
respectively, on POSIX compliant systems and on Windows.

Future scope: merge link.c and link_win32.c
2018-08-02 14:08:30 +02:00
Gabriel Caruso
1fe59810fe
Make test run on non zts builds 2018-08-01 23:14:56 -03:00
Gabriel Caruso
7f9e10f539
Remove invalid SKIPIF sections 2018-08-01 22:39:00 -03:00
Anatol Belski
36857ab52b Fix clang compilation
By usage of -fmodules, all the intrinsic items are loaded automatically.
The headers included come however from Visual Studio, thus bringing some
conflicting declarations. On the other hand, -fmodules is needed to
mitigate linking issues with clang in VS compatibility mode.
2018-08-01 16:19:54 +02:00
Pedro Magalhães
2b58ab23c6 Support for samesite cookies with array syntax
Allows using an alternative array argument with
support for the samesite option on the following
functions:
setcookie
setrawcookie
session_set_cookie_params
2018-07-31 12:40:26 +02:00
Frederik Bosch
08b9310e6d implement same site cookie see https://bugs.php.net/bug.php?id=72230 see https://tools.ietf.org/html/draft-west-first-party-cookies-07 see https://scotthelme.co.uk/csrf-is-dead/ 2018-07-31 12:40:24 +02:00
Dmitry Stogov
c42f0ba4f7 Removed useless IS_UNDEF checks 2018-07-31 12:23:46 +03:00
Peter Kokot
b719aa41f4 Fix minor Autoconf coding style
This fixes two minor Autoconf coding styles. Double quotes in arguments
don't need to be escaped. This removes warning given by autoreconf:
- warning: back quotes and double quotes must not be escaped in...
2018-07-31 03:09:44 +02:00
Gabriel Caruso
9c8b3ae43f
Make more tests run on 64bit plataforms 2018-07-30 09:43:09 -03:00
Gabriel Caruso
d88bbcea82
Remove superfluous SKIPIF sections of always available constants 2018-07-30 00:53:28 -03:00
Peter Kokot
4371945b8b Replace obsolete AC_TRY_FOO with AC_FOO_IFELSE
Autoconf 2.50 released in 2001 made several macros obsolete including
the AC_TRY_RUN, AC_TRY_COMPILE and AC_TRY_LINK:
http://git.savannah.gnu.org/cgit/autoconf.git/tree/ChangeLog.2

These macros should be replaced with the current AC_FOO_IFELSE instead:
- AC_TRY_RUN with AC_RUN_IFELSE and AC_LANG_SOURCE
- AC_TRY_LINK with AC_LINK_IFELSE and AC_LANG_PROGRAM
- AC_TRY_COMPILE with AC_COMPILE_IFELSE and AC_LANG_PROGRAM

PHP 5.4 to 7.1 require Autoconf 2.59+ version, PHP 7.2 and above require
2.64+ version, and the PHP 7.2 phpize script requires 2.59+ version which
are all greater than above mentioned 2.50 version therefore systems
should be well supported by now.

This patch was created with the help of autoupdate script:
autoupdate <file>

Reference docs:
- https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Obsolete-Macros.html
- https://www.gnu.org/software/autoconf/manual/autoconf-2.59/autoconf.pdf
2018-07-30 02:36:38 +02:00
Gabriel Caruso
aac5cdc7d7
Remove superfluous SKIPIF sections of always available interfaces 2018-07-29 18:03:34 -03:00
Gabriel Caruso
1461f8ef0d
Remove superfluous SKIPIF sections of always available functions 2018-07-29 15:42:19 -03:00
Peter Kokot
d2184efb7b Replace obsolete AC_STRUCT_ST_BLKSIZE and AC_STRUCT_ST_RDEV
Autoconf 2.50 released in 2001 has made several macros obsolete. Instead
of the AC_STRUCT_ST_BLKSIZE and AC_STRUCT_ST_RDEV the new
AC_CHECK_MEMBERS should be used.

When checking for the presence of stat struct members st_blkzize and
st_rdev the new AC_CHECK_MEMBERS macro defines new constants
HAVE_STRUCT_STAT_ST_BLKSIZE and HAVE_STRUCT_STAT_ST_RDEV.

Old constants HAVE_ST_BLKSIZE and HAVE_ST_RDEV need to be replaced
respectively in PHP code (this patch) and in PHP extenstions if they use
them.

PHP 5.4 to 7.1 require Autoconf 2.59+ version, PHP 7.2 and above require
2.64+ version, and the PHP 7.2 phpize script requires 2.59+ version which
are all greater than above mentioned 2.50 version.
2018-07-29 13:59:40 +02:00
Peter Kokot
0a01eae039 Fix typo in config.m4
The AC_CHECK_FUNCS has the following synopsis:
AC_CHECK_FUNCS(function..., [action-if-found], [action-if-not-found]).

Fourth argument doesn't exist.
2018-07-29 06:10:16 +02:00
Gabriel Caruso
9e4d590b19
Remove extra semicolons 2018-07-25 21:47:04 -03:00
Peter Kokot
a5e80b22e1 Fix typos in code comments 2018-07-25 11:57:11 +02:00
Dmitry Stogov
a29a800cb0 Regenerate scanners using re2c version >= 1.0.0 (newer version, at least, produce less code) 2018-07-25 12:49:03 +03:00
Peter Kokot
8d3f8ca12a Remove unused Git attributes ident
The $Id$ keywords were used in Subversion where they can be substituted
with filename, last revision number change, last changed date, and last
user who changed it.

In Git this functionality is different and can be done with Git attribute
ident. These need to be defined manually for each file in the
.gitattributes file and are afterwards replaced with 40-character
hexadecimal blob object name which is based only on the particular file
contents.

This patch simplifies handling of $Id$ keywords by removing them since
they are not used anymore.
2018-07-25 00:53:25 +02:00
Christoph M. Becker
dcd6a6ff36 Merge branch 'PHP-7.2'
* PHP-7.2:
  Fix #76643: Segmentation fault when using `output_add_rewrite_var`
2018-07-24 12:41:35 +02:00
Christoph M. Becker
a96ca13963 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix #76643: Segmentation fault when using `output_add_rewrite_var`
2018-07-24 12:28:22 +02:00
Christoph M. Becker
40bd84d3e3 Fix #76643: Segmentation fault when using output_add_rewrite_var
We have to check whether _SERVER is actually an array before we're
going to use it as such.
2018-07-24 12:20:13 +02:00
Xinchen Hui
1638a6e118 Give a meaningful name 2018-07-24 12:51:36 +08:00
Xinchen Hui
4aada3993c Micro-optmization 2018-07-24 12:16:35 +08:00
Xinchen Hui
3ca9aaf24e Merge branch 'PHP-7.2'
* PHP-7.2:
  Update NEWs
  Fixed bug #68553 (array_column: null values in $index_key become incrementing keys in result)

Conflicts:
	ext/standard/array.c
2018-07-24 11:37:09 +08:00
Xinchen Hui
2a181b5ea0 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #68553 (array_column: null values in $index_key become incrementing keys in result)
2018-07-24 11:35:22 +08:00
Xinchen Hui
38d97557da Fixed bug #68553 (array_column: null values in $index_key become incrementing keys in result) 2018-07-24 11:34:57 +08:00
Dmitry Stogov
7ef8e3f87f Fixed tests 2018-07-23 17:00:33 +03:00
Dmitry Stogov
d4e60a1ffd Avoid code duplication 2018-07-23 16:53:44 +03:00
Dmitry Stogov
b121405960 Use better destructor (key may be only IS_STRING or IS_LONG). 2018-07-23 15:57:06 +03:00
Gabriel Caruso
c93aba042f
Give a reason why the test was skipped
This will help us debug why a test was skipped in GCOV
(http://gcov.php.net/viewer.php?version=PHP_HEAD&func=skip), and maybe
put them to run again
2018-07-22 16:41:41 -03:00
Nikita Popov
4a5b2101e5 Deprecate string.strip_tags filter
Part of https://wiki.php.net/rfc/deprecations_php_7_3.
2018-07-21 22:38:39 +02:00
Nikita Popov
d9acfa45b8 Deprecate fgetss() and gzgetss()
SplFileObject::fgetss() will also generate a deprecation notice
through an internal call to fgetss().

Part of RFC https://wiki.php.net/rfc/deprecations_php_7_3.
2018-07-21 22:38:35 +02:00
Nikita Popov
f4a9da389b Deprecate non-string needles in string search functions
Part of https://wiki.php.net/rfc/deprecations_php_7_3.
2018-07-21 22:34:09 +02:00
Christoph M. Becker
9f957fd303 Improve implementation of array_key_first() and array_key_last()
Firstly, we must not separate the $stack argument for performance
reasons.  Secondly, we prefer `Z_ARRVAL_P` over `HASH_OF` to clarify
our intention.

Thanks to Nikita, for catching these issues!
2018-07-17 11:53:06 +02:00
Enno Woortmann
50516a6e1f Add implementation and tests for new methods - array_key_first(array $a) Returns the key of the first element or null - array_key_last(array $a) Returns the key of the last element or null 2018-07-17 11:31:00 +02:00
Stanislav Malyshev
28d8b8de71 Merge branch 'PHP-7.2'
* PHP-7.2:
  Fixed bug #76459 windows linkinfo lacks openbasedir check
  Add NEWS
  Fixed bug #76459 windows linkinfo lacks openbasedir check
  Fix bug #76557: heap-buffer-overflow (READ of size 48) while reading exif data
  Fix bug #76423 - Int Overflow lead to Heap OverFlow in exif_thumbnail_extract of exif.c
2018-07-16 16:54:31 -07:00
Stanislav Malyshev
a536d6d61b Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #76459 windows linkinfo lacks openbasedir check
  Add NEWS
  Fixed bug #76459 windows linkinfo lacks openbasedir check
  Fix bug #76557: heap-buffer-overflow (READ of size 48) while reading exif data
  Fix bug #76423 - Int Overflow lead to Heap OverFlow in exif_thumbnail_extract of exif.c
2018-07-16 16:53:57 -07:00
Stanislav Malyshev
4e92cd172a Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #76459 windows linkinfo lacks openbasedir check
  Add NEWS
  Fixed bug #76459 windows linkinfo lacks openbasedir check
  Fix bug #76557: heap-buffer-overflow (READ of size 48) while reading exif data
  Fix bug #76423 - Int Overflow lead to Heap OverFlow in exif_thumbnail_extract of exif.c
2018-07-16 16:52:36 -07:00
Anatol Belski
f151e048ed Fixed bug #76459 windows linkinfo lacks openbasedir check 2018-07-16 15:11:56 -07:00
Anatol Belski
289cb0f77c Fixed bug #76459 windows linkinfo lacks openbasedir check 2018-07-16 14:21:02 -07:00
Nikita Popov
a632ecd224 Remove use of case-insensitive constants in tests 2018-07-16 19:16:55 +02:00
Dmitry Stogov
5cf6474277 Flatten strip_tags state machine (GCC overoptimized this function, producing enormpous amount of code). 2018-07-16 13:22:17 +03:00
Gabriel Caruso
59456974f2
Test http_response_code function 2018-07-15 23:51:16 -03:00