diff options
Diffstat (limited to 'sapi/phpdbg/phpdbg_rinit_hook.c')
-rw-r--r-- | sapi/phpdbg/phpdbg_rinit_hook.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sapi/phpdbg/phpdbg_rinit_hook.c b/sapi/phpdbg/phpdbg_rinit_hook.c index 049a782d9d..1bf891654d 100644 --- a/sapi/phpdbg/phpdbg_rinit_hook.c +++ b/sapi/phpdbg/phpdbg_rinit_hook.c @@ -45,10 +45,10 @@ 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; } |