Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
sjinks authored and wupsbr committed Jul 8, 2015
1 parent 46a369c commit 2f36d86
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 2f36d86

Please sign in to comment.