diff options
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | ext/ereg/ereg.c | 2 | ||||
-rw-r--r-- | ext/standard/reg.c | 2 |
3 files changed, 5 insertions, 0 deletions
@@ -2,6 +2,7 @@ PHP 4.0 CHANGE LOG ChangeLog ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ?? 1999, Version 4.0 Beta 3 +- Fixed backwards incompatibility with ereg() (Thies) - Updated Zend garbage collection with a much more thorough method. (Andi, Zend library) - Added the ability to use variable references in the array() construct. diff --git a/ext/ereg/ereg.c b/ext/ereg/ereg.c index 6382cfd739..c9f84ed973 100644 --- a/ext/ereg/ereg.c +++ b/ext/ereg/ereg.c @@ -261,6 +261,8 @@ static void _php3_ereg(INTERNAL_FUNCTION_PARAMETERS, int icase) end = subs[i].rm_eo; if (start != -1 && end > 0 && start < string_len && end < string_len && start < end) { add_index_stringl(array, i, string+start, end-start, 1); + } else { + add_index_bool(array, i, 0); } } efree(buf); diff --git a/ext/standard/reg.c b/ext/standard/reg.c index 6382cfd739..c9f84ed973 100644 --- a/ext/standard/reg.c +++ b/ext/standard/reg.c @@ -261,6 +261,8 @@ static void _php3_ereg(INTERNAL_FUNCTION_PARAMETERS, int icase) end = subs[i].rm_eo; if (start != -1 && end > 0 && start < string_len && end < string_len && start < end) { add_index_stringl(array, i, string+start, end-start, 1); + } else { + add_index_bool(array, i, 0); } } efree(buf); |