1
0
mirror of https://github.com/php/php-src.git synced 2026-03-25 08:42:29 +01:00
Commit Graph

461 Commits

Author SHA1 Message Date
Christoph M. Becker
e7ce7c6bb2 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  SQLite3: add DEFENSIVE config for SQLite >= 3.26.0 as a mitigation strategy against potential security flaws
2019-03-11 16:30:16 +01:00
bohwaz
e93259bb23 SQLite3: add DEFENSIVE config for SQLite >= 3.26.0 as a mitigation strategy against potential security flaws 2019-03-11 16:26:15 +01:00
Christoph M. Becker
471eb0dd95 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #77051: Issue with re-binding on SQLite3
2018-11-29 02:18:56 +01:00
BohwaZ
94ec262fca Fix #77051: Issue with re-binding on SQLite3
We have to call `sqlite3_reset()` before re-binding the parameters.
2018-11-29 02:16:57 +01: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
Christoph M. Becker
d035bc2bfe Merge branch 'PHP-7.2'
* PHP-7.2:
  Fix #76665: SQLite3Stmt::bindValue() with SQLITE3_FLOAT doesn't juggle
2018-07-26 14:23:40 +02:00
Christoph M. Becker
ce66492a13 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix #76665: SQLite3Stmt::bindValue() with SQLITE3_FLOAT doesn't juggle
2018-07-26 13:26:58 +02:00
Christoph M. Becker
ed7e3bc70a Fix #76665: SQLite3Stmt::bindValue() with SQLITE3_FLOAT doesn't juggle
We need to ensure that a zval IS_DOUBLE before we access it as such.
In this case we apply common type juggling to do so.
2018-07-26 13:15:19 +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
c93aba042f Give a reason why the test was skipped
This will help us debug why a test was skipped in GCOV
(http://gcov.php.net/viewer.php?version=PHP_HEAD&func=skip), and maybe
put them to run again
2018-07-22 16:41:41 -03:00
Dmitry Stogov
b6cc4d2009 Use zval_ptr_dtor() instead of zval_dtor() in internal functions that destroy new created object (This is safer and produces less code) 2018-07-05 11:54:26 +03:00
Peter Kokot
29000091b2 Remove sqlite and xmlrpc extension versions from phpinfo output
The rest of the core extensions don't display the extension versions in
the phpinfo output since they in most cases match the PHP release version.
2018-07-03 17:01:17 +02:00
Nikita Popov
f2c4f06f84 Remove unnecessary uses of z/ parameters 2018-06-25 22:27:42 +02:00
Christoph M. Becker
c4331b00be Update to SQLite 3.24.0 2018-06-05 15:01:02 +02:00
Dmitry Stogov
f2b4ec4bdc Export standard object handlers, to avoid indirect access 2018-05-31 11:57:22 +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
Christoph M. Becker
d2ebe41464 Update bundled libsqlite to 3.23.1 2018-04-10 23:20:21 +02:00
Christoph M. Becker
a4cbd80b8d Update bundled libsqlite to 3.23.0 2018-04-02 23:20:20 +02:00
Gabriel Caruso
701437a948 Remove return types from some magic method in protos
__construct, __destruct, __wakeup does not have return types defined.
2018-03-09 12:04:46 +01:00
Gabriel Caruso
b895690dfa remove support for string|unicode in tests 2018-02-22 08:11:30 +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
Gabriel Caruso
b0d3c1bf83 Add and fix SKIPIF sections 2018-02-04 17:26:37 +01:00
Christoph M. Becker
5b4b4d33b2 Update to SQLite 3.22.0 2018-01-22 23:42:36 +01:00
Dmitry Stogov
d8f916124b Usee reference-counting instead of duplication 2018-01-19 13:19:49 +03:00
Xinchen Hui
88b8cd7385 Use stack allocated zvals 2018-01-07 20:03:49 +08:00
Gabriel Caruso
2238403892 Trailing whitespaces on ext/*
Signed-off-by: Gabriel Caruso <carusogabriel34@gmail.com>
2018-01-04 02:38:32 -02: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
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
Nikita Popov
b72b1a4e4d Add zend_object_alloc() API
Using ecalloc() to create objects is expensive, because the
dynamic-size memset() is unreasonably slow. Make sure we only
zero the main object structure with known size, as the properties
are intialized separately anyway.

Technically we do not need to zero the embedded zend_object
structure either, but as long as the memset argument is constant,
a couple more bytes don't really matter.
2017-11-25 17:12:37 +01:00
Morva Kristóf
ed0a58d0ae Enable JSON1 for bundled libsqlite 2017-11-22 12:00:13 +01:00
Christoph M. Becker
35e2984b91 Updated bundled libsqlite to 3.21.0 2017-11-07 16:21:07 +01:00
Dmitry Stogov
9cf87aa196 Avoid HashTable allocations for empty arrays (using zend_empty_array). 2017-10-24 17:27:31 +03:00
Remi Collet
a8835d05d5 Merge branch 'PHP-7.2'
* PHP-7.2:
  move AC_DEFINE in the right position (in bundled lib conditon)
2017-08-31 07:56:24 +02:00
Remi Collet
1248e0f7f5 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  move AC_DEFINE in the right position (in bundled lib conditon)
2017-08-31 07:56:13 +02:00
Remi Collet
bcf50b7261 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  move AC_DEFINE in the right position (in bundled lib conditon)
2017-08-31 07:56:00 +02:00
Remi Collet
3239f6d679 move AC_DEFINE in the right position (in bundled lib conditon) 2017-08-31 07:55:45 +02:00
Christoph M. Becker
bd6630ea8e Merge branch 'PHP-7.2'
* PHP-7.2:
  Update to SQLite 3.20.1
2017-08-26 12:13:55 +02:00
Christoph M. Becker
3a2ad5b2c5 Update to SQLite 3.20.1 2017-08-26 12:13:06 +02:00
Remi Collet
b1cf87a4e6 Merge branch 'PHP-7.2'
* PHP-7.2:
  win32 for pdo_sqlite
2017-08-04 13:29:02 +02:00
Remi Collet
17bb8d575a win32 for pdo_sqlite 2017-08-04 13:28:48 +02:00
Remi Collet
f6a48dfd9b Merge branch 'PHP-7.2'
* PHP-7.2:
  use AC_DEFINE + win32
2017-08-04 13:22:09 +02:00
Remi Collet
bf1c242cf4 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  use AC_DEFINE + win32
2017-08-04 13:21:54 +02:00
Remi Collet
aee20e637a Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  use AC_DEFINE + win32
2017-08-04 13:21:41 +02:00
Remi Collet
159e5c1048 use AC_DEFINE + win32 2017-08-04 13:21:28 +02:00
Remi Collet
f4727d447c Merge branch 'PHP-7.2'
* PHP-7.2:
  fix build with old system libsqlite (sqlite3_errstr may be missing)
2017-08-02 14:03:38 +02:00