Christoph M. Becker
271ae3eb2b
Fix #76574 : use of undeclared identifiers INT_MAX and LONG_MAX
...
As of Oniguruma 6.4.0 <limits.h> is required, so we have to add a check
for this header file to set the respective macro.
2018-07-10 14:28:28 +02:00
Christoph M. Becker
1c01b1ab48
Fix #76594 : Bus Error due to unaligned access in zend_ini.c OnUpdateLong
...
Since commit ea83b69[1] changed the type of mbstring.strict_detection
from `long` to `zend_bool`, we have to update the `on_modify` callback
as well.
[1] http://git.php.net/?p=php-src.git;a=commit;h=ea83b69883f3f77fd27e4663fa854c88f141ab41
2018-07-09 00:54:36 +02:00
Nikita Popov
41a6625c09
Add UPGRADING for mb_ereg changes
...
Also some minor code cleanup.
2018-07-07 11:06:29 +02:00
ju1ius
8f1782678e
adds support for named subpatterns to mb_ereg_replace
...
Named subpatterns are now passed to `mb_ereg_replace_callback`.
This commit also adds a subset of the oniguruma back-reference syntax
for replacements:
* `\k<name>` and `\k'name'` for named subpatterns.
* `\k<n>` and `\k'n'` for numbered subpatterns
These last two notations allow referencing numbered groups where n > 9.
2018-07-06 23:34:54 +02:00
ju1ius
212f56b7ca
adds support for named captures to mb_ereg & mb_ereg_search
...
`mb_ereg`, `mb_ereg_search_regs` & `mb_ereg_search_getregs`
returned only numbered capturing groups.
Now they return both numbered and named capturing groups.
Fixes Bug #72704 .
2018-07-06 23:34:54 +02:00
Anatol Belski
0630e3bc03
Reduce error buffer size
...
120 bytes is ample, the doc says.
2018-07-05 17:24:38 +02:00
Dmitry Stogov
265c3ed6cf
Fixed incorrrecr zval_dtor() usage to replace value of argument passed by reference, that may lead to memory leaks.
2018-07-05 10:57:49 +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
Nikita Popov
a7101415cb
Merge branch 'PHP-7.2'
2018-06-28 23:06:08 +02:00
Nikita Popov
00c0d7702c
Merge branch 'PHP-7.1' into PHP-7.2
2018-06-28 23:05:09 +02:00
Marcus Schwarz
bf5a802f5a
Fixed bug #76532 (excessive memory usage in mb_strimwidth)
2018-06-28 23:02:28 +02:00
Nikita Popov
e357f67faf
Remove code duplication
...
And fix indentation
2018-06-20 15:05:08 +02:00
Nikita Popov
f2be6e732a
Update data tables for Unicode 11
2018-06-11 20:25:37 +02:00
Anatol Belski
3b07c6cf87
Skip tests when Oniguruma is disabled
2018-06-11 17:44:34 +02:00
Anatol Belski
a34ba6f30c
Fix mbstring fallback when --disable-mbregex used
2018-06-11 17:44:34 +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
Christoph M. Becker
2c4556ee43
Update to Oniguruma 6.8.2
2018-05-26 14:03:20 +02:00
Nikita Popov
9d63f4dec1
Fixed bug #76319
...
While at it, also make sure that mbstring case conversion takes
into account the specified substitution character and substitution
mode.
2018-05-25 11:33:13 +02:00
Anatol Belski
f9cfc029a5
Rework datatypes wrt warnings
2018-03-20 22:09:48 +01:00
Christoph M. Becker
ec5b408d81
Update to Oniguruma 6.8.1
2018-03-20 17:44:27 +01:00
Christoph M. Becker
8d9f47fb51
Merge branch 'PHP-7.2'
...
* PHP-7.2:
Fix #76113 : mbstring does not build with Oniguruma 6.8.1
2018-03-20 17:02:52 +01:00
Christoph M. Becker
8f5c34cd39
Merge branch 'PHP-7.1' into PHP-7.2
...
* PHP-7.1:
Fix #76113 : mbstring does not build with Oniguruma 6.8.1
2018-03-20 16:53:17 +01:00
Christoph M. Becker
4072b27870
Fix #76113 : mbstring does not build with Oniguruma 6.8.1
...
As of Oniguruma 6.8.1, the regex structure has been moved from the
public `oniguruma.h` to the private `regint.h`. Thus, it is no longer
possible to directly access the struct's members, and actually, there
is no need to, since there are respective accessor functions available
at least of 2.3.1.
2018-03-20 16:42:28 +01:00
Christoph M. Becker
9004985273
Merge branch 'PHP-7.2'
...
* PHP-7.2:
Fix #75944 : Wrong cp1251 detection
2018-03-19 14:48:10 +01:00
Christoph M. Becker
cd2912af5e
Merge branch 'PHP-7.1' into PHP-7.2
...
* PHP-7.1:
Fix #75944 : Wrong cp1251 detection
2018-03-19 14:34:09 +01:00
Christoph M. Becker
47461368ca
Fix #75944 : Wrong cp1251 detection
...
`\xFF` is a valid character of CP-1251.
2018-03-19 14:24:27 +01:00
Christoph M. Becker
ef01ec08f0
Merge branch 'PHP-7.2'
...
* PHP-7.2:
Fix #62545 : wrong unicode mapping in some charsets
2018-03-11 18:05:08 +01:00
Christoph M. Becker
2b02e6dff3
Merge branch 'PHP-7.1' into PHP-7.2
...
* PHP-7.1:
Fix #62545 : wrong unicode mapping in some charsets
2018-03-11 17:54:45 +01:00
Christoph M. Becker
01ea314e8c
Fix #62545 : wrong unicode mapping in some charsets
...
Undefined characters are best mapped to Unicode REPLACEMENT characters.
2018-03-11 17:38:28 +01:00
Christoph M. Becker
d48b233991
Update to Oniguruma 6.7.1
...
We also apply the still relevant parts of `oniguruma.patch` and update
the patch accordingly.
2018-03-10 01:07:00 +01:00
Gabriel Caruso
e1cc4863d9
Remove duplicated tests
2018-02-22 13:03:21 +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
Anatol Belski
0bc4cf901c
Fix unsigned comparisons
2018-02-17 13:02:50 +01:00
Gabriel Caruso
21e3b0c70c
Remove trailing whitespace in inc files
2018-02-10 19:20:23 +01:00
Gabriel Caruso
2d48d734a2
Fix some misspellings
2018-02-06 16:59:00 +01:00
Nikita Popov
d7fe32500e
Match strpos() behavior with mbstring.func_overload
...
mb_strpos() specifically emulates strpos() behavior when function
overloading is enabled. However, the condition was not changed
when strpos() behavior changed in PHP 7.
2018-02-05 20:58:15 +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
Stanislav Malyshev
3616b6b935
Cleanup some tests - remove unnecessary sections
...
Also unify credits - all are under --CREDITS-- now.
2018-02-04 02:21:40 -08:00
Gabriel Caruso
c6c9e71a5b
Add missing SKIPIF sections
2018-02-03 13:54:34 +01:00
Nat Zimmermann
478af26d84
Update mb_preferred_mime_name tests
2018-01-26 22:25:18 +01:00
Nat Zimmermann
6fb78e3017
Add unknown encoding warning test for mb_encoding_aliases
2018-01-26 22:25:18 +01: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
a76eeea736
Merge branch 'PHP-7.2'
...
* PHP-7.2:
Happy new year (Update copyright to 2018)
Conflicts:
ext/phar/LICENSE
2018-01-03 16:02:15 +08:00
Xinchen Hui
0e62639d28
Merge branch 'PHP-7.1' into PHP-7.2
...
* PHP-7.1:
Happy new year (Update copyright to 2018)
2018-01-03 16:00:34 +08:00
Lior Kaplan
fbfdd1e1c4
Happy new year (Update copyright to 2018)
2018-01-02 23:42:29 +02: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