Skip to content

Commit

Permalink
Merge pull request #277 from Shardj/275-276-only
Browse files Browse the repository at this point in the history
Fix str_split('') logic to keep same as PHP before 8.2 on PHP 8.2
  • Loading branch information
glensc authored Nov 15, 2022
2 parents b1d3fcc + c4ad452 commit 360e44d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion library/Zend/Console/Getopt.php
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,8 @@ protected function _parseLongOption(&$argv)
protected function _parseShortOptionCluster(&$argv)
{
$flagCluster = ltrim(array_shift($argv), '-');
foreach (str_split($flagCluster) as $flag) {
$listFlagChar = $flagCluster === '' ? [''] : str_split($flagCluster);
foreach ($listFlagChar as $flag) {
$this->_parseSingleOption($flag, $argv);
}
}
Expand Down

0 comments on commit 360e44d

Please sign in to comment.