From a5f070cd7d982ae96ad72fb79420407574e7682a Mon Sep 17 00:00:00 2001 From: jvoisin Date: Mon, 27 Jun 2022 20:55:20 +0200 Subject: Dump the eval'ed code --- src/sp_utils.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/sp_utils.c') diff --git a/src/sp_utils.c b/src/sp_utils.c index df2f0d6..d7200b1 100644 --- a/src/sp_utils.c +++ b/src/sp_utils.c @@ -177,6 +177,15 @@ int sp_log_request(const zend_string* restrict folder, const zend_string* restri ZEND_HASH_FOREACH_END(); fputs("\n", file); } + + if (UNEXPECTED(0 != SPG(in_eval))) { +#if PHP_VERSION_ID >= 80000 + fprintf(file, "EVAL_CODE: %s\n", ZSTR_VAL(SPG(eval_source_string))); +#else + fprintf(file, "EVAL_CODE: %s\n", ZSTR_VAL(zval_get_string(SPG(eval_source_string)))); +#endif + } + fclose(file); return 0; -- cgit v1.3