Skip to content

Commit

Permalink
php7
Browse files Browse the repository at this point in the history
  • Loading branch information
johnpipi committed Mar 24, 2019
1 parent 9123d15 commit 668e27b
Show file tree
Hide file tree
Showing 32 changed files with 92 additions and 92 deletions.
2 changes: 1 addition & 1 deletion trax/data/vendor/PEAR/Mail/smtp.php
Expand Up @@ -346,7 +346,7 @@ function &getSMTPObject()
}

include_once 'Net/SMTP.php';
$this->_smtp = &new Net_SMTP($this->host,
$this->_smtp = new Net_SMTP($this->host,
$this->port,
$this->localhost);

Expand Down
2 changes: 1 addition & 1 deletion trax/data/vendor/PEAR/PEAR/Autoloader.php
Expand Up @@ -144,7 +144,7 @@ function addAggregateObject($classname)
$include_file = preg_replace('/[^a-z0-9]/i', '_', $classname);
include_once $include_file;
}
$obj =& new $classname;
$obj = new $classname;
$methods = get_class_methods($classname);
foreach ($methods as $method) {
// don't import priviate methods and constructors
Expand Down
8 changes: 4 additions & 4 deletions trax/data/vendor/PEAR/PEAR/Builder.php
Expand Up @@ -79,8 +79,8 @@ function _build_win32($descfile, $callback = null)
$pkg = $descfile;
$descfile = $pkg->getPackageFile();
} else {
$pf = &new PEAR_PackageFile($this->config, $this->debug);
$pkg = &$pf->fromPackageFile($descfile, PEAR_VALIDATE_NORMAL);
$pf = new PEAR_PackageFile($this->config, $this->debug);
$pkg = $pf->fromPackageFile($descfile, PEAR_VALIDATE_NORMAL);
if (PEAR::isError($pkg)) {
return $pkg;
}
Expand Down Expand Up @@ -279,8 +279,8 @@ function build($descfile, $callback = null)
$this->addTempFile($dir);
}
} else {
$pf = &new PEAR_PackageFile($this->config);
$pkg = &$pf->fromPackageFile($descfile, PEAR_VALIDATE_NORMAL);
$pf = new PEAR_PackageFile($this->config);
$pkg = $pf->fromPackageFile($descfile, PEAR_VALIDATE_NORMAL);
if (PEAR::isError($pkg)) {
return $pkg;
}
Expand Down
10 changes: 5 additions & 5 deletions trax/data/vendor/PEAR/PEAR/ChannelFile.php
Expand Up @@ -196,7 +196,7 @@ class PEAR_ChannelFile

function PEAR_ChannelFile()
{
$this->_stack = &new PEAR_ErrorStack('PEAR_ChannelFile');
$this->_stack = new PEAR_ErrorStack('PEAR_ChannelFile');
$this->_stack->setErrorMessageTemplate($this->_getErrorMessage());
$this->_isValid = false;
}
Expand Down Expand Up @@ -1501,7 +1501,7 @@ function &getValidationObject($package = false)
if (isset($this->_channelInfo['validatepackage'])) {
if ($package == $this->_channelInfo['validatepackage']) {
// channel validation packages are always validated by PEAR_Validate
$val = &new PEAR_Validate;
$val = new PEAR_Validate;
return $val;
}

Expand All @@ -1513,18 +1513,18 @@ function &getValidationObject($package = false)
$this->_channelInfo['validatepackage']['_content']) . '.php';
$vclass = str_replace('.', '_',
$this->_channelInfo['validatepackage']['_content']);
$val = &new $vclass;
$val = new $vclass;
} else {
$a = false;
return $a;
}
} else {
$vclass = str_replace('.', '_',
$this->_channelInfo['validatepackage']['_content']);
$val = &new $vclass;
$val = new $vclass;
}
} else {
$val = &new PEAR_Validate;
$val = new PEAR_Validate;
}

return $val;
Expand Down
10 changes: 5 additions & 5 deletions trax/data/vendor/PEAR/PEAR/Command.php
Expand Up @@ -134,7 +134,7 @@ function &factory($command, &$config)
return $a;
}
$ui =& PEAR_Command::getFrontendObject();
$obj = &new $class($ui, $config);
$obj = new $class($ui, $config);
return $obj;
}

Expand All @@ -149,9 +149,9 @@ function &getObject($command)
if (!class_exists($class)) {
return PEAR::raiseError("unknown command `$command'");
}
$ui =& PEAR_Command::getFrontendObject();
$config = &PEAR_Config::singleton();
$obj = &new $class($ui, $config);
$ui = PEAR_Command::getFrontendObject();
$config = PEAR_Config::singleton();
$obj = new $class($ui, $config);
return $obj;
}

Expand All @@ -166,7 +166,7 @@ function &getObject($command)
*/
function &getFrontendObject()
{
$a = &PEAR_Frontend::singleton();
$a = PEAR_Frontend::singleton();
return $a;
}

Expand Down
2 changes: 1 addition & 1 deletion trax/data/vendor/PEAR/PEAR/Command/Build.php
Expand Up @@ -65,7 +65,7 @@ function doBuild($command, $options, $params)
$params[0] = 'package.xml';
}

$builder = &new PEAR_Builder($this->ui);
$builder = new PEAR_Builder($this->ui);
$this->debug = $this->config->get('verbose');
$err = $builder->build($params[0], array(&$this, 'buildCallback'));
if (PEAR::isError($err)) {
Expand Down
2 changes: 1 addition & 1 deletion trax/data/vendor/PEAR/PEAR/Command/Config.php
Expand Up @@ -338,7 +338,7 @@ function doConfigCreate($command, $options, $params)
}

$params[1] = realpath($params[1]);
$config = &new PEAR_Config($params[1], '#no#system#config#', false, false);
$config = new PEAR_Config($params[1], '#no#system#config#', false, false);
if ($root{strlen($root) - 1} == '/') {
$root = substr($root, 0, strlen($root) - 1);
}
Expand Down
6 changes: 3 additions & 3 deletions trax/data/vendor/PEAR/PEAR/Command/Install.php
Expand Up @@ -328,7 +328,7 @@ function &getDownloader(&$ui, $options, &$config)
if (!class_exists('PEAR_Downloader')) {
require_once 'PEAR/Downloader.php';
}
$a = &new PEAR_Downloader($ui, $options, $config);
$a = new PEAR_Downloader($ui, $options, $config);
return $a;
}

Expand All @@ -340,7 +340,7 @@ function &getInstaller(&$ui)
if (!class_exists('PEAR_Installer')) {
require_once 'PEAR/Installer.php';
}
$a = &new PEAR_Installer($ui);
$a = new PEAR_Installer($ui);
return $a;
}

Expand Down Expand Up @@ -1136,7 +1136,7 @@ function doBundle($command, $options, $params)
$dest .= DIRECTORY_SEPARATOR . $pkgname;
$orig = $pkgname . '-' . $pkgversion;

$tar = &new Archive_Tar($pkgfile->getArchiveFile());
$tar = new Archive_Tar($pkgfile->getArchiveFile());
if (!$tar->extractModify($dest, $orig)) {
return $this->raiseError('unable to unpack ' . $pkgfile->getArchiveFile());
}
Expand Down
10 changes: 5 additions & 5 deletions trax/data/vendor/PEAR/PEAR/Command/Package.php
Expand Up @@ -310,7 +310,7 @@ function &getPackager()
if (!class_exists('PEAR_Packager')) {
require_once 'PEAR/Packager.php';
}
$a = &new PEAR_Packager;
$a = new PEAR_Packager;
return $a;
}

Expand All @@ -322,7 +322,7 @@ function &getPackageFile($config, $debug = false)
if (!class_exists('PEAR_PackageFile')) {
require_once 'PEAR/PackageFile.php';
}
$a = &new PEAR_PackageFile($config, $debug);
$a = new PEAR_PackageFile($config, $debug);
$common = new PEAR_Common;
$common->ui = $this->ui;
$a->setLogger($common);
Expand Down Expand Up @@ -372,7 +372,7 @@ function doPackageValidate($command, $options, $params)
$info = $obj->fromPackageFile($params[0], PEAR_VALIDATE_NORMAL);
} else {
$archive = $info->getArchiveFile();
$tar = &new Archive_Tar($archive);
$tar = new Archive_Tar($archive);
$tar->extract(dirname($info->getPackageFile()));
$info->setPackageFile(dirname($info->getPackageFile()) . DIRECTORY_SEPARATOR .
$info->getPackage() . '-' . $info->getVersion() . DIRECTORY_SEPARATOR .
Expand Down Expand Up @@ -1031,7 +1031,7 @@ function &getInstaller(&$ui)
if (!class_exists('PEAR_Installer')) {
require_once 'PEAR/Installer.php';
}
$a = &new PEAR_Installer($ui);
$a = new PEAR_Installer($ui);
return $a;
}

Expand All @@ -1048,7 +1048,7 @@ function &getCommandPackaging(&$ui, &$config)
}

if (class_exists('PEAR_Command_Packaging')) {
$a = &new PEAR_Command_Packaging($ui, $config);
$a = new PEAR_Command_Packaging($ui, $config);
} else {
$a = null;
}
Expand Down
4 changes: 2 additions & 2 deletions trax/data/vendor/PEAR/PEAR/Command/Pickle.php
Expand Up @@ -92,7 +92,7 @@ function &getPackager()
require_once 'PEAR/Packager.php';
}

