Commit graph

551 commits

Author SHA1 Message Date
Matteo Beccati
0f89d407fc Fix build if SQLITE_RECURSIVE is not supported 2020-01-04 10:27:43 +01:00
Nikita Popov
36c8e57495 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fixed bug #79056
2020-01-03 11:09:06 +01:00
Nikita Popov
1dcdcd79ba Fixed bug #79056 2020-01-03 11:08:48 +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
12ce73a5bb
Use RETURN_THROWS() after zend_value_error() 2019-12-31 16:58:15 +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
BohwaZ
3958592487 Add setAuthorizer method to SQLite3
This adds the possibility to define a userland callback that will be
used to authorize or not an action on the database.
2019-12-20 11:33:23 +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
Gabriel Caruso
5d6e923d46
Remove mention of PHP major version in Copyright headers
Closes GH-4732.
2019-09-25 14:51:43 +02:00
Christoph M. Becker
9a734c5c19 Implement NUL byte checks for dbnames
Since we're passing these parameter to C functions accepting `char*`
without any further checking, we should reject strings with NUL bytes
in the first place.
2019-09-17 16:37:28 +02:00
Christoph M. Becker
e6d2ef1047 Merge branch 'PHP-7.4'
* PHP-7.4:
  Add missing SKIPIF (sqlite)
2019-09-04 08:39:34 +02:00
Fabien Villepinte
bbf7b8dd69 Add missing SKIPIF (sqlite) 2019-09-04 08:39:15 +02:00
Christoph M. Becker
a3abbc0920 Unify ZPP handling in ext/sqlite3
Since `zend_parse_parameters()` now throws on failure, it doesn't make
sense anymore to use `zend_parse_parameters_throw()` instead, and also
it's useless to set an explicit return value.
2019-08-15 13:31:02 +02:00
Christoph M. Becker
e3ebdb6be2 Don't repeat yourself
SQLite3::bindParam() and SQLite3::bindValue() have identical
implementation (the only thing that differs is the second parameter's
passing mode), so we unify the implementation.
2019-08-15 13:10:53 +02:00
Craig Duncan
107c1e0c1b Convert sqlite3 functions arginfo to php stubs 2019-08-15 12:56:46 +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
b2bd9aeb41 Merge branch 'PHP-7.4'
* PHP-7.4:
  Move HAVE_SQLITE3_CLOSE_V2 to pdo_sqlite
2019-07-21 00:41:20 +02:00
Peter Kokot
f5227c5863 Move HAVE_SQLITE3_CLOSE_V2 to pdo_sqlite
Closes GH-4444
2019-07-21 00:40:59 +02:00
Peter Kokot
ba2864d4d8 Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove unused sqlite symbols
2019-07-20 00:27:39 +02:00
Peter Kokot
6de97402b5 Remove unused sqlite symbols
- HAVE_SQLITE3_KEY is no longer used in php-src
- SQLITE_ENABLE_COLUMN_METADATA is no longer used in php-src

Closes GH-4443
2019-07-20 00:27:10 +02:00
Peter Kokot
08c8051977 Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove unsed zts check for sqlite3
2019-07-14 21:08:19 +02:00
Peter Kokot
e39296d10b Remove unsed zts check for sqlite3
This check was relevant with bundled sqlite library. Removed via
6083a387a8

Closes GH-4403
2019-07-14 21:06:15 +02:00
Nikita Popov
80fc31c887 Merge branch 'PHP-7.4' 2019-07-02 13:03:45 +02:00
Robert Kopack
b546ae986a Implement SQLite extended result code functionality 2019-07-02 13:03:35 +02:00
Nikita Popov
a1479fbbd9 Merge branch 'PHP-7.4' 2019-06-25 14:30:24 +02:00
Nikita Popov
8277acefbd Fix leak on sqlite3 open error
sqlite3_open creates the database object even if the operation
fails.
2019-06-25 14:28:58 +02:00
Christoph M. Becker
47bb32e056 Merge branch 'PHP-7.4'
* PHP-7.4:
  Implement SQLite3 backup API
2019-06-17 23:36:43 +02:00
BohwaZ
ce22ccc77b Implement SQLite3 backup API 2019-06-17 23:34:51 +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
Dmitry Stogov
b2cdde0826 Merge branch 'PHP-7.4'
* PHP-7.4:
  Replace ZVAL_COPY() and ZVAL_COPY_VALUE() for IS_OBJECT by cheaper macros
2019-05-28 20:19:15 +03:00
Dmitry Stogov
83804519df Replace ZVAL_COPY() and ZVAL_COPY_VALUE() for IS_OBJECT by cheaper macros 2019-05-28 20:10:02 +03:00
Stanislav Malyshev
0403152897 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix bug #77967 - Bypassing open_basedir restrictions via file uris
2019-05-27 21:36:15 -07:00
Stanislav Malyshev
ffc15e913c Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix bug #77967 - Bypassing open_basedir restrictions via file uris
2019-05-27 21:36:10 -07:00
Stanislav Malyshev
9d473f1eac Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix bug #77967 - Bypassing open_basedir restrictions via file uris
2019-05-27 21:36:05 -07:00
Stanislav Malyshev
fbb6a27212 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix bug #77967 - Bypassing open_basedir restrictions via file uris
2019-05-27 21:36:00 -07:00
Stanislav Malyshev
c34895e837 Fix bug #77967 - Bypassing open_basedir restrictions via file uris 2019-05-27 18:48:48 -07:00
Remi Collet
7dec7a154f Merge branch 'PHP-7.4'
* PHP-7.4:
  fix typo breaking shared build
2019-05-21 14:26:08 +02:00
Remi Collet
24206783c3 fix typo breaking shared build 2019-05-21 14:25:55 +02:00
Christoph M. Becker
77f02cda53 Merge branch 'PHP-7.4'
* PHP-7.4:
  use {TMP} placeholder in phpt tests
2019-05-21 09:03:51 +02:00
Christoph M. Becker
c982a4c3f9 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  use {TMP} placeholder in phpt tests
2019-05-21 09:03:20 +02:00
Christoph M. Becker
11740abd6b Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  use {TMP} placeholder in phpt tests
2019-05-21 09:03:01 +02:00
Holly Li (WIPRO LIMITED)
202e6936d6 use {TMP} placeholder in phpt tests 2019-05-21 09:02:37 +02:00
Nikita Popov
20e983d9ce Merge branch 'PHP-7.4' 2019-05-14 14:59:36 +02:00
Nikita Popov
3f19f5112a Add RETURN_EMPTY_ARRAY() / RETVAL_EMPTY_ARRAY()
The usual wrappers around ZVAL_EMPTY_ARRAY()...
2019-05-14 14:59:10 +02:00
Peter Kokot
7bdb4c82a5 Merge branch 'PHP-7.4'
* PHP-7.4:
  Update changelog
  Use pkg-config for sqlite3 and pdo_sqlite
2019-05-14 03:20:11 +02:00
Peter Kokot
47350ba6e7 Use pkg-config for sqlite3 and pdo_sqlite
Following other migrations to pkg-config usage for the *nix build system
this migrates also sqlite3 and pdo_sqlite extensions.
2019-05-14 03:14:33 +02:00