From 315f2059b70b5c7a977587a078f5e3ad512ad058 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Mon, 3 Jun 2024 19:57:12 +0200 Subject: [PATCH] Remove dead check in pcre This isn't reachable since ab32d36, because since then the library itself checks this condition during compilation. The compilation failure that results of it makes this code not reachable. This is split off of GH-14424. --- ext/pcre/php_pcre.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index 3047f889419..599326a6d12 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -550,11 +550,6 @@ static zend_string **make_subpats_table(uint32_t num_subpats, pcre_cache_entry * unsigned short name_idx = 0x100 * (unsigned char)name_table[0] + (unsigned char)name_table[1]; const char *name = name_table + 2; subpat_names[name_idx] = zend_string_init(name, strlen(name), 0); - if (is_numeric_string(ZSTR_VAL(subpat_names[name_idx]), ZSTR_LEN(subpat_names[name_idx]), NULL, NULL, 0) > 0) { - php_error_docref(NULL, E_WARNING, "Numeric named subpatterns are not allowed"); - free_subpats_table(subpat_names, num_subpats); - return NULL; - } name_table += name_size; } return subpat_names;