Use object's copied text (fixes some bug somehow).

This commit is contained in:
Andrei Zmievski 2006-06-28 14:44:36 +00:00
parent 8e258b50ea
commit b2b4988c12

View file

@ -563,8 +563,8 @@ PHP_METHOD(TextIterator, __construct)
UErrorCode status = U_ZERO_ERROR;
UErrorCode status2 = U_ZERO_ERROR;
locale = locale ? locale : UG(default_locale);
intern->u.brk.iter = ubrk_open(brk_type_map[intern->type - ITER_CHARACTER], locale, text, text_len, &status);
intern->u.brk.n_iter = ubrk_open(brk_type_map[intern->type - ITER_CHARACTER], locale, text, text_len, &status);
intern->u.brk.iter = ubrk_open(brk_type_map[intern->type - ITER_CHARACTER], locale, intern->text, intern->text_len, &status);
intern->u.brk.n_iter = ubrk_open(brk_type_map[intern->type - ITER_CHARACTER], locale, intern->text, intern->text_len, &status);
if (!U_SUCCESS(status) || !U_SUCCESS(status2)) {
php_error(E_RECOVERABLE_ERROR, "Could not create UBreakIterator for '%s' locale: %s", locale, u_errorName(status));
return;