Created
June 30, 2020 10:51
-
-
Save derickr/f0a79a5573c2174401f455285a53bcc2 to your computer and use it in GitHub Desktop.
yii-fix.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git instana_callbacks/yii_log.c instana_callbacks/yii_log.c | |
index 929e26a..71c032e 100644 | |
--- instana_callbacks/yii_log.c | |
+++ instana_callbacks/yii_log.c | |
@@ -27,10 +27,9 @@ void tracing_trace_callback_yii_log(tracer_frame_t *frame, zend_execute_data *da | |
} | |
lvl = ZEND_CALL_ARG(data, 2); | |
- if (!lvl) { | |
+ if (!lvl || Z_TYPE_P(lvl) != IS_LONG) { | |
return; | |
} | |
- convert_to_long(lvl); | |
if (!INSTANA_G(yii_log_map_init)) { | |
tracing_trace_yii_log_init_map(TSRMLS_C); | |
@@ -42,10 +41,9 @@ void tracing_trace_callback_yii_log(tracer_frame_t *frame, zend_execute_data *da | |
} | |
msg = ZEND_CALL_ARG(data, 1); | |
- if (!msg) { | |
+ if (!msg || Z_TYPE_P(msg) != IS_STRING) { | |
return; | |
} | |
- convert_to_string(msg); | |
tracing_span_create(frame, "log.yii", sizeof("log.yii")-1 TSRMLS_CC); | |
if (0 == idx) { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment