Skip to content

Commit d7a69f1

Browse files
committed
Support for oniguruma 6.8
1 parent d6e16be commit d7a69f1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/mbstring/php_mbregex.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ static php_mb_regex_t *php_mbregex_compile_pattern(const char *pattern, int patl
454454
OnigUChar err_str[ONIG_MAX_ERROR_MESSAGE_LEN];
455455

456456
found = zend_hash_find(&MBREX(ht_rc), (char *)pattern, patlen+1, (void **) &rc);
457-
if (found == FAILURE || (*rc)->options != options || (*rc)->enc != enc || (*rc)->syntax != syntax) {
457+
if (found == FAILURE || onig_get_options(*rc) != options || onig_get_encoding(*rc) != enc || onig_get_syntax(*rc) != syntax) {
458458
if ((err_code = onig_new(&retval, (OnigUChar *)pattern, (OnigUChar *)(pattern + patlen), options, enc, syntax, &err_info)) != ONIG_NORMAL) {
459459
onig_error_code_to_str(err_str, err_code, &err_info);
460460
php_error_docref(NULL TSRMLS_CC, E_WARNING, "mbregex compile err: %s", err_str);

0 commit comments

Comments
 (0)