| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
mb_ereg()/mb_eregi() currently have an inconsistent return value
based on whether the $matches parameter is passed or not:
> Returns the byte length of the matched string if a match for
> pattern was found in string, or FALSE if no matches were found
> or an error occurred.
>
> If the optional parameter regs was not passed or the length of
> the matched string is 0, this function returns 1.
Coupling this behavior to the $matches parameter doesn't make sense
-- we know the match length either way, there is no technical
reason to distinguish them. However, returning the match length
is not particularly useful either, especially due to the need to
convert 0-length into 1-length to satisfy "truthy" checks. We
could always return 1, which would kind of match the behavior of
preg_match() -- however, preg_match() actually returns the number
of matches, which is 0 or 1 for preg_match(), while false signals
an error. However, mb_ereg() returns false both for no match and
for an error. This would result in an odd 1|false return value.
The patch canonicalizes mb_ereg() to always return a boolean,
where true indicates a match and false indicates no match or error.
This also matches the behavior of the mb_ereg_match() and
mb_ereg_search() functions.
This fixes the default value integrity violation in PHP 8.
Closes GH-6331.
|
|
|
|
| |
These functions only accept 4 params.
|
|
|
|
|
| |
These arguments were declared nullable in stubs (and should be
nullable), but didn't accept null in zpp.
|
|
|
|
| |
Closes GH-6207.
|
|
|
|
| |
Closes GH-6171.
|
|
|
|
| |
Closes GH-6173
|
|
|
|
|
| |
This should fix most of the remaining issues with tabs and spaces
being mixed in tests.
|
|
|
|
|
| |
re-add mbfl_convert_filter_feed API
re-add pointer cast
|
|
|
|
| |
Closes GH-6110
|
|
|
|
| |
The $additional_headers parameter shouldn't accept null.
|
|
|
|
|
|
|
| |
They will now follow the canonical order of types. Older macros are
left intact due to maintaining BC.
Closes GH-6112
|
|
|
|
| |
Instead of silently replacing with spaces.
|
|
|
|
| |
Closes GH-5341
|
|
|
|
| |
So remove TODO comment which implies that it's not.
|
|
|
|
|
|
| |
Instead of using either oniguruma or pcre depending on which is
available. We always have PCRE, so use it. This ensures consistent
behavior.
|
| |
|
| |
|
|
|
|
| |
Also correct misspelling of 'hiragana' as 'hirangana' at the same time.
|
| |
|
|
|
|
| |
Explain the 'ZEN' and 'HAN' in symbolic constant names.
|
|
|
|
|
| |
This was the default destructor for mbfl_identify_filter structs, but there's nothing
we actually need to do to those structs before freeing them.
|
|
|
|
|
|
|
| |
This is a default destructor for mbfl_convert_filter structs. The thing is: there
isn't really anything that needs to be done to those structs before freeing them.
The default destructor just zeroed out some fields, but there's no reason why
we should actually do that.
|
| |
|
|
|
|
|
|
| |
Man, I can be pedantic sometimes. Tiny little things like misspelled words just
hurt me inside. So while it's not really a big deal, I couldn't leave these typos
alone...
|
|
|
|
| |
Closes GH-6034
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
These were unused, and almost certainly will never be used:
- MBFL_ENCTYPE_MWC4BE
- MBFL_ENCTYPE_MWC4LE
- MBFL_ENCTYPE_SHFTCODE
- MBFL_ENCTYPE_ENC_STRM
For the latter two, there were some encodings which were marked with these flags;
but nothing ever _checked_ these particular flags.
|
| |
|
|
|
|
|
|
|
| |
This is just a very silly feature of mbstring -- you can compile the source files with
HAVE_MBSTRING undefined, and it will all just compile to (almost) nothing. What is the
use of this? Why compile the source files and link against them if you don't want the
mbstring extension? It doesn't make any kind of sense.
|
|
|
|
|
|
|
|
|
|
|
| |
Very interesting... it turns out that when Valgrind support was enabled,
`#include "config.h"` from within mbstring was actually including the file "config.h"
from Valgrind, and not the one from mbstring!!
This is because -I/usr/include/valgrind was added to the compiler invocation _before_
-Iext/mbstring/libmbfl.
Make sure we actually include the file which was intended.
|
|
|
|
| |
If NULL is not defined by the platform, mbfl_defs.h already defines it.
|
|
|
|
|
|
|
|
|
|
|
| |
This function uses various subfunctions to convert case of Unicode wchars.
Previously, these subfunctions would store the case-converted characters in
a buffer, and the parent function would then pass them (byte by byte) to
the next filter in the filter chain.
Rather than passing around that buffer, it's better for the subfunctions to
directly pass the case-converted bytes to the next filter in the filter chain.
This speeds things up nicely.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- mbfl_buffer_converter_reset
- mbfl_buffer_converter_strncat
- mbfl_buffer_converter_getbuffer
- mbfl_oddlen
- mbfl_filter_output_pipe_flush
- mbfl_memory_device_output2
- mbfl_memory_device_output4
- mbfl_is_support_encoding
- mbfl_buffer_converter_feed2
- _php_mb_regex_globals_dtor
- mime_header_encoder_feed
- mime_header_decoder_feed
- mbfl_convert_filter_feed
|
|
|
|
|
|
| |
Rather than using a magic boolean parameter to choose different behavior of
the subfunction, inline it. The code size doesn't really grow anyways. And
soon these will be trimmed down more.
|
| |
|
|
|
|
|
|
| |
All memory allocation and deallocation for mbstring bounces through a table of
function pointers before going to emalloc/efree/etc. But this is unnecessary.
The allocators are never swapped out. Better to just call them directly.
|
| |
|
|
|
|
|
|
|
|
|
| |
Voidification of Zend API which always succeeded
Use bool argument types instead of int for boolean arguments
Use bool return type for functions which return true/false (1/0)
Use zend_result return type for functions which return SUCCESS/FAILURE as they don't follow normal boolean semantics
Closes GH-6002
|
|
|
|
| |
Closes GH-5958
|
|
|
|
|
|
| |
Otherwise this results in duplicate errors.
Closes GH-5941.
|
|
|
|
| |
Related to GH-5627
|
|
|
|
| |
Closes GH-5598
|
|
|
|
|
|
|
|
|
|
| |
Don't expose references in debug_backtrace() or exception traces.
This is regardless of whether the argument is by-reference or not.
As a side-effect of this change, exception traces may now acquire
the interior value of a reference, which may be unexpected for
some internal functions. This is what necessitated the change in
the spl_array sort implementation.
|
| |
|
|
|
|
| |
Closes GH-5590
|
|\
| |
| |
| |
| | |
* PHP-7.4:
Fix bug #79787
|
| |\
| | |
| | |
| | |
| | | |
* PHP-7.3:
Fix bug #79787
|
| | |
| | |
| | |
| | | |
Closes GH-5807.
|
| | |
| | |
| | |
| | | |
Closes GH-5758
|