Skip to content

Commit

Permalink
use macro to avoid problems with PHP7 hash impl
Browse files Browse the repository at this point in the history
  • Loading branch information
tony2001 authored and derickr committed Oct 22, 2015
1 parent ca0fde9 commit 0d723a1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions xdebug_stack.c
Expand Up @@ -608,11 +608,11 @@ void xdebug_init_debugger(TSRMLS_D)
}
if (!remote_addr) {
XDEBUG_LOG_PRINT(XG(remote_log_file), "I: Checking header 'HTTP_X_FORWARDED_FOR'.\n");
XDEBUG_ZEND_HASH_STR_FIND(PG(http_globals)[TRACK_VARS_SERVER], "HTTP_X_FORWARDED_FOR", 21, remote_addr);
XDEBUG_ZEND_HASH_STR_FIND(PG(http_globals)[TRACK_VARS_SERVER], "HTTP_X_FORWARDED_FOR", HASH_KEY_SIZEOF("HTTP_X_FORWARDED_FOR"), remote_addr);
}
if (!remote_addr) {
XDEBUG_LOG_PRINT(XG(remote_log_file), "I: Checking header 'REMOTE_ADDR'.\n");
XDEBUG_ZEND_HASH_STR_FIND(PG(http_globals)[TRACK_VARS_SERVER], "REMOTE_ADDR", 12, remote_addr);
XDEBUG_ZEND_HASH_STR_FIND(PG(http_globals)[TRACK_VARS_SERVER], "REMOTE_ADDR", HASH_KEY_SIZEOF("REMOTE_ADDR"), remote_addr);
}
if (remote_addr) {
XDEBUG_LOG_PRINT(XG(remote_log_file), "I: Remote address found, connecting to %s:%ld.\n", XDEBUG_ZEND_HASH_RETURN_VALUE(remote_addr), XG(remote_port));
Expand Down

0 comments on commit 0d723a1

Please sign in to comment.