$a = &new PEAR_Packager;
$a = new PEAR_Packager;
return $a;
}

Expand All @@ -114,7 +114,7 @@ function &getPackageFile($config, $debug = false)
require_once 'PEAR/PackageFile.php';
}

$a = &new PEAR_PackageFile($config, $debug);
$a = new PEAR_PackageFile($config, $debug);
$common = new PEAR_Common;
$common->ui = $this->ui;
$a->setLogger($common);
Expand Down
4 changes: 2 additions & 2 deletions trax/data/vendor/PEAR/PEAR/Command/Registry.php
Expand Up @@ -261,7 +261,7 @@ function doFileList($command, $options, $params)
require_once 'PEAR/PackageFile.php';
}

$pkg = &new PEAR_PackageFile($this->config, $this->_debug);
$pkg = new PEAR_PackageFile($this->config, $this->_debug);
PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
$info = &$pkg->fromAnyFile($params[0], PEAR_VALIDATE_NORMAL);
PEAR::staticPopErrorHandling();
Expand Down Expand Up @@ -435,7 +435,7 @@ function doInfo($command, $options, $params)
require_once 'PEAR/PackageFile.php';
}

$pkg = &new PEAR_PackageFile($this->config, $this->_debug);
$pkg = new PEAR_PackageFile($this->config, $this->_debug);
PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
$obj = &$pkg->fromAnyFile($params[0], PEAR_VALIDATE_NORMAL);
PEAR::staticPopErrorHandling();
Expand Down
2 changes: 1 addition & 1 deletion trax/data/vendor/PEAR/PEAR/Command/Remote.php
Expand Up @@ -579,7 +579,7 @@ function &getDownloader($options)
if (!class_exists('PEAR_Downloader')) {
require_once 'PEAR/Downloader.php';
}
$a = &new PEAR_Downloader($this->ui, $options, $this->config);
$a = new PEAR_Downloader($this->ui, $options, $this->config);
return $a;
}

Expand Down
16 changes: 8 additions & 8 deletions trax/data/vendor/PEAR/PEAR/Common.php
Expand Up @@ -489,7 +489,7 @@ function _postProcessChecks($pf)
*/
function infoFromTgzFile($file)
{
$packagefile = &new PEAR_PackageFile($this->config);
$packagefile = new PEAR_PackageFile($this->config);
$pf = &$packagefile->fromTgzFile($file, PEAR_VALIDATE_NORMAL);
return $this->_postProcessChecks($pf);
}
Expand All @@ -508,7 +508,7 @@ function infoFromTgzFile($file)
*/
function infoFromDescriptionFile($descfile)
{
$packagefile = &new PEAR_PackageFile($this->config);
$packagefile = new PEAR_PackageFile($this->config);
$pf = &$packagefile->fromPackageFile($descfile, PEAR_VALIDATE_NORMAL);
return $this->_postProcessChecks($pf);
}
Expand All @@ -527,7 +527,7 @@ function infoFromDescriptionFile($descfile)
*/
function infoFromString($data)
{
$packagefile = &new PEAR_PackageFile($this->config);
$packagefile = new PEAR_PackageFile($this->config);
$pf = &$packagefile->fromXmlString($data, PEAR_VALIDATE_NORMAL, false);
return $this->_postProcessChecks($pf);
}
Expand Down Expand Up @@ -571,7 +571,7 @@ function _postProcessValidPackagexml(&$pf)
function infoFromAny($info)
{
if (is_string($info) && file_exists($info)) {
$packagefile = &new PEAR_PackageFile($this->config);
$packagefile = new PEAR_PackageFile($this->config);
$pf = &$packagefile->fromAnyFile($info, PEAR_VALIDATE_NORMAL);
if (PEAR::isError($pf)) {
$errs = $pf->getUserinfo();
Expand Down Expand Up @@ -603,8 +603,8 @@ function infoFromAny($info)
*/
function xmlFromInfo($pkginfo)
{
$config = &PEAR_Config::singleton();
$packagefile = &new PEAR_PackageFile($config);
$config = PEAR_Config::singleton();
$packagefile = new PEAR_PackageFile($config);
$pf = &$packagefile->fromArray($pkginfo);
$gen = &$pf->getDefaultGenerator();
return $gen->toXml(PEAR_VALIDATE_PACKAGING);
Expand All @@ -625,8 +625,8 @@ function xmlFromInfo($pkginfo)
*/
function validatePackageInfo($info, &$errors, &$warnings, $dir_prefix = '')
{
$config = &PEAR_Config::singleton();
$packagefile = &new PEAR_PackageFile($config);
$config = PEAR_Config::singleton();
$packagefile = new PEAR_PackageFile($config);
PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
if (strpos($info, '<?xml') !== false) {
$pf = &$packagefile->fromXmlString($info, PEAR_VALIDATE_NORMAL, '');
Expand Down
18 changes: 9 additions & 9 deletions trax/data/vendor/PEAR/PEAR/Config.php
Expand Up @@ -647,7 +647,7 @@ function PEAR_Config($user_file = '', $system_file = '', $ftp_file = false,
$this->configuration['default'][$key] = $info['default'];
}

$this->_registry['default'] = &new PEAR_Registry($this->configuration['default']['php_dir']);
$this->_registry['default'] = new PEAR_Registry($this->configuration['default']['php_dir']);
$this->_registry['default']->setConfig($this, false);
$this->_regInitialized['default'] = false;
//$GLOBALS['_PEAR_Config_instance'] = &$this;
Expand Down Expand Up @@ -694,7 +694,7 @@ function &singleton($user_file = '', $system_file = '', $strict = true)
return $GLOBALS['_PEAR_Config_instance'];
}

$t_conf = &new PEAR_Config($user_file, $system_file, false, $strict);
$t_conf = new PEAR_Config($user_file, $system_file, false, $strict);
if ($t_conf->_errorsFound > 0) {
return $t_conf->lastError;
}
Expand Down Expand Up @@ -754,7 +754,7 @@ function readConfigFile($file = null, $layer = 'user', $strict = true)
$this->configuration[$layer] = $data;
$this->_setupChannels();
if (!$this->_noRegistry && ($phpdir = $this->get('php_dir', $layer, 'pear.php.net'))) {
$this->_registry[$layer] = &new PEAR_Registry($phpdir);
$this->_registry[$layer] = new PEAR_Registry($phpdir);
$this->_registry[$layer]->setConfig($this, false);
$this->_regInitialized[$layer] = false;
} else {
Expand Down Expand Up @@ -783,7 +783,7 @@ function readFTPConfigFile($path)
return PEAR::raiseError('PEAR_RemoteInstaller must be installed to use remote config');
}

$this->_ftp = &new PEAR_FTP;
$this->_ftp = new PEAR_FTP;
$this->_ftp->pushErrorHandling(PEAR_ERROR_RETURN);
$e = $this->_ftp->init($path);
if (PEAR::isError($e)) {
Expand Down Expand Up @@ -911,7 +911,7 @@ function mergeConfigFile($file, $override = true, $layer = 'user', $strict = tru

$this->_setupChannels();
if (!$this->_noRegistry && ($phpdir = $this->get('php_dir', $layer, 'pear.php.net'))) {
$this->_registry[$layer] = &new PEAR_Registry($phpdir);
$this->_registry[$layer] = new PEAR_Registry($phpdir);
$this->_registry[$layer]->setConfig($this, false);
$this->_regInitialized[$layer] = false;
} else {
Expand Down Expand Up @@ -1574,7 +1574,7 @@ function set($key, $value, $layer = 'user', $channel = false)
if ($key == 'php_dir' && !$this->_noRegistry) {
if (!isset($this->_registry[$layer]) ||
$value != $this->_registry[$layer]->install_dir) {
$this->_registry[$layer] = &new PEAR_Registry($value);
$this->_registry[$layer] = new PEAR_Registry($value);
$this->_regInitialized[$layer] = false;
$this->_registry[$layer]->setConfig($this, false);
}
Expand Down Expand Up @@ -1604,7 +1604,7 @@ function _lazyChannelSetup($uselayer = false)

if (!is_object($this->_registry[$layer])) {
if ($phpdir = $this->get('php_dir', $layer, 'pear.php.net')) {
$this->_registry[$layer] = &new PEAR_Registry($phpdir);
$this->_registry[$layer] = new PEAR_Registry($phpdir);
$this->_registry[$layer]->setConfig($this, false);
$this->_regInitialized[$layer] = false;
} else {
Expand Down Expand Up @@ -2035,7 +2035,7 @@ function &getREST($version, $options = array())
require_once 'PEAR/REST/' . $version . '.php';
}

$remote = &new $class($this, $options);
$remote = new $class($this, $options);
return $remote;
}

Expand Down Expand Up @@ -2088,7 +2088,7 @@ function setInstallRoot($root)
continue;
}
$this->_registry[$layer] =
&new PEAR_Registry($this->get('php_dir', $layer, 'pear.php.net'));
new PEAR_Registry($this->get('php_dir', $layer, 'pear.php.net'));
$this->_registry[$layer]->setConfig($this, false);
$this->_regInitialized[$layer] = false;
}
Expand Down

0 comments on commit 668e27b

Please sign in to comment.