diff options
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, |
