Commit Graph

669 Commits

Author SHA1 Message Date
Nikita Popov
a31f46421d Allow exceptions in __toString()
RFC: https://wiki.php.net/rfc/tostring_exceptions

And convert some object to string conversion related recoverable
fatal errors into Error exceptions.

Improve exception safety of internal code performing string
conversions.
2019-06-05 14:25:07 +02:00
Peter Kokot
83e565e244 [ci skip] Migrate tests READMEs to Markdown 2019-05-12 22:03:10 +02:00
Peter Kokot
75fb74860d Normalize comments in *nix build system m4 files
Normalization include:
- Use dnl for everything that can be ommitted when configure is built in
  favor of the shell comment character # which is visible in the output.
- Line length normalized to 80 columns
- Dots for most of the one line sentences
- Macro definitions include similar pattern header comments now
2019-05-12 18:43:03 +02:00
Peter Kokot
caea088ac7 Remove PHP_SETUP_KERBEROS m4 macro
With recent transition to pkg-config/pkgconf this macro has been now a
simple wrapper for PKG_CHECK_MODULES and PHP_EVAL_INCLINE so it's better
to omit it altogether and use these two in the *.m4 code directly.
2019-04-20 16:12:54 +02:00
Hugh McMaster
aba72ebf15 Use PKG_CHECK_MODULES to detect the kerberos libraries 2019-04-20 15:13:24 +02:00
Nikita Popov
ce5e5b0aa3 Use release for regex in imap
The regex may be used as a cache key now.
2019-04-10 10:01:49 +02:00
Nikita Popov
275fa53564 Accept zend_string* instead of char* in php_pcre_match_impl() 2019-03-18 12:32:06 +01:00
Fabien Villepinte
26dfce7f36 Replace dirname(__FILE__) by __DIR__ in tests 2019-03-15 22:55:30 +01:00
Dmitry Stogov
f1b306fe11 Switch to use ZTS cache 2019-03-12 14:15:47 +03:00
Peter Kokot
9df6a1e4dd Add AS_HELP_STRING to *nix build configure options
The Autoconf's default AS_HELP_STRING macro can properly format help
strings [1] so watching out if columns are aligned manually is not
anymore.

[1] https://www.gnu.org/software/autoconf/manual/autoconf.html#Pretty-Help-Strings
2019-03-07 20:36:59 +01:00
Nikita Popov
8bc663f43b Remove zpp variation tests 2019-02-05 09:38:55 +01:00
Peter Kokot
92ac598aab Remove local variables
This patch removes the so called local variables defined per
file basis for certain editors to properly show tab width, and
similar settings. These are mainly used by Vim and Emacs editors
yet with recent changes the once working definitions don't work
anymore in Vim without custom plugins or additional configuration.
Neither are these settings synced across the PHP code base.

A simpler and better approach is EditorConfig and fixing code
using some code style fixing tools in the future instead.

This patch also removes the so called modelines for Vim. Modelines
allow Vim editor specifically to set some editor configuration such as
syntax highlighting, indentation style and tab width to be set in the
first line or the last 5 lines per file basis. Since the php test
files have syntax highlighting already set in most editors properly and
EditorConfig takes care of the indentation settings, this patch removes
these as well for the Vim 6.0 and newer versions.

With the removal of local variables for certain editors such as
Emacs and Vim, the footer is also probably not needed anymore when
creating extensions using ext_skel.php script.

Additionally, Vim modelines for setting php syntax and some editor
settings has been removed from some *.phpt files.  All these are
mostly not relevant for phpt files neither work properly in the
middle of the file.
2019-02-03 21:03:00 +01:00
Zeev Suraski
0cf7de1c70 Remove yearly range from copyright notice 2019-01-30 11:03:12 +02:00
Dmitry Stogov
22c9d19144 Removed useless zval_ptr_dtor(return_value) 2018-12-26 12:58:11 +03:00
Stanislav Malyshev
c3ca95dad2 Merge branch 'PHP-7.3'
* PHP-7.3:
  Fix bug #77143 - add more checks to buffer reads
  Fix bug #77143 - add more checks to buffer reads
  Fix #77020: null pointer dereference in imap_mail
