Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
PHP7 Constructors fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
cdujeu committed Jan 12, 2016
1 parent 58040d2 commit e8d94b8
Show file tree
Hide file tree
Showing 16 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion core/src/core/classes/class.AjxpRole.php
Expand Up @@ -41,7 +41,7 @@ class AjxpRole implements AjxpGroupPathProvider
* @param string $id
* @return void
*/
public function AjxpRole($id)
public function __construct($id)
{
$this->id = $id;
}
Expand Down
2 changes: 1 addition & 1 deletion core/src/core/classes/class.HttpClient.php
Expand Up @@ -58,7 +58,7 @@ class HttpClient

public $collectHeaders;

public function HttpClient($host, $port=80)
public function __construct($host, $port=80)
{
$this->host = $host;
$this->port = $port;
Expand Down
2 changes: 1 addition & 1 deletion core/src/core/classes/pclzip.lib.php
Expand Up @@ -212,7 +212,7 @@ class PclZip
// Note that no real action is taken, if the archive does not exist it is not
// created. Use create() for that.
// --------------------------------------------------------------------------------
function PclZip($p_zipname)
function __construct($p_zipname)
{

// ----- Tests the zlib
Expand Down
4 changes: 2 additions & 2 deletions core/src/plugins/access.sftp_psl/phpseclib/Crypt/AES.php
Expand Up @@ -164,9 +164,9 @@ class Crypt_AES extends Crypt_Rijndael
* @param optional Integer $mode
* @access public
*/
function Crypt_AES($mode = CRYPT_AES_MODE_CBC)
function __construct($mode = CRYPT_AES_MODE_CBC)
{
parent::Crypt_Rijndael($mode);
parent::__construct($mode);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion core/src/plugins/access.sftp_psl/phpseclib/Crypt/Base.php
Expand Up @@ -445,7 +445,7 @@ class Crypt_Base
* @param optional Integer $mode
* @access public
*/
function Crypt_Base($mode = CRYPT_MODE_CBC)
function __construct($mode = CRYPT_MODE_CBC)
{
$const_crypt_mode = 'CRYPT_' . $this->const_namespace . '_MODE';

Expand Down
4 changes: 2 additions & 2 deletions core/src/plugins/access.sftp_psl/phpseclib/Crypt/Blowfish.php
Expand Up @@ -392,9 +392,9 @@ class Crypt_Blowfish extends Crypt_Base
* @param optional Integer $mode
* @access public
*/
function Crypt_Blowfish($mode = CRYPT_BLOWFISH_MODE_CBC)
function __construct($mode = CRYPT_BLOWFISH_MODE_CBC)
{
parent::Crypt_Base($mode);
parent::__construct($mode);
}

/**
Expand Down
4 changes: 2 additions & 2 deletions core/src/plugins/access.sftp_psl/phpseclib/Crypt/DES.php
Expand Up @@ -685,9 +685,9 @@ class Crypt_DES extends Crypt_Base
* @param optional Integer $mode
* @access public
*/
function Crypt_DES($mode = CRYPT_DES_MODE_CBC)
function __construct($mode = CRYPT_DES_MODE_CBC)
{
parent::Crypt_Base($mode);
parent::__construct($mode);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion core/src/plugins/access.sftp_psl/phpseclib/Crypt/Hash.php
Expand Up @@ -152,7 +152,7 @@ class Crypt_Hash
* @return Crypt_Hash
* @access public
*/
function Crypt_Hash($hash = 'sha1')
function __construct($hash = 'sha1')
{
if ( !defined('CRYPT_HASH_MODE') ) {
switch (true) {
Expand Down
4 changes: 2 additions & 2 deletions core/src/plugins/access.sftp_psl/phpseclib/Crypt/RC2.php
Expand Up @@ -339,9 +339,9 @@ class Crypt_RC2 extends Crypt_Base
* @param optional Integer $mode
* @access public
*/
function Crypt_RC2($mode = CRYPT_RC2_MODE_CBC)
function __construct($mode = CRYPT_RC2_MODE_CBC)
{
parent::Crypt_Base($mode);
parent::__construct($mode);
$this->setKey('');
}

Expand Down
4 changes: 2 additions & 2 deletions core/src/plugins/access.sftp_psl/phpseclib/Crypt/RC4.php
Expand Up @@ -178,9 +178,9 @@ class Crypt_RC4 extends Crypt_Base
* @return Crypt_RC4
* @access public
*/
function Crypt_RC4()
function __construct()
{
parent::Crypt_Base(CRYPT_MODE_STREAM);
parent::__construct(CRYPT_MODE_STREAM);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion core/src/plugins/access.sftp_psl/phpseclib/Crypt/RSA.php
Expand Up @@ -458,7 +458,7 @@ class Crypt_RSA
* @return Crypt_RSA
* @access public
*/
function Crypt_RSA()
function __construct()
{
if (!class_exists('Math_BigInteger')) {
include_once 'Math/BigInteger.php';
Expand Down
4 changes: 2 additions & 2 deletions core/src/plugins/access.sftp_psl/phpseclib/Crypt/Rijndael.php
Expand Up @@ -699,9 +699,9 @@ class Crypt_Rijndael extends Crypt_Base
* @param optional Integer $mode
* @access public
*/
function Crypt_Rijndael($mode = CRYPT_RIJNDAEL_MODE_CBC)
function __construct($mode = CRYPT_RIJNDAEL_MODE_CBC)
{
parent::Crypt_Base($mode);
parent::__construct($mode);
}

/**
Expand Down
Expand Up @@ -187,13 +187,13 @@ class Crypt_TripleDES extends Crypt_DES
* @param optional Integer $mode
* @access public
*/
function Crypt_TripleDES($mode = CRYPT_DES_MODE_CBC)
function __construct($mode = CRYPT_DES_MODE_CBC)
{
switch ($mode) {
// In case of CRYPT_DES_MODE_3CBC, we init as CRYPT_DES_MODE_CBC
// and additional flag us internally as 3CBC
case CRYPT_DES_MODE_3CBC:
parent::Crypt_DES(CRYPT_DES_MODE_CBC);
parent::__construct(CRYPT_DES_MODE_CBC);
$this->mode_3cbc = true;

// This three $des'es will do the 3CBC work (if $key > 64bits)
Expand All @@ -210,7 +210,7 @@ function Crypt_TripleDES($mode = CRYPT_DES_MODE_CBC)
break;
// If not 3CBC, we init as usual
default:
parent::Crypt_DES($mode);
parent::__construct($mode);
}
}

Expand Down
4 changes: 2 additions & 2 deletions core/src/plugins/access.sftp_psl/phpseclib/Crypt/Twofish.php
Expand Up @@ -471,9 +471,9 @@ class Crypt_Twofish extends Crypt_Base
* @param optional Integer $mode
* @access public
*/
function Crypt_Twofish($mode = CRYPT_TWOFISH_MODE_CBC)
function __construct($mode = CRYPT_TWOFISH_MODE_CBC)
{
parent::Crypt_Base($mode);
parent::__construct($mode);
}

/**
Expand Down
Expand Up @@ -256,7 +256,7 @@ class Math_BigInteger
* @return Math_BigInteger
* @access public
*/
function Math_BigInteger($x = 0, $base = 10)
function __construct($x = 0, $base = 10)
{
if ( !defined('MATH_BIGINTEGER_MODE') ) {
switch (true) {
Expand Down
2 changes: 1 addition & 1 deletion core/src/plugins/access.sftp_psl/phpseclib/SFTP.php
Expand Up @@ -264,7 +264,7 @@ class Net_SFTP extends Net_SSH2
* @return Net_SFTP
* @access public
*/
function Net_SFTP($host, $port = 22, $timeout = 10)
function __construct($host, $port = 22, $timeout = 10)
{
parent::Net_SSH2($host, $port, $timeout);

Expand Down

0 comments on commit e8d94b8

Please sign in to comment.