Commit Graph

1220 Commits

Author SHA1 Message Date
Nikita Popov
47688ab6d9 Add stub for pgsql extension 2020-09-09 16:47:10 +02:00
Nikita Popov
9a6c22da70 Remove deprecated pgsql signatures
As the comment indicates, these are deprecated in PHP 4.2...
2020-09-09 15:50:30 +02:00
Nikita Popov
8f415d4413 Promote pgsql no link to Error exception 2020-09-09 12:45:07 +02:00
Nikita Popov
3ab88831ae Remove deprecated multi-parameter form of pg_connect() 2020-09-09 12:31:00 +02:00
George Peter Banyard
1b2ec73c1d Drop various unused macros/APIs
Also convert_libmagic_pattern() to return a zend_string*

Closes GH-6029
2020-08-26 12:59:43 +02:00
Nikita Popov
396b47061f Use zpp C in pg_fetch_object 2020-08-13 16:24:08 +02:00
Máté Kocsis
7aacc705d0
Add many missing closing PHP tags to tests
Closes GH-5958
2020-08-09 22:03:36 +02:00
Nikita Popov
d92229d8c7 Implement named parameters
From an engine perspective, named parameters mainly add three
concepts:

 * The SEND_* opcodes now accept a CONST op2, which is the
   argument name. For now, it is looked up by linear scan and
   runtime cached.
 * This may leave UNDEF arguments on the stack. To avoid having
   to deal with them in other places, a CHECK_UNDEF_ARGS opcode
   is used to either replace them with defaults, or error.
 * For variadic functions, EX(extra_named_params) are collected
   and need to be freed based on ZEND_CALL_HAS_EXTRA_NAMED_PARAMS.

RFC: https://wiki.php.net/rfc/named_params

Closes GH-5357.
2020-07-31 15:53:36 +02:00
Nikita Popov
6ff31eebb1 Fix some pgsql arginfos
And make sure too few/many arguments throws, to satisfy the
function signature.
2020-07-17 15:43:37 +02:00
Nikita Popov
658e861fbb Some zpp cleanup in pgsql 2020-07-17 15:31:22 +02:00
Nikita Popov
a20f07ee59 Remove some zpp quiet uses in pgsql
These functions don't do anything special, just use normal zpp.
2020-07-17 15:24:46 +02:00
Nikita Popov
302933daea Remove no_separation flag 2020-07-07 09:30:24 +02:00
Max Semenik
2b5de6f839
Remove proto comments from C files
Closes GH-5758
2020-07-06 21:13:34 +02:00
Christoph M. Becker
ce668c0ec6 PGSQL and POD_SQL: don't include pg_config.h
Even if that header file is available, we better consider it private,
and don't include it.  The information about whether SSL support is
enabled is now missing (`USE_(OPEN)SSL`), and it seems there is no
alternative way to get it (`PQinitSSL()` is always defined), so we
remove it from the PHP info.  Furthermore, the `PG_VERSION` and
`PG_VERSION_STR` macros are no longer available, but as of libpq 9.1
there is `PQlibVersion()` which allows us to construct `PG_VERSION` in
a most likely backwards compatible manner.  The additional information
available through `PG_VERSION_STR` is lost, though, so we define
`PGSQL_LIBPQ_VERSION_STR` basically as alias of `PGSQL_LIBPQ_VERSION`,
and deprecate it right away.

Since we are now requiring at least libpq 9.1, we can remove some
further compatibility code and additional checks.

Regarding the raised requirements: official support for PostGreSQL 9.0
ended on 2015-10-08, and even CentOS 7 already has PostGreSQL 9.2, so
this is not supposed to be too much of an issue.
2020-05-25 10:48:35 +02:00
Christoph M. Becker
4bc1d8333a Raise ext/pgsql requirements to PostGreSQL 7.4
We can safely assume that users have at the very least libpq 7.4, for
which official support ended on 2010-10-01; even CentOS 6 has 8.4 now.
It is also noteworthy that PDO_PGSQL already requires libpq 7.4 or
later.
2020-05-22 15:56:24 +02:00
George Peter Banyard
466e288b01 Fix [-Wundef] warning in PostgreSQL extension 2020-05-20 14:01:11 +02:00
Máté Kocsis
4a816584a4
Make float to string casts locale-independent
From now on, float to string casting will always behave locale-independently.
RFC: https://wiki.php.net/rfc/locale_independent_float_to_string
Closes GH-5224

Co-authored-by: George Peter Banyard <girgias@php.net>
2020-05-08 10:52:23 +02:00
Christoph M. Becker
38ecfe0245 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #79532: sizeof off_t can be wrong
2020-04-29 10:43:35 +02:00
Christoph M. Becker
67f9b0b754 Fix #79532: sizeof off_t can be wrong
We have to actually determine the proper `SIZEOF_OFF_T`.
Interestingly, it is `4` on Windows x64.

We also have to prevent the redefinition in pg_config.h.  The clean
solution would likely be to not include pg_config.h at all, but that's
out of scope for BC reasons for now.
2020-04-29 10:40:59 +02:00
Nikita Popov
f8d795820e Reindent phpt files 2020-02-03 22:52:20 +01:00
Nikita Popov
6811222422 Eliminate uses of ZVAL_ZVAL and friends
Instead add RETURN_COPY(_VALUE) macros will the expected behavior.

