File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -193,6 +193,13 @@ static void php_pcre_efree(void *block, void *data)
193193 efree (block );
194194}
195195
196+ #ifdef PCRE2_EXTRA_ALLOW_LOOKAROUND_BSK
197+ /* pcre 10.38 needs PCRE2_EXTRA_ALLOW_LOOKAROUND_BSK, disabled by default */
198+ #define PHP_PCRE_DEFAULT_EXTRA_COPTIONS PCRE2_EXTRA_ALLOW_LOOKAROUND_BSK
199+ #else
200+ #define PHP_PCRE_DEFAULT_EXTRA_COPTIONS 0
201+ #endif
202+
196203#define PHP_PCRE_PREALLOC_MDATA_SIZE 32
197204
198205static void php_pcre_init_pcre2 (uint8_t jit )
@@ -213,6 +220,8 @@ static void php_pcre_init_pcre2(uint8_t jit)
213220 }
214221 }
215222
223+ pcre2_set_compile_extra_options (cctx , PHP_PCRE_DEFAULT_EXTRA_COPTIONS );
224+
216225 if (!mctx ) {
217226 mctx = pcre2_match_context_create (gctx );
218227 if (!mctx ) {
You can’t perform that action at this time.
0 commit comments