Skip to content

Commit 2a8975e

Browse files
committed
chore(agent): fix code
1 parent 9118bff commit 2a8975e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

agent/fw_cakephp.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,7 @@ NR_PHP_WRAPPER_END
274274
*/
275275
NR_PHP_WRAPPER(nr_cakephp_error_handler_wrapper) {
276276
zval* exception = NULL;
277+
char* request_uri = nr_strdup(nr_php_get_server_global("REQUEST_URI"));
277278

278279
NR_UNUSED_SPECIALFN;
279280
(void)wraprec;
@@ -294,12 +295,12 @@ NR_PHP_WRAPPER(nr_cakephp_error_handler_wrapper) {
294295
nrl_verbosedebug(NRL_FRAMEWORK, "%s: unable to record exception", __func__);
295296
}
296297

297-
nr_txn_set_path("CakePHP", NRPRG(txn),
298-
nr_php_get_server_global("REQUEST_URI"), NR_PATH_TYPE_ACTION,
298+
nr_txn_set_path("CakePHP", NRPRG(txn), request_uri, NR_PATH_TYPE_ACTION,
299299
NR_NOT_OK_TO_OVERWRITE);
300300

301301
end:
302302
nr_php_arg_release(&exception);
303+
nr_free(request_uri);
303304
}
304305
NR_PHP_WRAPPER_END
305306

0 commit comments

Comments
 (0)