Commit graph

387 commits

Author SHA1 Message Date
Max Semenik
2b5de6f839
Remove proto comments from C files
Closes GH-5758
2020-07-06 21:13:34 +02:00
Máté Kocsis
596561009c
Fix some UNKNOWN default values
In ext/ffi, ext/intl, ext/mysqli, and ext/pcntl
2020-06-09 09:46:51 +02:00
George Peter Banyard
82afcf4401 Fix [-Wundef] warning in MySQLi extension 2020-05-18 00:37:19 +02:00
Máté Kocsis
3ebce8e9fc
Fix UNKNOWN default values in various extensions
Closes GH-5514
2020-05-05 19:08:20 +02:00
Nikita Popov
8597ec00d4 Remove support for libmysqlclient 5.0
Closes GH-5391.
2020-04-23 10:38:20 +02:00
Nikita Popov
a866ef88ed Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix MySQL local infile / attr handling on big endian systems
2020-04-16 11:23:11 +02:00
Nikita Popov
f684553c2c Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix MySQL local infile / attr handling on big endian systems
2020-04-16 11:22:43 +02:00
guirish
a1c1736bfb Fix MySQL local infile / attr handling on big endian systems
Make sure pointer types match what is used by libmysql everywhere.

Closes GH-5380.
2020-04-16 11:22:17 +02:00
Nikita Popov
d4471c6aae Remove int6store()
The implementation is broken (syntactically). As it's not used
anyway, I'm just dropping it instead.
2020-04-14 10:37:37 +02:00
Tom Van Looy
fabe6a310c Add ext/mysqli stubs
Closes GH-4913.
2020-02-25 11:06:46 +01:00
Máté Kocsis
d1764ca330
Make error messages more consistent by fixing capitalization
Closes GH-5066 As a first step, let's capitalize their initial letter when it is applicable.
2020-01-17 14:52:46 +01:00
Máté Kocsis
afdaa91170
Fix #78880: Final spelling fixes 2020-01-16 19:14:31 +01:00
Máté Kocsis
7b4a4d2ace
Use RETURN_THROWS() after try_convert_to_string() 2020-01-03 17:04:06 +01:00
Máté Kocsis
1b93cfee0c
Use RETURN_THROWS() after zend_parse_method_parameters() 2020-01-02 23:01:37 +01:00
Máté Kocsis
345703724c
Use RETURN_THROWS() during ZPP in most of the extensions
Except for some bigger ones: reflection, sodium, spl
2019-12-31 11:46:11 +01:00
Christoph M. Becker
55fd97c576 Fix #78790: mysqli_get_client_info() expects exactly 0 parameters, 1 given
Although the `mysqli` parameter is unused, it had been accepted so far,
and the documentation even claims that parameter would be required.  To
not break BC, we allow it again.
2019-12-30 17:40:16 +01:00
Christoph M. Becker
b0391c3e26 Revert "Fix #78790: mysqli_get_client_info() expects exactly 0 parameters"
This reverts commit 87fad8cdf0, since,
apparently, `mysqli_get_client_info()` is also supposed to be called
without argument.
2019-11-11 10:06:21 +01:00
Christoph M. Becker
87fad8cdf0 Fix #78790: mysqli_get_client_info() expects exactly 0 parameters
`mysqli_get_client_info()` and `mysqli_thread_safe()` can also be
called as methods, so we have to cater to this when parsing the
arguments.
2019-11-11 10:01:17 +01:00
Máté Kocsis
2204dbde3b Add missing ZPP checks
Closes GH-4878.
2019-11-01 15:26:52 +01:00
Gabriel Caruso
5d6e923d46
Remove mention of PHP major version in Copyright headers
Closes GH-4732.
2019-09-25 14:51:43 +02:00
George Peter Banyard
c072ef71ee Merge branch 'PHP-7.4'
* PHP-7.4:
  Drop E_STRICT notice in mysqli extension