RETURN_ZVAL doesn't make any sense since PHP 7, but has stuck
around, probably because the alternative was to write directly to
the return_value variable.
2020-01-20 10:34:17 +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
bbcfa66e06
Use RETURN_THROWS() after zend_fetch_resource*() 2020-01-03 19:20:56 +01:00
Máté Kocsis
01a50778d1
Use RETURN_THROWS() after zend_throw_exception() in most of the extensions 2020-01-02 10:56:18 +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
dabc28d182 Fix #78880: Spelling error report
We fix the most often occuring typos according to a recent codespell
report[1] in tests, code comments and documentation.

[1] <https://fossies.org/linux/test/php-src-master-f8f48ce.191129.tar.gz/codespell.html>.
2019-12-21 11:58:00 +01:00
Fabien Villepinte
a555cc0b3d Clean DONE tags from tests
Remove most of the `===DONE===` tags and its variations.
Keep `===DONE===` if the test output otherwise becomes empty.

Closes GH-4872.
2019-11-07 21:31:47 +01:00
Máté Kocsis
9493893412 Cleanup return values when parameter parsing is unsuccessful 2019-10-30 16:05:20 +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
Nikita Popov
a1e2c8870e Merge branch 'PHP-7.4' 2019-07-22 17:26:01 +02:00
Nikita Popov
d59aac58b3 Report errors from stream read and write operations
The php_stream_read() and php_stream_write() functions now return
an ssize_t value, with negative results indicating failure. Functions
like fread() and fwrite() will return false in that case.

