summaryrefslogtreecommitdiff
path: root/sapi/phpdbg/phpdbg_rinit_hook.c
diff options
context:
space:
mode:
Diffstat (limited to 'sapi/phpdbg/phpdbg_rinit_hook.c')
-rw-r--r--sapi/phpdbg/phpdbg_rinit_hook.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sapi/phpdbg/phpdbg_rinit_hook.c b/sapi/phpdbg/phpdbg_rinit_hook.c
index 11bd5c99b1..ab976c4ddb 100644
--- a/sapi/phpdbg/phpdbg_rinit_hook.c
+++ b/sapi/phpdbg/phpdbg_rinit_hook.c
@@ -45,14 +45,14 @@ static PHP_MINIT_FUNCTION(phpdbg_webhelper) /* {{{ */
static PHP_RINIT_FUNCTION(phpdbg_webhelper) /* {{{ */
{
- zval *cookies = PG(http_globals)[TRACK_VARS_COOKIE];
- zval **auth;
+ zval cookies = PG(http_globals)[TRACK_VARS_COOKIE];
+ zval *auth;
- if (!cookies || zend_hash_find(Z_ARRVAL_P(cookies), PHPDBG_NAME "_AUTH_COOKIE", sizeof(PHPDBG_NAME "_AUTH_COOKIE"), (void **) &auth) == FAILURE || Z_STRLEN_PP(auth) != strlen(PHPDBG_WG(auth)) || strcmp(Z_STRVAL_PP(auth), PHPDBG_WG(auth))) {
+ if (Z_TYPE(cookies) == IS_ARRAY || (auth = zend_hash_str_find(Z_ARRVAL(cookies), PHPDBG_NAME "_AUTH_COOKIE", sizeof(PHPDBG_NAME "_AUTH_COOKIE"))) || Z_STRLEN_P(auth) != strlen(PHPDBG_WG(auth)) || strcmp(Z_STRVAL_P(auth), PHPDBG_WG(auth))) {
return SUCCESS;
}
-#if PHPDBG_IN_DEV
+#ifndef _WIN32
{
struct sockaddr_un sock;
int s = socket(AF_UNIX, SOCK_STREAM, 0);