Skip to content

Commit fd1b157

Browse files
committed
chore(agent): remove obsolete code (13/17) (#1082)
This PR removes obsolete `PHP7` codeblocks. PR: 13/17
1 parent c3f8d28 commit fd1b157

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

agent/php_txn.c

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,7 @@ static void nr_php_set_initial_path(nrtxn_t* txn TSRMLS_DC) {
6464
return;
6565
}
6666

67-
#ifdef PHP7
6867
server = &PG(http_globals)[TRACK_VARS_SERVER];
69-
#else
70-
server = PG(http_globals)[TRACK_VARS_SERVER];
71-
#endif /* PHP7 */
7268

7369
if (nr_php_is_zval_valid_array(server)) {
7470
if ((NR_PHP_PROCESS_GLOBALS(special_flags).enable_path_translated)
@@ -89,17 +85,10 @@ static void nr_php_set_initial_path(nrtxn_t* txn TSRMLS_DC) {
8985
"SCRIPT_NAME"))) {
9086
whence = "WT_IS_FILENAME & SCRIPT_NAME";
9187
/* uri has a zval with the name of the script */
92-
#ifdef PHP7
9388
} else if (CG(active_op_array)) {
9489
whence = "WT_IS_FILENAME & op_array";
9590
suri = nr_php_op_array_file_name(CG(active_op_array));
9691
/* suri has a char* to the name of the script */
97-
#else
98-
} else if (EG(active_op_array)) {
99-
whence = "WT_IS_FILENAME & op_array";
100-
suri = nr_php_op_array_file_name(EG(active_op_array));
101-
/* suri has a char* to the name of the script */
102-
#endif /* PHP7 */
10392
}
10493

10594
if ((NULL == uri) && (NULL == suri)) {
@@ -213,29 +202,21 @@ static int nr_php_capture_request_parameter(zval* element,
213202
nr_double_to_str(datastr, sizeof(datastr), Z_DVAL_P(element));
214203
break;
215204

216-
#ifdef PHP7
217205
case IS_TRUE:
218206
nr_strcpy(datastr, "true");
219207
break;
220208

221209
case IS_FALSE:
222210
nr_strcpy(datastr, "false");
223211
break;
224-
#else
225-
case IS_BOOL:
226-
nr_strcpy(datastr, Z_BVAL_P(element) ? "true" : "false");
227-
break;
228-
#endif /* PHP7 */
229212

230213
case IS_STRING: {
231214
nr_string_len_t len;
232215

233-
#ifdef PHP7
234216
if (NULL == Z_STR_P(element)) {
235217
nr_strcpy(datastr, "[invalid string]");
236218
break;
237219
}
238-
#endif /* PHP7 */
239220

240221
len = Z_STRLEN_P(element) < NR_MAX_STRLEN ? Z_STRLEN_P(element)
241222
: NR_MAX_STRLEN - 1;

0 commit comments

Comments
 (0)