Commit graph

603 commits

Author SHA1 Message Date
Nikita Popov
4f28bbda51 Fix SOAP bailout handling
This code was reusing the _bailout variable from
SOAP_CLIENT_BEGIN/END_CODE(). As _bailout is not volatile, modifying
it after the setjmp call and then reading it back on return is
illegal. Use a separate local bailout variable instead.

This fixes the miscompile introduced by marking zend_bailout() as
noreturn.
2019-04-12 12:51:17 +02:00
Nikita Popov
6bfb119e18 Remove some unnecessary error handler setting
A few non-standard exceptions thrown on zpp failures will change to
TypeError due to this.
2019-03-11 11:32:20 +01:00
Peter Kokot
623911f993 Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove local variables
2019-02-03 21:23:18 +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
Zeev Suraski
38c337f22e Remove year range from copyright notice 2019-01-30 11:00:23 +02:00
Nikita Popov
371e4270b7 Migrate SOAP away from legacy constructors 2019-01-29 13:04:20 +01:00
Nikita Popov
e219ec144e Implement typed properties
RFC: https://wiki.php.net/rfc/typed_properties_v2

This is a squash of PR #3734, which is a squash of PR #3313.

Co-authored-by: Bob Weinand <bobwei9@hotmail.com>
Co-authored-by: Joe Watkins <krakjoe@php.net>
Co-authored-by: Dmitry Stogov <dmitry@zend.com>
2019-01-11 15:49:06 +01:00
Xinchen Hui
1f74300138 Merge branch 'PHP-7.3'
* PHP-7.3:
  Fixed bug #77088 (Segfault when using SoapClient with null options)
  Fixed proto & folder mark
2018-11-21 11:30:42 +08:00
Xinchen Hui
aaafd793e6 Fixed bug #77088 (Segfault when using SoapClient with null options)
SoapClient constructor has its own error handler
2018-11-21 11:30:32 +08:00
Xinchen Hui
efeb810a3d Fixed proto & folder mark 2018-11-21 11:18:48 +08:00
Dmitry Stogov
0f7f1498be Use ZEND_THIS macro to hide implementation details in extensions code. 2018-11-15 19:54:19 +03:00
Dmitry Stogov
c6ad0b92b7 Replace getThis() by EX(This), when additional check is not necessary. 2018-11-14 02:44:25 +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
Dmitry Stogov
0df57480b6 Remove zend_hash_exists() 2018-09-19 13:54:02 +03: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
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
Dmitry Stogov
83f6f8563c Use zval_ptr_dtor() instead of legacy zval_dtor(), to destroy unused values returned from PHP functions (they may be circular data structures). 2018-07-05 14:09:47 +03:00
Dmitry Stogov
b6fb584505 Replace zval_dtor() with specialized destructors 2018-07-05 13:32:39 +03:00
Dmitry Stogov
6e77a60a75 Removed INIT_OVERLOADED_CLASS... macros 2018-06-29 14:41:35 +03:00
Dmitry Stogov
d90c6f2443 Removed useless zval_ptr_dtor() 2018-05-29 17:58:06 +03:00
Dmitry Stogov
5eb1f92f31 Use zend_string_release_ex() instread of zend_string_release() in places, where we sure about string persistence. 2018-05-28 16:27:12 +03:00
Anatol Belski
5a485b1f43 Merge branch 'PHP-7.2'
* PHP-7.2:
  Reduce var scope
2018-03-14 23:11:02 +01:00
Anatol Belski
84881c654e Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Reduce var scope
2018-03-14 23:10:24 +01:00
Anatol Belski
efd0e7222b Reduce var scope 2018-03-14 22:59:54 +01:00
Anatol Belski
ddceba9f13 Merge branch 'PHP-7.2'
* PHP-7.2:
  Fix stack use after scope
2018-03-14 22:23:38 +01:00
Anatol Belski
783778b9d3 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix stack use after scope
2018-03-14 22:23:04 +01:00
Anatol Belski
7bcd55c264 Fix stack use after scope 2018-03-14 22:21:43 +01:00
Christoph M. Becker
ef255c9f0f Revert "[ci skip] Add missing return types to protos"
This reverts commit a2c7c46d5e.

Since apparently there have been some mistakes in this commit, and it's
not clear yet how to solve them, we're reverting for now.
2018-02-27 17:40:03 +01:00
Gabriel Caruso
5f54f48024 [ci skip] Remove space between function name and open parentheses 2018-02-24 11:50:39 +01:00
Gabriel Caruso
a2c7c46d5e [ci skip] Add missing return types to protos 2018-02-24 11:45:17 +01:00
Dmitry Stogov
515b0508e0 Use ZVAL_COPY() instead og ZVAL_DUP(), because fault is an object 2018-01-17 17:48:36 +03:00
Dmitry Stogov
c5c9a69447 Use ZVAL_DUP() instead of zval_copy_ctor() 2018-01-17 14:59:15 +03:00
Gabriel Caruso
6400264856 Trailing whitespaces
Signed-off-by: Gabriel Caruso <carusogabriel34@gmail.com>
2018-01-03 14:38:00 +01:00
Xinchen Hui
a6519d0514 year++ 2018-01-02 12:57:58 +08:00
Xinchen Hui
7a7ec01a49 year++ 2018-01-02 12:55:14 +08:00
Xinchen Hui
ccd4716ec7 year++ 2018-01-02 12:53:31 +08:00
Nikita Popov
3237336985 Merge branch 'PHP-7.1' into PHP-7.2 2017-12-22 17:50:04 +01:00
Anton Artamonov
0246373788 Fixed bug #70469
Don't generate an E_ERROR if we've already thrown an exception.
This interacts badly with error_get_last() checks.
2017-12-22 17:47:54 +01:00
Dmitry Stogov
9e709e2fa0 Move constants into read-only data segment 2017-12-14 18:43:44 +03:00
Dmitry Stogov
084c17fe0b Use zend_string_tolower() where it's possible (to avoid reallocations).
Allow zend_string_tolower_ex() to create parsistent strings
2017-11-30 01:13:39 +03:00
Anton Artamonov
1dfcd1af9a Fixed bug #70469
Don't generate an E_ERROR if we've already thrown an exception.
This interacts badly with error_get_last() checks.
2017-11-22 23:15:46 +01:00
Joe Watkins
06606ab4be
Merge branch 'PHP-7.2'
* PHP-7.2:
  Fix bug #75464 Wrong reflection on SoapClient::__setSoapHeaders
2017-10-30 14:15:29 +00:00
Joe Watkins
118db2d2f7
Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix bug #75464 Wrong reflection on SoapClient::__setSoapHeaders
2017-10-30 14:14:21 +00:00
Joe Watkins
5262bd9ea3
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix bug #75464 Wrong reflection on SoapClient::__setSoapHeaders
2017-10-30 14:13:31 +00:00
Fabien Villepinte
a308000ff2
Fix bug #75464 Wrong reflection on SoapClient::__setSoapHeaders 2017-10-30 14:13:05 +00:00
Fabien Villepinte
97ff1c9243
Fix bug #75461 Wrong reflection on SoapServer:setClass 2017-10-30 14:11:15 +00:00
Anatol Belski
cbc8f8327f Simplify tsrm cache update 2017-10-22 11:57:35 +02:00
Dmitry Stogov
44e0b79ac6 Refactored array creation API. array_init() and array_init_size() are converted into macros calling zend_new_array(). They are not functions anymore and don't return any values. 2017-09-20 02:25:56 +03:00