Skip to content

Commit fa779f5

Browse files
committed
chore(agent): add check for request uri
1 parent f358d9d commit fa779f5

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

agent/fw_cakephp.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,8 +295,12 @@ NR_PHP_WRAPPER(nr_cakephp_error_handler_wrapper) {
295295
nrl_verbosedebug(NRL_FRAMEWORK, "%s: unable to record exception", __func__);
296296
}
297297

298-
nr_txn_set_path("CakePHP", NRPRG(txn), request_uri, NR_PATH_TYPE_URI,
299-
NR_NOT_OK_TO_OVERWRITE);
298+
if (NULL != request_uri) {
299+
nr_txn_set_path("CakePHP", NRPRG(txn), request_uri, NR_PATH_TYPE_URI,
300+
NR_OK_TO_OVERWRITE);
301+
} else {
302+
nrl_verbosedebug(NRL_FRAMEWORK, "%s: request uri is NULL", __func__);
303+
}
300304

301305
end:
302306
nr_php_arg_release(&exception);

0 commit comments

Comments
 (0)