As a special case, EWOULDBLOCK and EAGAIN on non-blocking streams
should not be regarded as error conditions, and be reported as
successful zero-length reads/writes instead. The handling of EINTR
remains unclear and is internally inconsistent (e.g. some code-paths
will automatically retry on EINTR, while some won't).

I'm landing this now to make sure the stream wrapper ops API changes
make it into 7.4 -- however, if the user-facing changes turn out to
be problematic we have the option of clamping negative returns to
zero in php_stream_read() and php_stream_write() to restore the
old behavior in a relatively non-intrusive manner.
2019-07-22 17:17:28 +02:00
Peter Kokot
4ec0889bec Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove HAVE_PQPUTCOPYEND
2019-07-22 16:06:12 +02:00
Peter Kokot
a2b758dab5 Remove HAVE_PQPUTCOPYEND
Symbol is not used anywhere in the code and also Postgresql 7.x is
EOL anyway.

Closes GH-4453
2019-07-22 16:05:26 +02:00
Remi Collet
19d8e054b1 Merge branch 'PHP-7.4'
* PHP-7.4:
  add comment about pg_config/pkgconfig
2019-06-12 09:39:24 +02:00
Remi Collet
66bd7875f8 add comment about pg_config/pkgconfig 2019-06-12 09:39:11 +02:00
Joe Watkins
1e33a8ced4
Merge branch 'PHP-7.4'
* PHP-7.4:
  Revert "ext/pgsql: Use PKG_CHECK_MODULES to detect the pq library"
2019-06-12 08:01:03 +02:00
Joe Watkins
eac238fb6c
Revert "ext/pgsql: Use PKG_CHECK_MODULES to detect the pq library"
This reverts commit 1e265174ed.
2019-06-12 08:00:55 +02:00
Joe Watkins
d8f712c302
Merge branch 'PHP-7.4'
* PHP-7.4:
  ext/pgsql: Use PKG_CHECK_MODULES to detect the pq library
2019-06-11 08:54:00 +02:00
Hugh McMaster
1e265174ed
ext/pgsql: Use PKG_CHECK_MODULES to detect the pq library 2019-06-11 08:53:49 +02:00
Dmitry Stogov
e029cc4dd4 Merge branch 'PHP-7.4'
* PHP-7.4:
  Cheaper checks for exceptions thrown from __toString()
2019-06-06 02:23:17 +03:00
Dmitry Stogov
457392fa64 Cheaper checks for exceptions thrown from __toString() 2019-06-06 01:47:22 +03:00
Nikita Popov
7686b0b889 Merge branch 'PHP-7.4' 2019-06-05 14:53:50 +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
Nikita Popov
b1bdae7621 Merge branch 'PHP-7.4' 2019-06-04 12:25:16 +02:00
Nikita Popov
3f7210efa8 Try to make 17result.php more robust
This is our most common intermittent failure. I don't understand
why it happens and can't reproduce it, but defining an explicit
sort order seems worth a shot...
2019-06-04 12:18:21 +02:00
Nikita Popov
1df8175b61 Convert fetch_resource warnings into TypeErrors
More type checks that are not part of zpp and should generate a
TypeError in PHP 8.
2019-06-03 09:17:12 +02:00
Peter Kokot
f47ddb56c7 Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove example file for pgsql extension
2019-05-13 22:15:52 +02:00
Peter Kokot
da293a8ec4 Remove example file for pgsql extension
This removes the example script in favour of the manual:
https://www.php.net/manual/en/book.pgsql.php

Patch for integrating these functions as an example has been submitted
also to PHP manual via edit.php.net.
2019-05-13 22:14:58 +02:00
Peter Kokot
87cfcb0b7c Merge branch 'PHP-7.4'
* PHP-7.4:
  [ci skip] Migrate tests READMEs to Markdown
2019-05-12 22:03:35 +02:00
Peter Kokot
83e565e244 [ci skip] Migrate tests READMEs to Markdown 2019-05-12 22:03:10 +02:00
Peter Kokot
2cf90bb2f0 Merge branch 'PHP-7.4'
* PHP-7.4:
  Normalize comments in *nix build system m4 files
2019-05-12 18:51:50 +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
a3c6a2a132 Merge branch 'PHP-7.4'
* PHP-7.4:
  Disable PACKAGE_* preprocessor symbols
2019-04-13 07:01:11 +02:00
Peter Kokot
69b20f51e1 Disable PACKAGE_* preprocessor symbols
Autoconf defines PACKAGE_* symbols:
- PACKAGE_NAME
- PACKAGE_VERSION
- PACKAGE_TARNAME
- PACKAGE_STRING
- PACKAGE_BUGREPORT
- PACKAGE_URL

and appends them to the generated config.h.in files. With AC_INIT change
via afd52f9d99 where package version, URL,
bug report location and similar meta data are defined, these
preprocessor macros are then non empty strings in the generated
configuration header file. When using phpize, PHP shares the config
files in extensions, warnings of redefined macros appear, such as:
- `warning: 'PACKAGE_NAME' macro redefined`

This patch now disables these non utilized symbols in the generated
config header files.

Better practice would be to include only API specific headers where
needed but this would require even more refactorings. Some extensions
such as pcre, pgsql, and pdo_pgsql solve this issue by undefining some
of these symbols before including the library configuration headers in
the code also. Because these symbols can be defined by any library which
uses Autotools.

Additionally, the unused PACKAGE_* symbols were cleaned for the bundled
libmbfl library and with this patch not needed undef code removed.
2019-04-13 07:00:17 +02:00
Nikita Popov
f2fd51cb80 Merge branch 'PHP-7.4' 2019-04-12 17:05:07 +02:00
Nikita Popov
4cfa4fb55d Don't use php_strtok_r in build_tablename
This is unnecessary convoluted... we just want to find the position
of the dot. Using php_strtok_r requires a copy of the string, and the
implementation also relied on the specific semantics of the scratch
space that strtok_r uses.
2019-04-12 16:17:35 +02:00
Christoph M. Becker
47602eb624 Merge branch 'PHP-7.4'
* PHP-7.4:
  Include libpq-fs.h on Windows, too
2019-04-12 14:12:33 +02:00
Christoph M. Becker
54bdb25d9f Include libpq-fs.h on Windows, too
That's more future proof than defining hard-coded macros.
2019-04-12 14:12:08 +02:00
Nikita Popov
2e982e975c Merge branch 'PHP-7.4' 2019-04-10 13:07:06 +02:00
Nikita Popov
c02a5931f4 Merge branch 'PHP-7.3' into PHP-7.4 2019-04-10 13:07:01 +02:00
Nikita Popov
b67ca4f07c Merge branch 'PHP-7.2' into PHP-7.3 2019-04-10 13:06:55 +02:00
Nikita Popov
8f13599a64 Fix 29nb_async_connect.phpt
Intermediate states are unreliable across versions (I think), make
sure we go through the whole connect procedure.
2019-04-10 13:06:02 +02:00
Nikita Popov
30d968951d Merge branch 'PHP-7.4' 2019-04-10 12:23:49 +02:00
Nikita Popov
2191eac3b3 Merge branch 'PHP-7.3' into PHP-7.4 2019-04-10 12:23:01 +02:00
Nikita Popov
6615b9c287 Merge branch 'PHP-7.2' into PHP-7.3 2019-04-10 12:22:34 +02:00
Nikita Popov
c7a86a38a3 Fix pgsql use after free trying to reuse closed connection
When a connection is closed, we also need to remove the hash entry
from the regular_list, as it now points to freed memory. To do this
store a reverse mapping from the connection to the hash string.

It would be nicer to introduce a wrapping structure for the pgsql
link resource that could store the hash (and notices), but that would
require large changes to the extension, so I'm going for a more
minimal fix here.
2019-04-10 12:18:57 +02:00
Nikita Popov
f3dd39ef61 Merge branch 'PHP-7.4' 2019-04-10 10:39:02 +02:00
Nikita Popov
d50dcbe659 Merge branch 'PHP-7.3' into PHP-7.4 2019-04-10 10:38:52 +02:00
Nikita Popov
ed1df9d135 Merge branch 'PHP-7.2' into PHP-7.3 2019-04-10 10:38:32 +02:00
Nikita Popov
b55715d61a Fix use after free on pg_close() of default connection 2019-04-10 10:38:24 +02:00
Peter Kokot
6426420f61 Merge branch 'PHP-7.4'
* PHP-7.4:
  Replace dirname(__FILE__) by __DIR__ in tests
2019-03-15 23:36:47 +01:00
Fabien Villepinte
26dfce7f36 Replace dirname(__FILE__) by __DIR__ in tests 2019-03-15 22:55:30 +01:00
Nikita Popov
852485d8ec Adjust tests for zpp TypeError change 2019-03-11 11:32:20 +01:00
Gabriel Caruso
6c4e2079c0 Use EXPECT when possible
EXPECTF logic in run-tests.php is considerable, so let's avoid it.
2019-03-11 00:05:44 -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
c0e15a3b7f Implement fine-grained conflict handling
Tests can specify conflict keys, either in --CONFLICTS-- or
a per-directory CONFLICTS file. Non-conflicting tests may be run
in parallel.
2019-02-20 11:20:40 +01:00
Fabien Villepinte
b996476578 Remove outdated pgsql README
[ci skip]
2019-02-14 17:06:37 +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
Nikita Popov
ba5cb2eb32 Remove unnecessary uses of object_and_properties_init
Use object_init_ex instead if the properties are NULL.
2019-01-07 16:00:29 +01:00
Fabien Villepinte
2b9ceffb41 Fix typo in tests 2018-11-19 22:17:58 +01:00
Anatol Belski
fb06cca6cb Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #77047 pg_convert has a broken regex for the 'TIME WITHOUT TIMEZONE' data type
2018-11-18 12:32:47 +01:00
Anatol Belski
0434141ce9 Fixed bug #77047 pg_convert has a broken regex for the 'TIME WITHOUT TIMEZONE' data type
Backport 369c991d and 282a63da to 7.1, closes #3634
2018-11-18 12:29:34 +01:00
Anatol Belski
8b05bbdd0a Merge branch 'PHP-7.3'
* PHP-7.3:
  Add test for bug #77047
  FIX #77047: fixes regex for "time" data type
2018-11-18 11:52:33 +01:00
Anatol Belski
282a63dace Add test for bug #77047 2018-11-18 11:52:00 +01:00
andy
369c991d5c FIX #77047: fixes regex for "time" data type 2018-11-18 11:50:32 +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
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
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
Peter Kokot
bfa2c7158f Fix permissions
Certain files don't need to be executables.
2018-09-21 14:12:25 +02:00
Gabriel Caruso
c9884354d2
Explain why the test was skipped 2018-09-16 17:31:06 -03:00
Gabriel Caruso
84b195d9fc Fix some misspellings 2018-08-12 16:15:45 +02:00
Peter Kokot
cf3b852109 Trim trailing whitespaces in build files
Some editors utilizing .editorconfig automatically trim whitespaces. For
convenience this patch removes whitespaces in certain build files:
- ext/*/config*.m4
- configure.ac
- acinclude.m4
2018-07-29 03:43:45 +02: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
Anatol Belski
0630e3bc03 Reduce error buffer size
120 bytes is ample, the doc says.
2018-07-05 17:24:38 +02:00
Dmitry Stogov
169d454593 Use zval_ptr_dtor() imstead of zval_dtor() 2018-07-05 17:55:54 +03:00
Dmitry Stogov
4a475a4976 Replace legacy zval_dtor() by zval_ptr_dtor_nogc() or even more specialized destructors.
zval_dtor() doesn't make a lot of sense in PHP-7.* and it's used incorrectly in some places.
Its occurances should be replaced by zval_ptr_dtor() or zval_ptr_dtor_nogc(), or even more specialized destructors.
2018-07-04 19:22:24 +03:00
Anatol Belski
4ff6c0cb44 Merge branch 'PHP-7.2'
* PHP-7.2:
  Fixed bug #76548 pg_fetch_result did not fetch the next row
2018-06-29 18:36:22 +02:00
Anatol Belski
486f18f09e Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #76548 pg_fetch_result did not fetch the next row
2018-06-29 18:35:44 +02:00
Anatol Belski
cb97fd3097 Fixed bug #76548 pg_fetch_result did not fetch the next row 2018-06-29 18:34:53 +02:00
Dmitry Stogov
0b90cf85a6 Removed "dead" code (zend_hash_update() never fails) 2018-06-01 11:58:57 +03:00
Dmitry Stogov
524f5245c5 Avoid useless checks, using zend_string_efree(), in cases where the string is known to be a temporary allocated zend_string. 2018-05-08 17:30:15 +03:00
Dmitry Stogov
eafa92ba9d zend_fcall_info_cache.calling_scope is not used by zend_call_function() and doesn't have to be initialized.
It's used only as a result of zend_is_callable() in forward_static_call and spl_autoload.
2018-05-03 19:27:04 +03:00
Anatol Belski
c4f4cc95c7 Avoid strlen calls for regexes 2018-04-19 13:29:58 +02:00
Gabriel Caruso
1314f0fb3a Use int instead of long in protos 2018-02-23 11:06:20 +01:00
Gabriel Caruso
ded3d984c6 Use EXPECT instead of EXPECTF when possible
EXPECTF logic in run-tests.php is considerable, so let's avoid it.
2018-02-20 21:53:48 +01:00
Anatol Belski
34a7c6c1a5 Reduce var scope 2018-02-18 19:59:23 +01:00
Gabriel Caruso
b8bb4d77ca
Remove empty sections in tests 2018-02-14 11:10:59 +01:00
Gabriel Caruso
faf785af9d Fix misspelling vlaues to values 2018-01-28 21:55:21 +01:00
Xinchen Hui
1e4deadc5b Merge branch 'PHP-7.2'
* PHP-7.2:
  Updated NEWS
  Fixed #75838 (Memory leak in pg_escape_bytea())
2018-01-18 10:54:16 +08:00
Xinchen Hui
6184301212 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed #75838 (Memory leak in pg_escape_bytea())
2018-01-18 10:53:39 +08:00
Xinchen Hui
fb205020ce Fixed #75838 (Memory leak in pg_escape_bytea()) 2018-01-18 10:53:23 +08:00
Dmitry Stogov
19bf64cd61 Avoid separation and simlifyed conversion 2018-01-17 12:37:42 +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
Xinchen Hui
ccd4716ec7 year++ 2018-01-02 12:53:31 +08:00
Dmitry Stogov
d9f5ea691f zend_fcall_info_cache.initialized is removed (zend_fcall_info_cache is initialized if zend_fcall_info_cache.function_handler is set). 2017-12-27 15:15:03 +03:00
Anatol Belski
2515b7a0d9 Merge branch 'PHP-7.2'
* PHP-7.2:
  Fixed bug #75671 pg_version() crashes when called on a connection to cockroach
2017-12-15 15:35:07 +01:00
Anatol Belski
171f1baff1 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #75671 pg_version() crashes when called on a connection to cockroach
2017-12-15 15:34:44 +01:00
Anatol Belski
acf1472ffd Fixed bug #75671 pg_version() crashes when called on a connection to cockroach 2017-12-15 15:33:14 +01:00
Dmitry Stogov
83e495e0fd Move constants into read-only data segment 2017-12-14 22:14:36 +03:00
Dmitry Stogov
9e709e2fa0 Move constants into read-only data segment 2017-12-14 18:43:44 +03:00
Dmitry Stogov
6a9d2b2190 Cleanup type conversion 2017-12-07 19:24:55 +03:00
Nikita Popov
26f8fc833b Enable and fix printf() format warnings
Add _unchecked() variants of zend_spprintf and zend_strpprintf for
cases where we specifically want to disable these checks, such as
use of %H.
2017-11-16 21:15:36 +01:00
Anatol Belski
20d930d8f3 Fix remaining signedness warnings 2017-11-14 17:07:09 +01:00
Anatol Belski
a5bc5aed71 Patch core for PCRE2 support
RFC https://wiki.php.net/rfc/pcre2-migration
2017-11-13 19:37:38 +01:00
Dmitry Stogov
67d5f39a47 Persistent resources are "thread-local".
Register persistent resources through new functions zend_register_persistent_resource()/zend_register_persistent_resource_ex().
2017-11-01 15:19:31 +03:00
Dmitry Stogov
fad75a54d4 Merge branch 'master' into rc_debug
* master: (26 commits)
  Better fix for bug #75451 (Assertion fails while foreach on empty xpath query)
  Catch with the latest AppVeyor unzip errors
  Fixed type inference
  Fix bug #75453 Incorrect reflection on ibase_connect and ibase_pconnect
  Fix compiler warnings
  We don't use a specific model for a MAKERNOTE so remove these checks that doesn't do anything anyway
  Remove these old comments, as for the TODO, there is already a FR for this
  Re-enable AppVeyor cache
  make sure run-tests reports exit status upon prerequisite error
  Remove implicit constants from test case
  Fix invalid read in zend_use_undefined_constant()
  Fix invalid read in mb_ord()
  Remove --with-libmbfl configure option
  Fixed bug #75451 (Assertion fails while foreach on empty xpath query)
  Add tests for UConverter::getStandards()
  convert spaces to tabs in ext/ftp/tests/server.inc
  Add tests for ftp_rename
  Fix bug #75434 Wrong reflection for mysqli_fetch_all function
  Don't optimize input arrays with suffix holes
  Fix bug #75307 Wrong reflection for openssl_open function
  ...
2017-10-30 12:11:35 +03:00
Anatol Belski
25da0bd658 Merge branch 'PHP-7.2'
* PHP-7.2:
  Fix test compat for PostgreSQL 10
2017-10-27 15:05:15 +02:00
Anatol Belski
f936a17c12 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix test compat for PostgreSQL 10
2017-10-27 15:04:54 +02:00
Anatol Belski
36b27f2ba5 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix test compat for PostgreSQL 10
2017-10-27 15:04:29 +02:00
Anatol Belski
24b1bb0abd Fix test compat for PostgreSQL 10 2017-10-27 14:58:43 +02:00
Dmitry Stogov
49ea143bbd Encapsulate reference-counting primitives.
Prohibit direct update of GC_REFCOUNT(), GC_SET_REFCOUNT(), GC_ADDREF() and GC_DELREF() shoukf be instead.
Added mactros to validate reference-counting (disabled for now).
These macros are going to be used to eliminate race-condintions during reference-counting on data shared between threads.
2017-10-27 01:28:58 +03:00
Sara Golemon
54ba77c30e Merge branch 'PHP-7.2'
* PHP-7.2:
  Decref default_link when clearing
2017-10-24 11:38:32 -04:00
Sara Golemon
d0d7db8b3f Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Decref default_link when clearing
2017-10-24 11:38:24 -04:00
Sara Golemon
53fe84bfcc Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Decref default_link when clearing
2017-10-24 11:38:17 -04:00
Sara Golemon
68e27b0763
Decref default_link when clearing 2017-10-24 11:37:59 -04:00
Sara Golemon
55ac4f0929 Merge branch 'PHP-7.2'
* PHP-7.2:
  Bugfix#75419 Fix clearing of default link during pg_close()
2017-10-23 14:44:51 -04:00
Sara Golemon
ece23ea20f Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Bugfix#75419 Fix clearing of default link during pg_close()
2017-10-23 14:44:40 -04:00
Sara Golemon
781521e112 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Bugfix#75419 Fix clearing of default link during pg_close()
2017-10-23 14:44:28 -04:00
Sara Golemon
a645af4456
Bugfix#75419 Fix clearing of default link during pg_close() 2017-10-23 14:44:00 -04:00
Kalle Sommer Nielsen
8bcc4eea8b We don't use these makefiles for compiling PHP extensions anymore (PHP4 era) 2017-08-17 22:10:49 +02:00
Kalle Sommer Nielsen
1d9b46f362 Implemented FR #74781 (Add the latest PG_DIAG_* const) 2017-08-17 21:04:41 +02:00
Joe Watkins
68801c9a30
Merge branch 'PHP-7.1'
* PHP-7.1:
  Fix 00version.phpt when commit message has multiple lines.
2017-01-26 11:36:50 +00:00
Joe Watkins
bf914ff75a
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix 00version.phpt when commit message has multiple lines.
2017-01-26 11:36:36 +00:00
Mitch Hagstrand
a3d3f76827
Fix 00version.phpt when commit message has multiple lines.
The environment variable "TRAVIS_COMMIT_MESSAGE" can contain multiple lines.

An example can be seen here https://travis-ci.org/php/php-src/jobs/195465293
2017-01-26 11:36:24 +00:00
Sammy Kaye Powers
dac6c639bb Update copyright headers to 2017 2017-01-04 11:23:42 -06:00
Sammy Kaye Powers
478f119ab9 Update copyright headers to 2017 2017-01-04 11:14:55 -06:00
Sammy Kaye Powers
9e29f841ce Update copyright headers to 2017 2017-01-02 09:30:12 -06:00
Anatol Belski
b869f22c4b Merge branch 'PHP-7.1'
* PHP-7.1:
  fix dir separator
  Update NEWS for the build
2016-12-01 01:37:24 +01:00
Anatol Belski
60c875b072 fix dir separator 2016-12-01 01:36:29 +01:00
Anatol Belski
b204b3abd1 further normalizations, uint vs uint32_t
fix merge mistake

yet one more replacement run
2016-11-26 17:29:01 +01:00
Anatol Belski
6bf85617c5 Merge branch 'PHP-7.1'
* PHP-7.1:
  Fix bug #73498
  Add a test for bug 73498
2016-11-22 00:47:30 +01:00
Anatol Belski
fc7d6e3ba5 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix bug #73498
  Add a test for bug 73498
2016-11-22 00:46:54 +01:00
Anatol Belski
58aa1a70a0 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fix bug #73498
  Add a test for bug 73498
2016-11-22 00:46:03 +01:00
Craig Duncan
644e290fcd Fix bug #73498
Postgres uses the DELIMITER keyword since 7.3
And WITH is no longer required/used
2016-11-22 00:42:45 +01:00
Craig Duncan
d36d4c70d3 Add a test for bug 73498 2016-11-22 00:42:45 +01:00
Nikita Popov
45f7b2bcc8 Fix CRLF line-endings in tests
Also fix a single instance of CRLF in ibase_query.c.
2016-11-20 22:31:24 +01:00
Stanislav Malyshev
3b78cabc88 More int->size_t and string overflow fixes 2016-11-05 14:00:47 -07:00
Stanislav Malyshev
bbdd6a65e2 Merge branch 'PHP-7.1'
* PHP-7.1:
  More int->size_t and string overflow fixes
2016-11-05 13:59:56 -07:00
Stanislav Malyshev
f7f8aae33c Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  More int->size_t and string overflow fixes
2016-11-05 13:59:35 -07:00
Stanislav Malyshev
669763d88a More int->size_t and string overflow fixes 2016-11-05 13:22:17 -07:00
Stanislav Malyshev
19866fb76c Fix various int size overflows.
Add function for detection of string zvals with length that does not fit
INT_MAX.
2016-09-12 21:04:23 -07:00
Nikita Popov
e0e5063173 Drop some pieces of commented-out code 2016-09-04 12:56:06 +02:00
Anatol Belski
1b2a06fe64 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  fix leak and error check order
2016-09-03 17:04:43 +02:00
Anatol Belski
c9040d43a8 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  fix leak and error check order
2016-09-03 17:03:55 +02:00
Anatol Belski
9513187dee fix leak and error check order 2016-09-03 16:59:17 +02:00
Xinchen Hui
9254f5d5d3 Merge branch 'PHP-7.0'
* PHP-7.0:
  Fixed bug #72629 (Caught exception assignment to variables ignores references).

Conflicts:
	main/php_version.h
2016-07-20 17:00:09 +08:00
Xinchen Hui
97c0b133c5 Fixed bug #72629 (Caught exception assignment to variables ignores references). 2016-07-20 16:59:14 +08:00
Dmitry Stogov
adc95c5114 Fixed compilation warnings 2016-06-23 12:47:06 +03:00
Dmitry Stogov
323b2733f6 Fixed compilation warnings 2016-06-22 00:40:50 +03:00
Dmitry Stogov
1616038698 Added ZEND_ATTRIBUTE_FORMAT to some middind functions.
"%p" replaced by ZEND_LONG_FMT to avoid compilation warnings.
Fixed most incorrect use cases of format specifiers.
2016-06-21 16:00:37 +03:00
Anatol Belski
4a142af316 fix test portability 2016-06-17 17:09:42 +02:00
Xinchen Hui
3b0a6dfeb2 Merge branch 'PHP-7.0'
* PHP-7.0:
  No sure why this is failed in travis
2016-05-31 17:23:03 +08:00
Xinchen Hui
953ee61a49 No sure why this is failed in travis 2016-05-31 17:22:47 +08:00
Xinchen Hui
9bf3b03e73 Merge branch 'PHP-7.0'
* PHP-7.0:
  Attempt to fix tests fails
2016-05-31 16:48:33 +08:00
Xinchen Hui
072bc589fc Attempt to fix tests fails 2016-05-31 16:48:19 +08:00
Anatol Belski
ed2ec7be80 Merge branch 'PHP-7.0'
* PHP-7.0:
  workaround the extra new line in the test out on another env
2016-05-12 12:49:31 +02:00
Anatol Belski
9f50bb5bfa workaround the extra new line in the test out on another env 2016-05-12 12:45:04 +02:00
Anatol Belski
00390449c6 Merge branch 'PHP-7.0'
* PHP-7.0:
  Fixed bug #72197 pg_lo_create arbitrary read
2016-05-12 11:41:18 +02:00
Anatol Belski
7f6e285430 Fixed bug #72197 pg_lo_create arbitrary read 2016-05-12 11:40:28 +02:00
Xinchen Hui
28f35c1799 Merge branch 'PHP-7.0'
* PHP-7.0:
  Committed by accident
2016-05-12 13:40:32 +08:00
Xinchen Hui
92828ae204 Committed by accident 2016-05-12 13:40:22 +08:00
Xinchen Hui
8fd92e0518 Merge branch 'PHP-7.0'
* PHP-7.0:
  Fixed bug #72195 (pg_pconnect/pg_connect cause use-after-free)
2016-05-12 13:15:57 +08:00
Xinchen Hui
3c0341e6f9 Fixed bug #72195 (pg_pconnect/pg_connect cause use-after-free) 2016-05-12 13:15:33 +08:00
Anatol Belski
148fa6bb44 Merge branch 'PHP-7.0'
* PHP-7.0:
  Revert "Fixed bug #71820 pg_fetch_object bind parameters before call constructor"
  Revert "Backport patch for bug #71820"
2016-05-09 17:29:56 +02:00
Anatol Belski
fc2a45b70a Revert "Fixed bug #71820 pg_fetch_object bind parameters before call constructor"
This reverts commit b4eedd128b.

This fixed bug #72151, and reverts the fix for bug #71820.
See also bug #50636 and #49521 for the history.
2016-05-09 17:25:53 +02:00
Anatol Belski
1cc536af5a Revert "Backport patch for bug #71820"
This reverts commit 1b632cfe83.

This fixed bug #72151, and reverts the fix for bug #71820.
See also bug #50636 and #49521 for the history.
2016-05-09 17:15:40 +02:00
Dmitry Stogov
6499162ff0 - get rid of EG(scope). zend_get_executed_scope() should be used instead.
- ichanged zval_update_constant_ex(). Use IS_TYPE_IMMUTABLE flag on shared constants and AST, instead of "inline_change" parameter.
2016-04-28 04:13:34 +03:00
Dmitry Stogov
f0a2e8eb13 Removed "zend_fcall_info.function_table". It was assigned in many places, but is never used. 2016-04-27 13:46:38 +03:00
Nikita Popov
3dc8f80b61 Merge branch 'PHP-7.0' 2016-04-21 23:42:20 +02:00
Nikita Popov
988bdd0908 Fix escape sequences in pgsql.c 2016-04-21 23:41:59 +02:00
Anatol Belski
e015faaf8f Merge branch 'PHP-7.0'
* PHP-7.0:
  Adds new curl option CURLOPT_SSL_VERIFYSTATUS to enable OCSP verification
  Add test for bug #72028
2016-04-16 19:25:13 +02:00
Anatol Belski
fd6f7b8341 Add test for bug #72028 2016-04-16 16:11:22 +02:00
Xinchen Hui
513f2e775b Merge branch 'PHP-7.0' 2016-04-15 21:30:24 -07:00
Xinchen Hui
7e01c518b6 Fixed bug #72028 (pg_query_params(): NULL converts to empty string)
I don't have a pgsql server by hand, so no test script, but the fix must
be right.
2016-04-15 21:29:27 -07:00
Anatol Belski
fd2cd35429 Merge branch 'PHP-7.0'
* PHP-7.0:
  update NEWS
  Fixed #71062 pg_convert() doesn't accept ISO 8601 for datatype timestamp
2016-04-15 13:42:04 +02:00
Anatol Belski
d263616525 Fixed #71062 pg_convert() doesn't accept ISO 8601 for datatype timestamp 2016-04-15 13:38:49 +02:00
Anatol Belski
672d0eeecf Merge branch 'PHP-7.0'
* PHP-7.0:
  Fixed bug #71998 Function pg_insert does not insert when column type = inet
2016-04-10 18:49:38 +02:00
Anatol Belski
b4ab0effc7 Fixed bug #71998 Function pg_insert does not insert when column type = inet 2016-04-10 18:48:35 +02:00
Anatol Belski
1b632cfe83 Backport patch for bug #71820
Rev b4eedd128b
2016-03-17 14:28:58 +01:00
Anatol Belski
ad7e1768aa Merge branch 'PHP-7.0'
* PHP-7.0:
  Fixed bug #71820 pg_fetch_object bind parameters before call constructor
2016-03-17 12:49:34 +01:00
Anatol Belski
b4eedd128b Fixed bug #71820 pg_fetch_object bind parameters before call constructor
If we want to fetch into an object of a custom class that implemens
__set handler, the corstructor has to be called first. The data
passed to the constructor can be possibly required in __set handler.
2016-03-17 12:41:55 +01:00
Nikita Popov
f57c0b3249 Merge branch 'PHP-7.0' 2016-03-03 16:50:47 +01:00
Nikita Popov
1ac152938c Move semicolon into TSRMLS_CACHE_EXTERN/DEFINE
Also re bug #71575.
2016-03-03 16:50:01 +01:00
Anatol Belski
de3e033010 Merge branch 'PHP-7.0'
* PHP-7.0:
  show correct MINFO with libpq >= 9.5.x
2016-03-02 17:06:03 +01:00
Anatol Belski
4f0042bead Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  show correct MINFO with libpq >= 9.5.x
2016-03-02 17:05:05 +01:00
Anatol Belski
2399c64eaf show correct MINFO with libpq >= 9.5.x 2016-03-02 17:03:20 +01:00
Dmitry Stogov
c67c166f93 Removed zend_fcall_info.symbol_table 2016-03-02 17:50:55 +03:00
Dmitry Stogov
052651b06a Merge branch 'PHP-7.0'
* PHP-7.0:
  Added missing semicolon
2016-02-15 16:37:48 +03:00
Dmitry Stogov
5c4b4d11be Added missing semicolon 2016-02-15 16:37:27 +03:00
Nikita Popov
420c7979d5 Fix zpp in pg_last_notice 2016-02-14 14:48:26 +01:00
Lior Kaplan
3d5438bf7b Merge branch 'PHP-7.0'
* PHP-7.0:
  Update header to PHP Version 7
  Happy new year (Update copyright to 2016)
  Happy new year (Update copyright to 2016)
2016-01-01 20:04:31 +02:00
Lior Kaplan
ed35de784f Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Happy new year (Update copyright to 2016)
2016-01-01 19:48:25 +02:00
Lior Kaplan
49493a2dcf Happy new year (Update copyright to 2016) 2016-01-01 19:21:47 +02:00
Yasuo Ohgaki
283cbebe5b Improve FR #48532 implementation (Allow pg_fetch_all() to index numerically).
Made result type option be consistent with pg_fetch_row().
2015-12-18 15:50:57 +09:00
Yasuo Ohgaki
5835593dfc Improve FR #31021 implementation (pg_last_notice() is needed to get all notice messages).
Now pg_last_notice() can clear stored notices.
2015-12-18 13:04:34 +09:00
Yasuo Ohgaki
7a01ff5e91 Fix proto and arg info 2015-12-17 09:19:05 +09:00
Yasuo Ohgaki
b6935efc8e Implemented FR #48532 (Allow pg_fetch_all() to index numerically). 2015-12-17 09:15:57 +09:00
Yasuo Ohgaki
57d9da8790 Implemented FR #31021 (pg_result_notice() is needed to get all notice messages). 2015-12-17 07:31:19 +09:00
Dmitry Stogov
927d68db24 Avoid reallocations 2015-09-14 23:04:27 +03:00
Anatol Belski
545b364d56 remove TSRMLS_*
either remains or merged in from PHP5
2015-08-02 13:42:01 +02:00
Anatol Belski
4e66cce87c switch to the unified globals accessor where appropriate 2015-07-29 13:26:35 +02:00
Yasuo Ohgaki
62515a1dbb Fixed Bug #70092 pg_field_type() is too slow 2015-07-26 05:29:27 +09:00
Nikita Popov
5c95226d50 Various warning fixes 2015-07-17 20:18:25 +02:00
Kalle Sommer Nielsen
0ac2371b5a Fix x86 build 2015-07-07 12:41:05 +02:00
Aaron Piotrowski
ed1b64877d Switch position of ce in exception ce variable names 2015-07-03 09:45:03 -05:00
Aaron Piotrowski
a812a74c2e Change zend_exception_get_default() to zend_exception_ce 2015-07-03 09:44:48 -05:00
Dmitry Stogov
4a2e40bb86 Use ZSTR_ API to access zend_string elements (this is just renaming without semantick changes). 2015-06-30 04:05:24 +03:00
Rasmus Lerdorf
28d7bb97a1 Fix more proto comments 2015-06-23 17:46:20 -04:00
Nikita Popov
5d3cf577aa Make convert_to_* safe with rc>1
This only involves switching zval_dtor to zval_ptr_dtor for arrays
and making the convert_to_object for arrays a bit more generic.

All the other changes outside zend_operators.c just make use of
this new ability (use COPY instead of DUP).

What's still missing: Proper references handling. I've seen many
convert_to* calls that will break when a reference is used.

Also fixes bug #69788.
2015-06-11 23:23:57 +02:00
Remi Collet
1ad58ce12e Merge branch 'PHP-5.6'
* PHP-5.6:
  fix test description
  Fixed Buf #68812 Unchecked return value.
  Fixed Buf #68812 Unchecked return value.
2015-06-09 09:14:05 +02:00