moriyoshi Mon Oct 7 12:17:22 2002 EDT Modified files: (Branch: PHP_4_3) /php4/ext/mbstring php_mbregex.c Log: MFH Index: php4/ext/mbstring/php_mbregex.c diff -u php4/ext/mbstring/php_mbregex.c:1.5.2.2 php4/ext/mbstring/php_mbregex.c:1.5.2.3 --- php4/ext/mbstring/php_mbregex.c:1.5.2.2 Sun Oct 6 12:48:51 2002 +++ php4/ext/mbstring/php_mbregex.c Mon Oct 7 12:17:22 2002 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_mbregex.c,v 1.5.2.2 2002/10/06 16:48:51 moriyoshi Exp $ */ +/* $Id: php_mbregex.c,v 1.5.2.3 2002/10/07 16:17:22 moriyoshi Exp $ */ #ifdef HAVE_CONFIG_H @@ -430,15 +430,15 @@ pos = 0; while (err >= 0) { err = mbre_search(&re, string, string_len, pos, string_len - pos, ®s); - if ( regs.beg[0] == regs.end[0] ) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Empty regular expression"); - break; - } if (err <= -2) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "mbregex search failure in php_mbereg_replace_exec()"); break; } if (err >= 0) { + if ( regs.beg[0] == regs.end[0] ) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Empty +regular expression"); + break; + } /* copy the part of the string before the match */ php_mbregex_strbuf_ncat(&outdev, &string[pos], regs.beg[0] - pos); /* copy replacement and backrefs */
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php