Skip to content

Commit e27a78e

Browse files
committed
fix(agent): Expectations needed to be flipped after a previous refactor
1 parent d6f40fa commit e27a78e

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

agent/lib_php_amqplib.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,15 +172,14 @@ static inline void nr_php_amqplib_get_host_and_port(
172172
return;
173173
}
174174

175-
/* construct params are always saved to use for cloning purposes. */
176-
177175
if (!nr_php_is_zval_valid_object(amqp_connection)) {
178176
return;
179177
}
180178

179+
/* construct_params are always saved to use for cloning purposes. */
181180
connect_constructor_params
182181
= nr_php_get_zval_object_property(amqp_connection, "construct_params");
183-
if (nr_php_is_zval_valid_array(connect_constructor_params)) {
182+
if (!nr_php_is_zval_valid_array(connect_constructor_params)) {
184183
return;
185184
}
186185

@@ -194,7 +193,7 @@ static inline void nr_php_amqplib_get_host_and_port(
194193

195194
amqp_port = nr_php_zend_hash_index_find(
196195
Z_ARRVAL_P(connect_constructor_params), AMQP_CONSTRUCT_PARAMS_PORT_INDEX);
197-
if (IS_LONG != Z_TYPE_P((amqp_port))) {
196+
if (IS_LONG == Z_TYPE_P((amqp_port))) {
198197
message_params->server_port = Z_LVAL_P(amqp_port);
199198
}
200199
}

0 commit comments

Comments
 (0)