1
0
mirror of https://github.com/php/php-src.git synced 2026-04-25 08:58:28 +02:00
Commit Graph

12983 Commits

Author SHA1 Message Date
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 17ccbeec32 Trim trailing whitespace in *.phpt 2018-10-14 19:44:14 +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 902d39a3a7 Trim trailing whitespace in source code files 2018-10-13 14:14:50 +02:00
Pierrick Charron efa5674a9b Merge branch 'PHP-7.1' into PHP-7.2 2018-10-09 01:20:01 -04:00
Pierrick Charron f42d7bddc0 Fixed bug #76965 INI_SCANNER_RAW doesn't strip trailing whitespace 2018-10-09 00:00:21 -04:00
Nikita Popov d2477b284b Fixed bug #76936 2018-10-02 17:47:07 +02:00
Nikita Popov 8e7dfc6ddf Merge branch 'PHP-7.1' into PHP-7.2 2018-09-28 19:17:29 +02:00
Nikita Popov 83e2b9e220 Fixed bug #76946 2018-09-28 19:15:19 +02:00
Nikita Popov 99eb4b2ea4 Merge branch 'PHP-7.1' into PHP-7.2 2018-09-28 13:41:06 +02:00
Nikita Popov fa84b8ebb4 Fix test for release builds 2018-09-28 13:40:58 +02:00
Nikita Popov 1c35357b31 Merge branch 'PHP-7.1' into PHP-7.2 2018-09-28 12:57:55 +02:00
Nikita Popov 45cdcb2d0b Fixed bug #76846 2018-09-28 12:56:47 +02:00
Nikita Popov cc1fb02760 Merge branch 'PHP-7.1' into PHP-7.2 2018-09-19 09:39:13 +02:00
Nikita Popov 294fb83ee8 Fixed bug #76901
get_method() may modify the object pointer passed to it if method
forwarding is used. In this case we do not want to modify the
passed zval, so make sure that we copy the object into a temporary
first.
2018-09-19 09:37:04 +02:00
Dmitry Stogov 3bc4a63fc2 Fixed bug #76800 (foreach inconsistent if array modified during loop) 2018-09-14 10:28:31 +03:00
Dmitry Stogov accf5ed621 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed reference-countingin ZTS build.
2018-09-03 10:21:32 +03:00
Dmitry Stogov 7fde2243a7 Fixed reference-countingin ZTS build. 2018-09-03 10:20:40 +03:00
Remi Collet 6e703c957e Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  fix double cast to int on 32-bit
2018-08-30 09:04:13 +02:00
Remi Collet c1729272b1 fix double cast to int on 32-bit 2018-08-30 09:03:50 +02:00
Dmitry Stogov fd5a453cb9 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed incorrect ZEND_ACC_ARENA_ALLOCATED usage (it must be used only for internal functions).
2018-08-29 23:41:14 +03:00
Dmitry Stogov 709e4e4f17 Fixed incorrect ZEND_ACC_ARENA_ALLOCATED usage (it must be used only for internal functions). 2018-08-29 23:40:17 +03:00
Massimiliano Braglia 2527a0fcfd Fixed bug #75797
Fix zend_register_class_alias_ex() to use non-persistent strings
for (non-persistent) userland classes.
2018-08-22 13:39:08 +02:00
Xinchen Hui ca103b415e Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #76754 (parent private constant in extends class memory leak)
2018-08-17 13:35:31 +08:00
Xinchen Hui 04c4854fdf Fixed bug #76754 (parent private constant in extends class memory leak) 2018-08-17 13:35:15 +08:00
Xinchen Hui c20a97df6d Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed pefree_size (efree_size will be expaned to do {} while () form)
2018-07-23 15:48:52 +08:00
Xinchen Hui 2139c2c2de Fixed pefree_size (efree_size will be expaned to do {} while () form) 2018-07-23 15:48:14 +08:00
Anatol Belski 545a29d0cb Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix C++11 and up compatibility for zend_finite and more
2018-07-08 20:32:52 +02:00
Anatol Belski ad790bea2e Fix C++11 and up compatibility for zend_finite and more
C++11 puts isfinite, isinf, isnan and a lot of other stuff into the
std namespace. Thus, if a C++11 or newer source is compiled, these
symbols won't be available. A good solution would be to include cmath,
but depending on a particular compiler that might remove even more
stuff from the global namespace, so such a fix should only target master.
For now, just keep these defines same for C++11 and upper, as the actual
C++ code should use symbols from the std namespace anyway. This
especially concerns older GCC versions like at least 4 and 5, which are
used by default in the LTS Linux distros.
2018-07-08 20:20:08 +02:00
Nikita Popov 0f1726e45d Merge branch 'PHP-7.1' into PHP-7.2 2018-06-30 20:11:39 +02:00
Nikita Popov 9b0df97a42 Fix handling of void return type on internal functions 2018-06-30 20:10:57 +02:00
Nikita Popov deb1bad80f Merge branch 'PHP-7.1' into PHP-7.2 2018-06-29 23:23:02 +02:00
Nikita Popov 962706d16c Fix nullable type pretty-printing 2018-06-29 23:22:41 +02:00
Xinchen Hui 3521661bd1 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #76534 (PHP hangs on 'illegal string offset on string references with an error handler)

