Skip to content

Commit

Permalink
php 8.1, Fix Deprecations
Browse files Browse the repository at this point in the history
Fix deprecation message like that 'Passing null to parameter Shardj#1 () of type string is deprecated'
  • Loading branch information
hungtrinh committed Nov 3, 2022
1 parent 386b8ac commit 9b52f41
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion library/Zend/Filter/Compress/Bz2.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ public function decompress($content)
{
$archive = $this->getArchive();
// check $content for NULL bytes or else file_exists will error out
if (strpos($content, '/\0/') === false && @file_exists($content)) {
if (strpos((string) $content, '/\0/') === false && @file_exists($content)) {
$archive = $content;
}

Expand Down
4 changes: 2 additions & 2 deletions library/Zend/ProgressBar/Adapter/Console.php
Original file line number Diff line number Diff line change
Expand Up @@ -239,9 +239,9 @@ public function setWidth($width = null)
$this->_width = 80;

// Try to determine the width through stty
if (preg_match('#\d+ (\d+)#', @shell_exec('stty size'), $match) === 1) {
if (preg_match('#\d+ (\d+)#', (string) @shell_exec('stty size'), $match) === 1) {
$this->_width = (int) $match[1];
} else if (preg_match('#columns = (\d+);#', @shell_exec('stty'), $match) === 1) {
} else if (preg_match('#columns = (\d+);#', (string) @shell_exec('stty'), $match) === 1) {
$this->_width = (int) $match[1];
}
}
Expand Down

0 comments on commit 9b52f41

Please sign in to comment.