Commit Graph

567 Commits

Author SHA1 Message Date
Nikita Popov
91d4d175ab Merge branch 'PHP-7.2' into PHP-7.3 2019-03-25 16:43:21 +01:00
Nikita Popov
85095dfd09 Fixed bug #72175
Make sure we don't close the connection we're trying to reuse...
2019-03-25 16:41:21 +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
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
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
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
Gabriel Caruso
8ca1f47a7a
Use variables that already received ZEND_NUM_ARGS() 2018-07-22 15:54:00 -03:00
Gabriel Caruso
cf5f26b260
Fix failing test upstream
There was a trailing tab when a error message was generated. Removing
it, test is passing now.
2018-07-15 23:40:00 -03:00
Dmitry Stogov
169d454593 Use zval_ptr_dtor() imstead of zval_dtor() 2018-07-05 17:55:54 +03:00
Dmitry Stogov
5f83904a5d Use zval_ptr_dtor_nogc() instead of zval_dtor() inplaces where circular-references are not possible 2018-07-05 15:25:55 +03: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
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
Kalle Sommer Nielsen
a6b9ddbfe2 Fixed bug #76443 (php+php_interbase.dll crash on module_shutdown) 2018-06-11 11:50:39 +02:00
Dmitry Stogov
0b90cf85a6 Removed "dead" code (zend_hash_update() never fails) 2018-06-01 11:58:57 +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
Gabriel Caruso
b895690dfa
remove support for string|unicode in tests 2018-02-22 08:11:30 +01:00
Gabriel Caruso
a6b2223220
Refactoring duplicated ZPP with a switch 2018-02-19 08:33:18 +01:00
Gabriel Caruso
21e3b0c70c Remove trailing whitespace in inc files 2018-02-10 19:20:23 +01:00
Gabriel Caruso
fef879a2d6 Use bool instead of boolean while throwing a type error
PHP requires boolean typehints to be written "bool" and disallows
"boolean" as an alias. This changes the error messages to match
the actual type name and avoids confusing messages like "must be
of type boolean, boolean given".

This a followup to ce1d69a1f6, which
implements the same change for integer->int.
2018-02-04 23:09:40 +01:00
Gabriel Caruso
ce1d69a1f6 Use int instead of integer in type errors
PHP requires integer typehints to be written "int" and does not
allow "integer" as an alias. This changes type error messages to
match the actual type name and avoids confusing messages like
"must be of the type integer, integer given".
2018-02-04 19:08:23 +01:00
Nikita Popov
2d083a3da7 Don't directly access refcount in interbase 2018-01-12 18:38:45 +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
Dmitry Stogov
9e709e2fa0 Move constants into read-only data segment 2017-12-14 18:43:44 +03: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
Joe Watkins
f844813c60
Merge branch 'PHP-7.2'
* PHP-7.2:
  Fix bug #75453 Incorrect reflection on ibase_connect and ibase_pconnect
2017-10-30 06:56:20 +00:00
Joe Watkins
1a72d3225c
Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix bug #75453 Incorrect reflection on ibase_connect and ibase_pconnect
2017-10-30 06:55:58 +00:00
Joe Watkins
63c0ecc445
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix bug #75453 Incorrect reflection on ibase_connect and ibase_pconnect
2017-10-30 06:55:28 +00:00
Fabien Villepinte
e6aea3dc78
Fix bug #75453 Incorrect reflection on ibase_connect and ibase_pconnect 2017-10-30 06:55:00 +00: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
Kalle Sommer Nielsen
fd29202022 Free the HMODULE handle after use 2017-07-21 22:21:25 +02:00
Nikita Popov
035a27cbc6 Only compute callback name in error cases
Mostly the callback name is only used to report an error. Try to
avoid calculating it if no error occurred.
2017-06-25 18:45:59 +02: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
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
Remi Collet
548cbcc929 Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed bug #73512 Fails to find firebird headers
2016-11-16 10:47:18 +01:00
Remi Collet
397bedcc7c Fixed bug #73512 Fails to find firebird headers
- use fb_config output instead of relying on hardoded path
2016-11-16 10:47:02 +01:00
Anatol Belski
4a08836d47 fix borked interbase patch 2016-08-11 15:08:26 +02:00
Kalle Sommer Nielsen
197051f3ab Remove sql.safe_mode
This is one of the last old and odd deprecated settings we still have in PHP, it was never fully implemented in all the database extensions and should probably have been gone back in 5.4, along with safe_mode. Although if my memory strikes me right, mysql was also supporting it back then, but not mysqli.

So far only interbase was supporting this feature, and the removal of it causes two effects for interbase:
 - CREATE DATABASE is now allowed no matter
 - The default database set by php.ini (ibase.default_db) is no longer forced

http://php.net/ini.core#ini.sql.safe-mode
2016-08-11 05:06:55 +02: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
e9eeb5edb9 fix test portability 2016-06-17 09:05:27 +02:00
Xinchen Hui
a5718539b1 Fixed build 2016-04-29 11:13:15 +08:00
Xinchen Hui
a05320c419 Use zend_string_safe_alloc 2016-04-27 20:29:11 +08:00
Anatol Belski
be5bbe7068 fix ibase connection routine
followup on a7028d96
2016-03-04 12:26:25 +01:00
Tjerk Meesters
a7028d9671 Fix one zpp usage in interbase
Also small tweak to zpp REAME
2016-03-03 23:50:02 +01:00