diff options
Diffstat (limited to 'src/sp_utils.c')
| -rw-r--r-- | src/sp_utils.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/sp_utils.c b/src/sp_utils.c index cb6b4a7..41d817e 100644 --- a/src/sp_utils.c +++ b/src/sp_utils.c | |||
| @@ -9,8 +9,8 @@ | |||
| 9 | 9 | ||
| 10 | ZEND_DECLARE_MODULE_GLOBALS(snuffleupagus) | 10 | ZEND_DECLARE_MODULE_GLOBALS(snuffleupagus) |
| 11 | 11 | ||
| 12 | static bool sp_zend_string_equals(const zend_string* s1, | 12 | bool sp_zend_string_equals(const zend_string* s1, |
| 13 | const zend_string* s2) { | 13 | const zend_string* s2) { |
| 14 | // We can't use `zend_string_equals` here because it doesn't work on | 14 | // We can't use `zend_string_equals` here because it doesn't work on |
| 15 | // `const` zend_string. | 15 | // `const` zend_string. |
| 16 | return ZSTR_LEN(s1) == ZSTR_LEN(s2) && | 16 | return ZSTR_LEN(s1) == ZSTR_LEN(s2) && |
| @@ -113,8 +113,9 @@ int sp_log_request(const zend_string* folder, const zend_string* text_repr, | |||
| 113 | HashTable* ht = Z_ARRVAL(PG(http_globals)[zones[i].key]); | 113 | HashTable* ht = Z_ARRVAL(PG(http_globals)[zones[i].key]); |
| 114 | fprintf(file, "%s:", zones[i].str); | 114 | fprintf(file, "%s:", zones[i].str); |
| 115 | ZEND_HASH_FOREACH_STR_KEY_VAL(ht, variable_key, variable_value) { | 115 | ZEND_HASH_FOREACH_STR_KEY_VAL(ht, variable_key, variable_value) { |
| 116 | smart_str a = {0}; | 116 | smart_str a; |
| 117 | 117 | ||
| 118 | memset(&a, 0, sizeof(a)); | ||
| 118 | php_var_export_ex(variable_value, 1, &a); | 119 | php_var_export_ex(variable_value, 1, &a); |
| 119 | ZSTR_VAL(a.s)[ZSTR_LEN(a.s)] = '\0'; | 120 | ZSTR_VAL(a.s)[ZSTR_LEN(a.s)] = '\0'; |
| 120 | fprintf(file, "%s=%s ", ZSTR_VAL(variable_key), ZSTR_VAL(a.s)); | 121 | fprintf(file, "%s=%s ", ZSTR_VAL(variable_key), ZSTR_VAL(a.s)); |
