Skip to content

Commit 5c0bf1e

Browse files
authored
Merge pull request #85 from torinaki/fix-php-8
Fixes static calls for PHP 8
2 parents f287dd8 + f63a86c commit 5c0bf1e

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

PEAR/Builder.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ function build($descfile, $callback = null)
276276
} else {
277277
$dir = $pkg->_config->get('temp_dir') . '/' . $pkg->getName();
278278
// automatically delete at session end
279-
$this->addTempFile($dir);
279+
self::addTempFile($dir);
280280
}
281281
} else {
282282
$pf = new PEAR_PackageFile($this->config);
@@ -368,11 +368,11 @@ function build($descfile, $callback = null)
368368
return $this->raiseError("could not create build dir: $build_dir");
369369
}
370370

371-
$this->addTempFile($build_dir);
371+
self::addTempFile($build_dir);
372372
if (!System::mkDir(array('-p', $inst_dir))) {
373373
return $this->raiseError("could not create temporary install dir: $inst_dir");
374374
}
375-
$this->addTempFile($inst_dir);
375+
self::addTempFile($inst_dir);
376376

377377
$make_command = getenv('MAKE') ? getenv('MAKE') : 'make';
378378

PEAR/Common.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ function _PEAR_Common()
205205
*
206206
* @access public
207207
*/
208-
function addTempFile($file)
208+
static function addTempFile($file)
209209
{
210210
if (!class_exists('PEAR_Frontend')) {
211211
require_once 'PEAR/Frontend.php';
@@ -280,7 +280,7 @@ function mkTempDir($tmpdir = '')
280280
return false;
281281
}
282282

283-
$this->addTempFile($tmpdir);
283+
self::addTempFile($tmpdir);
284284
return $tmpdir;
285285
}
286286

PEAR/Frontend.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ function setConfig(&$config)
160160
* needs to be able to sustain a list over many sessions in order to support
161161
* user interaction with install scripts
162162
*/
163-
function addTempFile($file)
163+
static function addTempFile($file)
164164
{
165165
$GLOBALS['_PEAR_Common_tempfiles'][] = $file;
166166
}
@@ -220,4 +220,4 @@ function outputData($data, $command = '_default')
220220
function userDialog($command, $prompts, $types = array(), $defaults = array())
221221
{
222222
}
223-
}
223+
}

PEAR/PackageFile.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ function &fromXmlString($data, $state, $file, $archive = false)
283283
* @param string $file name of file or directory
284284
* @return void
285285
*/
286-
function addTempFile($file)
286+
static function addTempFile($file)
287287
{
288288
$GLOBALS['_PEAR_Common_tempfiles'][] = $file;
289289
}

0 commit comments

Comments
 (0)