From d875912a0528931c0828edfe30c37c01b559b761 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Fri, 13 Oct 2017 16:14:00 +0200 Subject: Maybe this will address #35 - We shouldn't assume that people are only using regexps - Make an internal function a bit more obvious --- src/sp_execute.c | 2 +- src/sp_utils.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/sp_execute.c b/src/sp_execute.c index bfe73c1..59f6884 100644 --- a/src/sp_execute.c +++ b/src/sp_execute.c @@ -37,7 +37,7 @@ static void construct_include_handler(const char * const filename) { while (config) { sp_disabled_function *config_node = (sp_disabled_function*)(config->data); - if (true == is_regexp_matching(config_node->regexp, filename)) { + if (true == sp_match_value(filename, config_node->value, config_node->regexp)) { if (true == config_node->allow) { return; } diff --git a/src/sp_utils.c b/src/sp_utils.c index faf2e9a..8731164 100644 --- a/src/sp_utils.c +++ b/src/sp_utils.c @@ -235,7 +235,7 @@ char* sp_convert_to_string(zval* zv) { bool sp_match_value(const char* value, const char* to_match, const pcre* rx) { if (to_match) { - if (0 == strcmp(value, to_match)) { + if (0 == strcmp(to_match, value)) { return true; } } else if (rx) { -- cgit v1.3