mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Removed use of reference in params of http methods.
This commit is contained in:
parent
7bea5d9410
commit
7e0d34903e
2 changed files with 4 additions and 4 deletions
|
@ -33,7 +33,7 @@ class BasicMethod {
|
|||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
public static function authentication(&$http) {
|
||||
public static function authentication(HttpSocket $http) {
|
||||
if (isset($http->request['auth']['user'], $http->request['auth']['pass'])) {
|
||||
$http->request['header']['Authorization'] = 'Basic ' . base64_encode($http->request['auth']['user'] . ':' . $http->request['auth']['pass']);
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ class DigestMethod {
|
|||
* @throws Exception
|
||||
* @link http://www.ietf.org/rfc/rfc2617.txt
|
||||
*/
|
||||
public static function authentication(&$http) {
|
||||
public static function authentication(HttpSocket $http) {
|
||||
if (isset($http->request['auth']['user'], $http->request['auth']['pass'])) {
|
||||
if (!isset($http->config['request']['auth']['realm']) && !self::_getServerInformation($http)) {
|
||||
return;
|
||||
|
@ -49,7 +49,7 @@ class DigestMethod {
|
|||
* @param HttpSocket $http
|
||||
* @return boolean
|
||||
*/
|
||||
protected static function _getServerInformation(&$http) {
|
||||
protected static function _getServerInformation(HttpSocket $http) {
|
||||
$originalRequest = $http->request;
|
||||
$http->request['auth'] = array('method' => false);
|
||||
$http->request($http->request);
|
||||
|
@ -74,7 +74,7 @@ class DigestMethod {
|
|||
* @param HttpSocket $http
|
||||
* @return string
|
||||
*/
|
||||
protected static function _generateHeader(&$http) {
|
||||
protected static function _generateHeader(HttpSocket $http) {
|
||||
$a1 = md5($http->request['auth']['user'] . ':' . $http->config['request']['auth']['realm'] . ':' . $http->request['auth']['pass']);
|
||||
$a2 = md5($http->request['method'] . ':' . $http->request['uri']['path']);
|
||||
|
||||
|
|
Loading…
Reference in a new issue