summaryrefslogtreecommitdiff
path: root/src/sp_utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sp_utils.c')
-rw-r--r--src/sp_utils.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/sp_utils.c b/src/sp_utils.c
index fdd2b66..1ba0fe7 100644
--- a/src/sp_utils.c
+++ b/src/sp_utils.c
@@ -183,19 +183,14 @@ int sp_log_request(const char* folder) {
183 183
184static char *zv_str_to_char(zval *zv) { 184static char *zv_str_to_char(zval *zv) {
185 zval copy; 185 zval copy;
186 char *ret;
187
188 186
189 ZVAL_ZVAL(&copy, zv, 1, 0); 187 ZVAL_ZVAL(&copy, zv, 1, 0);
190 // str = zend_string_dup(Z_STR_P(zv), 0);
191 for (size_t i = 0; i < Z_STRLEN(copy); i++) { 188 for (size_t i = 0; i < Z_STRLEN(copy); i++) {
192 if (Z_STRVAL(copy)[i] == '\0') { 189 if (Z_STRVAL(copy)[i] == '\0') {
193 Z_STRVAL(copy)[i] = '0'; 190 Z_STRVAL(copy)[i] = '0';
194 } 191 }
195 } 192 }
196 ret = estrdup(Z_STRVAL(copy)); 193 return estrdup(Z_STRVAL(copy));
197 // zend_string_release(str);
198 return ret;
199} 194}
200 195
201 196