When `mb_ereg` failed to match, it didn't update the `$regs` argument.
Now it will always set it to the empty array.
- EXIF:
. Fixed bug #72735 (Samsung picture thumb not read (zero size)). (Kalle, Remi)
+- mbstring:
+ . Fixed bug #72711 (`mb_ereg` does not clear the `$regs` parameter on
+ failure). (ju1ius)
+
- Stream:
. Fixed bug #72743 (Out-of-bound read in php_stream_filter_create).
(Loianhtuan)
. When calling json_encode with JSON_UNESCAPED_UNICODE option, U+2028 and
U+2029 are escaped.
+- mbstring:
+ . mb_ereg() and mb_eregi() will now set the $regs argument to an empty array,
+ if nothing matched. Formerly, $regs was not modified in that case.
+
- OpenSSL:
. Dropped sslv2 stream.
RETURN_FALSE;
}
+ if (array != NULL) {
+ zval_dtor(array);
+ array_init(array);
+ }
+
options = MBREX(regex_default_options);
if (icase) {
options |= ONIG_OPTION_IGNORECASE;
match_len = 1;
str = string;
if (array != NULL) {
- zval_dtor(array);
- array_init(array);
match_len = regs->end[0] - regs->beg[0];
for (i = 0; i < regs->num_regs; i++) {
Warning: mb_ereg(): empty pattern in %s on line %d
bool(false)
-NULL
+array(0) {
+}
-- Iteration 2 --
Without $regs arg:
Warning: mb_ereg(): empty pattern in %s on line %d
bool(false)
-NULL
+array(0) {
+}
-- Iteration 3 --
Without $regs arg:
Warning: mb_ereg(): empty pattern in %s on line %d
bool(false)
-NULL
+array(0) {
+}
-- Iteration 4 --
Without $regs arg:
Warning: mb_ereg(): empty pattern in %s on line %d
bool(false)
-NULL
+array(0) {
+}
-- Iteration 5 --
Without $regs arg:
Warning: mb_ereg(): empty pattern in %s on line %d
bool(false)
-NULL
+array(0) {
+}
-- Iteration 6 --
Without $regs arg:
Warning: mb_ereg(): empty pattern in %s on line %d
bool(false)
-NULL
+array(0) {
+}
-- Iteration 7 --
Without $regs arg:
Warning: mb_ereg(): empty pattern in %s on line %d
bool(false)
-NULL
+array(0) {
+}
-- Iteration 8 --
Without $regs arg:
Warning: mb_ereg(): empty pattern in %s on line %d
bool(false)
-NULL
+array(0) {
+}
[1]=>
int(2)
[2]=>
- int(3)
+ array(0) {
+ }
}
Warning: mb_ereg(): empty pattern in %s on line %d
[1]=>
string(0) ""
[2]=>
- string(0) ""
+ array(0) {
+ }
}
Notice: Array to string conversion in %s on line %d
[1]=>
int(1)
[2]=>
- string(0) ""
+ array(0) {
+ }
}
Warning: mb_ereg() expects parameter 2 to be string, array given in %s on line %d
string(8) "MTIzNA=="
}
bool(false)
-NULL
-Done
\ No newline at end of file
+array(0) {
+}
+Done
-- Iteration 1 --
bool(false)
-NULL
+array(0) {
+}
-- Iteration 2 --
bool(false)
-NULL
+array(0) {
+}
-- Iteration 3 --
bool(false)
-NULL
+array(0) {
+}
-- Iteration 4 --
bool(false)
-NULL
+array(0) {
+}
-- Iteration 5 --
bool(false)
-NULL
+array(0) {
+}
-- Iteration 6 --
bool(false)
-NULL
+array(0) {
+}
-- Iteration 7 --
bool(false)
-NULL
+array(0) {
+}
-- Iteration 8 --
bool(false)
-NULL
+array(0) {
+}
-- Iteration 9 --
bool(false)
-NULL
+array(0) {
+}
-- Iteration 10 --
bool(false)
-NULL
+array(0) {
+}
-- Iteration 11 --
bool(false)
-NULL
+array(0) {
+}
-- Iteration 12 --
int(6)
-- Iteration 14 --
bool(false)
-NULL
+array(0) {
+}
-- Iteration 15 --
bool(false)
-NULL
+array(0) {
+}
-- Iteration 16 --
bool(false)
-NULL
+array(0) {
+}
Done
-- Iteration 1 --
bool(false)
-NULL
+array(0) {
+}
-- Iteration 2 --
bool(false)
-NULL
+array(0) {
+}
-- Iteration 3 --
bool(false)
-NULL
+array(0) {
+}
-- Iteration 4 --
bool(false)
-NULL
+array(0) {
+}
-- Iteration 5 --
bool(false)
-NULL
+array(0) {
+}
-- Iteration 6 --
bool(false)
-NULL
+array(0) {
+}
-- Iteration 7 --
bool(false)
-NULL
+array(0) {
+}
-- Iteration 8 --
bool(false)
-NULL
+array(0) {
+}
-- Iteration 9 --
bool(false)
-NULL
+array(0) {
+}
-- Iteration 10 --
bool(false)
-NULL
+array(0) {
+}
-- Iteration 11 --
bool(false)
-NULL
+array(0) {
+}
-- Iteration 12 --
bool(false)
-NULL
+array(0) {
+}
-- Iteration 13 --
bool(false)
-NULL
+array(0) {
+}
-- Iteration 14 --
bool(false)
-NULL
+array(0) {
+}
-- Iteration 15 --
bool(false)
-NULL
+array(0) {
+}
-- Iteration 16 --
bool(false)
-NULL
+array(0) {
+}
-- Iteration 17 --
bool(false)
-NULL
+array(0) {
+}
-- Iteration 18 --
int(3)
-- Iteration 20 --
bool(false)
-NULL
+array(0) {
+}
-- Iteration 21 --
bool(false)
-NULL
+array(0) {
+}
-- Iteration 22 --
bool(false)
-NULL
+array(0) {
+}
-- Iteration 23 --
bool(false)
-NULL
+array(0) {
+}
-- Iteration 24 --