2019-08-31 23:17:21 +02:00
George Peter Banyard
e895e96286 Drop E_STRICT notice in mysqli extension 2019-08-31 23:14:10 +02:00
Peter Kokot
ccac19ed6c Merge branch 'PHP-7.4'
* PHP-7.4:
  Small typo and proto name fix
2019-07-15 18:15:58 +02:00
George Peter Banyard
548d1ec27c Small typo and proto name fix
Closes GH-4415
2019-07-15 18:15:17 +02:00
Nikita Popov
0a0ca984f0 Merge branch 'PHP-7.4' 2019-06-28 14:48:08 +02:00
Sebastian Pop
70ef87539d Fix compilation errors when building against libmysql
Closes GH-4316.
2019-06-28 14:46:12 +02:00
Andrey Hristov
c7e5699c42 Merge branch 'PHP-7.4' 2019-06-19 18:20:42 +03:00
Andrey Hristov
65915d44cb Merge branch 'PHP-7.3' into PHP-7.4 2019-06-19 16:43:15 +03:00
Andrey Hristov
7ba1e6b34d Merge branch 'PHP-7.2' into PHP-7.3 2019-06-19 16:43:06 +03:00
Andrey Hristov
82021ad9df Fix version comparison 2019-06-19 16:42:43 +03:00
twosee
63171d88f2 Add do...while(0) for RETURN_* and ZVAL_* APIs
Closes GH-4255.
2019-06-12 16:17:16 +02:00
Nikita Popov
83e0bfb50c Merge branch 'PHP-7.3' into PHP-7.4 2019-06-11 15:41:05 +02:00
Tyson Andre
5d3e3a62a2 Be more precise about possible types for mysqli methods
mysqli has an uncommon approach to 64-bit compatibility:
it will convert numbers that can't be represented on 32-bit
platforms to a string.
This is documented at
https://www.php.net/manual/en/mysqli-stmt.affected-rows.php#refsect1-mysqli-stmt.affected-rows-returnvalues

So if there's a query to a remote mysqli server that affects
more than 2.2 billion rows, then the opcache inference might be
incorrect.

(It's possible to add a MAY_BE_STRING_ON_32_BIT_PLATFORM bitflag macro to
account for this, but I don't think there's a need or want to?)

Patches 3162285b86

This is based on the list of php 7.4 functions using
MYSQLI_RETURN_LONG_INT in mysqli_api.c
2019-06-11 15:40:33 +02:00
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
Dmitry Stogov
e188e4170f Use ZEND_TRY_ASSIGN_REF_... macros for arguments passed to internal function by reference 2019-04-24 18:28:29 +03: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
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
Peter Kokot
a5e80b22e1 Fix typos in code comments 2018-07-25 11:57:11 +02: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
Gabriel Caruso
5f54f48024 [ci skip] Remove space between function name and open parentheses 2018-02-24 11:50:39 +01:00
Gabriel Caruso
1314f0fb3a Use int instead of long in protos 2018-02-23 11:06:20 +01:00
Dmitry Stogov
ffa16693a7 A cheaper way to clone reference value. 2018-01-17 10:59:50 +03: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
Dmitry Stogov
69462bdf4c Embeded zend_list into st_mysqlnd_error_info, to avoid extra allocation/deallocation. 2017-11-15 00:53:51 +03:00
Joe Watkins
2b5886a885
Merge branch 'PHP-7.2'
* PHP-7.2:
  minor loop optimizations, closes #2633
2017-07-25 06:54:29 +01:00
Joe Watkins
8d5a5fbf6b
Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  minor loop optimizations, closes #2633
2017-07-25 06:54:20 +01:00
Joe Watkins
78ad5e8864
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  minor loop optimizations, closes #2633
2017-07-25 06:51:44 +01:00
Joe Watkins
69b48f83df
minor loop optimizations, closes #2633 2017-07-25 06:47:58 +01:00