Skip to content

Commit ae2a70b

Browse files
committed
NULL check
1 parent f447a56 commit ae2a70b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

agent/php_internal_instrument.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1603,7 +1603,7 @@ NR_INNER_WRAPPER(memcached_add_servers) {
16031603
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(servers), server) {
16041604
zval* host = nr_php_zend_hash_index_find(Z_ARRVAL_P(server), 0);
16051605
zval* port = nr_php_zend_hash_index_find(Z_ARRVAL_P(server), 1);
1606-
if (NULL != host) {
1606+
if (NULL != host && NULL != port) {
16071607
instance = nr_php_memcached_create_datastore_instance(Z_STRVAL_P(host), Z_LVAL_P(port));
16081608
nr_php_instrument_datastore_operation(NR_DATASTORE_MEMCACHE,
16091609
NULL, instance, true);

0 commit comments

Comments
 (0)