Skip to content

Commit 66a069d

Browse files
committed
chore(agent): simplify if statement
1 parent 3151125 commit 66a069d

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

agent/php_api.c

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -172,27 +172,19 @@ PHP_FUNCTION(newrelic_notice_error) {
172172
}
173173
}
174174

175-
if (!determine) {
176-
char* stack_json = nr_php_backtrace_to_json(NULL TSRMLS_CC);
177-
178-
nr_txn_record_error(NRPRG(txn), priority, true, errormsgstr, errclass,
179-
stack_json);
180-
181-
nr_free(stack_json);
182-
183-
RETURN_TRUE;
184-
}
185175
if (determine) {
186176
char* stack_json = nr_php_backtrace_to_json(NULL TSRMLS_CC);
187-
188177
nr_txn_record_error_with_additional_attributes(
189178
NRPRG(txn), priority, true, errormsgstr, errclass, error_file,
190179
error_line, error_context, error_number, stack_json);
191-
192180
nr_free(stack_json);
193-
194181
RETURN_TRUE;
195182
}
183+
char* stack_json = nr_php_backtrace_to_json(NULL TSRMLS_CC);
184+
nr_txn_record_error(NRPRG(txn), priority, true, errormsgstr, errclass,
185+
stack_json);
186+
nr_free(stack_json);
187+
RETURN_TRUE;
196188
}
197189

198190
/*

0 commit comments

Comments
 (0)