Skip to content

Commit

Permalink
Fix #2819
Browse files Browse the repository at this point in the history
  • Loading branch information
sjinks committed Sep 21, 2014
1 parent 20be6bc commit aa0ef05
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ext/http/request.c
Original file line number Diff line number Diff line change
Expand Up @@ -2035,6 +2035,10 @@ PHP_METHOD(Phalcon_Http_Request, getBasicAuth){
RETURN_NULL();
}

if (!auth_password) {
auth_password = "";
}

array_init_size(return_value, 2);
add_assoc_stringl_ex(return_value, SS("username"), auth_user, strlen(auth_user), 1);
add_assoc_stringl_ex(return_value, SS("password"), auth_password, strlen(auth_password), 1);
Expand Down

0 comments on commit aa0ef05

Please sign in to comment.