| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
We're starting to see a mix between uses of zend_bool and bool.
Replace all usages with the standard bool type everywhere.
Of course, zend_bool is retained as an alias.
|
|
|
|
|
|
|
|
| |
This converts the remaining "non well-formed" warnings in bcmath
to ValueErrors, in line with the other warning promotions that
have been performed in this extension.
Closes GH-80545.
|
|
|
|
|
|
|
|
|
| |
We should keep the value of bcmath.scale and the internal
bc_precision global synchronized.
Probably more important than the ability to retrieve bcmath.scale
via ini_get(), this also makes sure that the set scale does not
leak into the next request, as it currently does.
|
|
|
|
|
|
| |
Also do a bit of refactoring at the same time.
Closes GH-6105
|
|
|
|
| |
Closes GH-5758
|
|
|
|
| |
Closes GH-5747
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Make sure bcmatch scale is between 0 and INT_MAX, both for the
ini setting, and all the functions accepting a scale argument.
A ValueError is thrown if a function argument is out of range.
Closes GH-5455.
|
|
|
|
| |
Closes GH-5347
|
|
|
|
|
|
| |
`bcdiv()` and `bcmod()` throw DivisionByZeroError if the divisor is 0,
which matches the behavior of the `/` and `%` operators, and `bcsqrt()`
throws ValueError for negative operands.
|
|
|
|
| |
Closes GH-4732.
|
|
|
|
| |
Closes GH-4508.
|
|
|
|
| |
Except for bcpowmod, as it returns string|false
|
|
|
|
|
| |
Co-Authored-By: Nikita Popov <nikita.ppv@googlemail.com>
Co-Authored-By: Christoph M. Becker <cmbecker69@gmx.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This function has been removed in 870ed5106d6274905b5aa4341429deef12c92e55,
because it is not necessary to manipulate the `bc_num` itself; instead
we simply omit extraneous decimals when converting the number to
string.
This resolves the issue introduced by 24fd49fbabc7c5ad941095f33d05fe2e41ff667d
in a cleaner way than 121d193514cbf59450a7dee0ad2e883101cbe9dd.
|
| |
|
|\
| |
| |
| |
| | |
* PHP-7.2:
Scale support for bcmod()
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
As of commit 90dcbbe (PHP-7.2+) bcmod() supports non-integral
parameters as well. Since formerly only integer modulus has been
supported, it did not make much sense to cater to the scale with regard
to the result. However, now it does for consistency with other BCMath
operations.
Therefore, we add support for an optional `scale` parameter and fall
back to the default scale (`bcmath.scale`) as usual.
|
|\ \
| | |
| | |
| | |
| | | |
* pull-request/2742:
Fixed bug #66364 (BCMath bcmul ignores scale parameter)
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We change `bcmul()` and `bcpow()` so that the result has exactly the
requested scale (i.e. decimal places) to make them consistent with the
other BCMath functions. This also changes our stance regarding bug
#52748, which had been classified as documentation problem.
We do not manipulate the numbers themselves (anymore), but rather
introduce `bc_num2str_ex()` which accepts a scale parameter that
overrides the scale of the number by omitting extraneous decimals and
adding zeros, respectively. This also allows us to get rid of
`split_bc_num()`, which fixes bug #75164 as well.
|
| | |
|
| |
| |
| |
| | |
The `scale` parameter is now optional.
|
|\ \
| |/
|/| |
|
| |
| |
| |
| | |
Fix for #67855
|
| |
| |
| |
| |
| |
| | |
bcmod() no longer truncates fractionals to integers. This matches
the behavior of fmod(). It also matches the behavior of bcpowmod().
It also matches the behavior of bcmod() in HHVM.
|
| | |
|
| | |
|
| | |
|
| | |
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* PHP-5.6:
Fix memory leak
Fix bug #72099: xml_parse_into_struct segmentation fault
5.5.36 now
Fix bug #72094 - Out of bounds heap read access in exif header processing
Fix bug #72093: bcpowmod accepts negative scale and corrupts _one_ definition
Fix bug #72061 - Out-of-bounds reads in zif_grapheme_stripos with negative offset
Fix for bug #71912 (libgd: signedness vulnerability)
Typo in NEWS
|
| |\ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
* PHP-5.5:
Fix memory leak
Fix bug #72099: xml_parse_into_struct segmentation fault
5.5.36 now
Fix bug #72094 - Out of bounds heap read access in exif header processing
Fix bug #72093: bcpowmod accepts negative scale and corrupts _one_ definition
Fix bug #72061 - Out-of-bounds reads in zif_grapheme_stripos with negative offset
Fix for bug #71912 (libgd: signedness vulnerability)
Typo in NEWS
Conflicts:
configure.in
main/php_version.h
|
| | | |
| | | |
| | | |
| | | |
| | | | |
We can not modify result since it can be copy of _zero_ or _one_, etc. and
"copy" in bcmath is just bumping the refcount.
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | | |
Also re bug #71575.
|
|\ \ \ \
| |/ / /
| | | |
| | | |
| | | | |
* PHP-5.6:
Happy new year (Update copyright to 2016)
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | | |
which also comply with the current semantics for such macros
|
| | | | |
|
| | | | |
|