2018-12-03 00:43:00 -08:00
Stanislav Malyshev
3d8d13f7b9 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix bug #77143 - add more checks to buffer reads
  Fix bug #77143 - add more checks to buffer reads
  Fix #77020: null pointer dereference in imap_mail
  Don't need interactive progress on git clones in Travis
  Fix TSRM signature - php_stream_stat macro has it's own TSRM
  Regenerate certificates for openssl tests
  Improve test for bug77022
2018-12-03 00:42:55 -08:00
Stanislav Malyshev
8fff90250b Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix bug #77143 - add more checks to buffer reads
  Fix bug #77143 - add more checks to buffer reads
  Fix #77020: null pointer dereference in imap_mail
2018-12-03 00:42:50 -08:00
Stanislav Malyshev
8ab5d22332 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix bug #77143 - add more checks to buffer reads
  Fix bug #77143 - add more checks to buffer reads
  Fix #77020: null pointer dereference in imap_mail
2018-12-03 00:42:45 -08:00
Stanislav Malyshev
66a0f061f6 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fix bug #77143 - add more checks to buffer reads
  Fix #77020: null pointer dereference in imap_mail
2018-12-03 00:39:03 -08:00
Stanislav Malyshev
7edc639b9f Fix #77020: null pointer dereference in imap_mail
If an empty $message is passed to imap_mail(), we must not set message
to NULL, since _php_imap_mail() is not supposed to handle NULL pointers
(opposed to pointers to NUL).
2018-12-03 00:00:56 -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
Stanislav Malyshev
7f34c9ea7d Merge branch 'PHP-7.3'
* PHP-7.3:
  Add DISPLAY_INI_ENTRIES for imap
  Disable rsh/ssh functionality in imap by default (bug #77153)
  Disable rsh/ssh functionality in imap by default (bug #77153)
2018-11-28 15:47:14 -08:00
Stanislav Malyshev
3f165e8ca3 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Add DISPLAY_INI_ENTRIES for imap
  Disable rsh/ssh functionality in imap by default (bug #77153)
  Disable rsh/ssh functionality in imap by default (bug #77153)
2018-11-28 15:47:07 -08:00
Stanislav Malyshev
4ac764e8bb Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Add DISPLAY_INI_ENTRIES for imap
  Disable rsh/ssh functionality in imap by default (bug #77153)
  Disable rsh/ssh functionality in imap by default (bug #77153)
2018-11-28 15:47:00 -08:00
Stanislav Malyshev
223b8c15a8 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Add DISPLAY_INI_ENTRIES for imap
  Disable rsh/ssh functionality in imap by default (bug #77153)
  Disable rsh/ssh functionality in imap by default (bug #77153)
2018-11-28 15:46:53 -08:00
Stanislav Malyshev
87bf84c8c7 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Add DISPLAY_INI_ENTRIES for imap
2018-11-28 15:46:39 -08:00
Stanislav Malyshev
d8765852e0 Add DISPLAY_INI_ENTRIES for imap 2018-11-28 15:45:51 -08:00
Stanislav Malyshev
d4797f836e Disable rsh/ssh functionality in imap by default (bug #77153) 2018-11-20 11:21:29 -08:00
Stanislav Malyshev
44b08a9802 Disable rsh/ssh functionality in imap by default (bug #77153) 2018-11-20 11:19:45 -08:00
Stanislav Malyshev
336d2086a9 Disable rsh/ssh functionality in imap by default (bug #77153) 2018-11-20 11:18:53 -08:00
Stanislav Malyshev
05782f01f5 Disable rsh/ssh functionality in imap by default (bug #77153) 2018-11-20 11:16:08 -08:00
Stanislav Malyshev
628df47e79 Disable rsh/ssh functionality in imap by default (bug #77153) 2018-11-20 11:14:07 -08:00
Stanislav Malyshev
e5bfea64c8 Disable rsh/ssh functionality in imap by default (bug #77153) 2018-11-20 00:13:50 -08:00
Dmitry Stogov
6bb94eacd7 Fixed tests 2018-11-13 17:00:06 +03: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
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