Skip to content

Commit

Permalink
Merge pull request #3947 from dregad/php8_deprecated
Browse files Browse the repository at this point in the history
Fix PHP 8 deprecated warnings
  • Loading branch information
splitbrain committed Apr 26, 2023
2 parents ef90f5e + ebba5e5 commit 565c020
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 deletions.
6 changes: 3 additions & 3 deletions inc/ChangeLog/ChangeLogTrait.php
Expand Up @@ -17,7 +17,7 @@ trait ChangeLogTrait
abstract public function addLogEntry(array $info, $timestamp = null);

/**
* Parses a changelog line into it's components
* Parses a changelog line into its components
*
* @author Ben Coburn <btcoburn@silicodon.net>
*
Expand All @@ -44,7 +44,7 @@ public static function parseLogLine($line)
}

/**
* Build a changelog line from it's components
* Build a changelog line from its components
*
* @param array $info Revision info structure
* @param int $timestamp log line date (optional)
Expand All @@ -59,7 +59,7 @@ public static function buildLogLine(array &$info, $timestamp = null)
'type' => str_replace($strip, '', $info['type']),
'id' => $info['id'],
'user' => $info['user'],
'sum' => PhpString::substr(str_replace($strip, '', $info['sum']), 0, 255),
'sum' => PhpString::substr(str_replace($strip, '', $info['sum'] ?? ''), 0, 255),
'extra' => str_replace($strip, '', $info['extra']),
'sizechange' => $info['sizechange'],
);
Expand Down
24 changes: 24 additions & 0 deletions inc/DifferenceEngine.php
Expand Up @@ -929,6 +929,18 @@ static function css($classname){

class _HWLDF_WordAccumulator {

/** @var array */
protected $_lines;

/** @var string */
protected $_line;

/** @var string */
protected $_group;

/** @var string */
protected $_tag;

function __construct() {
$this->_lines = array();
$this->_line = '';
Expand Down Expand Up @@ -1439,6 +1451,18 @@ function _diff3($edits1, $edits2) {
*/
class _Diff3_Op {

/** @var array|mixed */
protected $orig;

/** @var array|mixed */
protected $final1;

/** @var array|mixed */
protected $final2;

/** @var array|mixed|false */
protected $_merged;

function __construct($orig = false, $final1 = false, $final2 = false) {
$this->orig = $orig ? $orig : array();
$this->final1 = $final1 ? $final1 : array();
Expand Down

0 comments on commit 565c020

Please sign in to comment.