diff options
| author | Ben Fuhrmannek | 2021-02-16 11:16:59 +0100 |
|---|---|---|
| committer | Ben Fuhrmannek | 2021-02-16 11:16:59 +0100 |
| commit | 5484bcb5eb2714e7438927e2566c86a74d7c51af (patch) | |
| tree | b78326d2999397be4c08e06b23209981f82a4ea9 /src/sp_var_value.c | |
| parent | 7ac1e3866ef4f146c6c93a5ca13b9aebb14e936a (diff) | |
| parent | cecfdd808da67be908dbe7144cc8c74dfb3f855e (diff) | |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'src/sp_var_value.c')
| -rw-r--r-- | src/sp_var_value.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/sp_var_value.c b/src/sp_var_value.c index 7f08c46..b9ac357 100644 --- a/src/sp_var_value.c +++ b/src/sp_var_value.c | |||
| @@ -50,8 +50,7 @@ static zval *get_local_var(zend_execute_data *ed, const char *var_name) { | |||
| 50 | 50 | ||
| 51 | static zval *get_constant(const char *value) { | 51 | static zval *get_constant(const char *value) { |
| 52 | zend_string *name = zend_string_init(value, strlen(value), 0); | 52 | zend_string *name = zend_string_init(value, strlen(value), 0); |
| 53 | zval *zvalue = zend_get_constant_ex(name, NULL, 0); | 53 | zval *zvalue = zend_get_constant_ex(name, NULL, ZEND_FETCH_CLASS_SILENT); |
| 54 | |||
| 55 | zend_string_release(name); | 54 | zend_string_release(name); |
| 56 | return zvalue; | 55 | return zvalue; |
| 57 | } | 56 | } |
| @@ -71,12 +70,19 @@ static zval *get_var_value(zend_execute_data *ed, const char *var_name, | |||
| 71 | if (is_param) { | 70 | if (is_param) { |
| 72 | zval *zvalue = get_param_var(ed, var_name); | 71 | zval *zvalue = get_param_var(ed, var_name); |
| 73 | if (!zvalue) { | 72 | if (!zvalue) { |
| 74 | return get_local_var(ed, var_name); | 73 | char *complete_function_path = get_complete_function_path(ed); |
| 74 | sp_log_warn("config", | ||
| 75 | "It seems that you are filtering on a parameter " | ||
| 76 | "'%s' of the function '%s', but the parameter does " | ||
| 77 | "not exists.", | ||
| 78 | var_name, complete_function_path); | ||
| 79 | efree(complete_function_path); | ||
| 80 | return NULL; | ||
| 75 | } | 81 | } |
| 76 | return zvalue; | 82 | return zvalue; |
| 83 | } else { | ||
| 84 | return get_local_var(ed, var_name); | ||
| 77 | } | 85 | } |
| 78 | |||
| 79 | return get_local_var(ed, var_name); | ||
| 80 | } | 86 | } |
| 81 | 87 | ||
| 82 | static void *get_entry_hashtable(const HashTable *ht, const char *entry, | 88 | static void *get_entry_hashtable(const HashTable *ht, const char *entry, |
