diff options
author | Andrey Hristov <andrey@php.net> | 1999-06-09 21:13:05 +0000 |
---|---|---|
committer | Andrey Hristov <andrey@php.net> | 1999-06-09 21:13:05 +0000 |
commit | 3d45dd58b87b847271bdf483f7ead1db5465f86d (patch) | |
tree | c0ccb94cfaa59c5257b08b9e91b9c4f3846d3a7a /ext/pcre/pcre.c | |
parent | b484f40c31612212d20cea69e0c0d8fa204f4e8a (diff) | |
download | php-git-3d45dd58b87b847271bdf483f7ead1db5465f86d.tar.gz |
Fixed a bug in preg_split.
Fixed a bug in array_shift/array_pop.
Diffstat (limited to 'ext/pcre/pcre.c')
-rw-r--r-- | ext/pcre/pcre.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/pcre/pcre.c b/ext/pcre/pcre.c index eb91b954a1..39662be2ec 100644 --- a/ext/pcre/pcre.c +++ b/ext/pcre/pcre.c @@ -829,9 +829,9 @@ PHP_FUNCTION(preg_split) limit_val--; } else { /* if no match */ - /* Add the last piece to the return value, if there - were matches before */ - if (piece > subject->value.str.val) + /* Add the last piece to the return value, if there is + something left */ + if (limit != 0) add_next_index_stringl(return_value, piece, subject_end-piece, 1); |