Conflicts:
	Zend/zend_execute.c
	Zend/zend_vm_def.h
	Zend/zend_vm_execute.h
2018-06-27 13:07:36 +08:00
Xinchen Hui d1b1866a3a Fixed bug #76534 (PHP hangs on 'illegal string offset on string references with an error handler) 2018-06-27 13:05:11 +08:00
Nikita Popov 14b22704c7 Merge branch 'PHP-7.1' into PHP-7.2 2018-06-24 22:28:57 +02:00
Nikita Popov 701460ba84 Fixed bug #76502 2018-06-24 22:26:45 +02:00
Nikita Popov ed9d1b708b Fixed bug #76520 2018-06-22 16:22:04 +02:00
Dmitry Stogov 4a4c72a82a Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Added parenthesis
2018-06-22 12:04:39 +03:00
Dmitry Stogov 1f726c9925 Added parenthesis 2018-06-22 12:04:23 +03:00
Anatol Belski d5ee654b71 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Translate correct C++ version with suitable compiler
  Fixed bug #76383 (array_map on $GLOBALS returns IS_INDIRECT)
2018-05-28 17:13:55 +02:00
Bob Weinand 97a8483143 Fixed bug #76383 (array_map on $GLOBALS returns IS_INDIRECT) 2018-05-28 00:48:35 +02:00
xKhorasan 5681f6523b Fixed bug #76337 2018-05-20 13:33:03 +02:00
Nikita Popov 7c852a7961 Merge branch 'PHP-7.1' into PHP-7.2 2018-04-26 16:17:13 +02:00
shiguangqi2008@gmail.com 98ef183ed0 Fix memory leak in zend_disable_class() 2018-04-26 16:16:37 +02:00
atvoicu 17ed2f21cf Add missing skip prefix for some SKIPIF messages 2018-03-23 18:56:36 +01:00
Dmitry Stogov 975d144027 Fixed user-opcode support 2018-03-14 09:41:25 +03:00
Anatol Belski cf0012dad0 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #76068 parse_ini_string fails to parse "[foo]\nbar=1|>baz" with segfault
2018-03-10 11:20:11 +01:00
Anatol Belski 8417a23973 Fixed bug #76068 parse_ini_string fails to parse "[foo]\nbar=1|>baz" with segfault 2018-03-10 11:18:21 +01:00
Dmitry Stogov b48d2f6d10 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Don't keep HashTable.pDestructor in SHM and always set it into ZVAL_PTR_DTOR in zval_array_dup(). Keeping pointer to a function in SHM is not safe because of ASLR.
2018-03-06 01:00:14 +03:00