Skip to content

Commit

Permalink
Fix reference to deprecated transpose in lookup (#1935)
Browse files Browse the repository at this point in the history
* Fix reference to the deprecated `TRANSPOSE()` function in `LOOKUP()`, pointing to the new `transpose()` method in the `LookupRef\Matrix` class instead
  • Loading branch information
Mark Baker authored Mar 17, 2021
1 parent 4cd6c78 commit e59c751
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/PhpSpreadsheet/Calculation/LookupRef/Lookup.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public static function lookup($lookupValue, $lookupVector, $resultVector = null)
$lookupColumns = self::columnCount($lookupVector);
// we correctly orient our results
if (($lookupRows === 1 && $lookupColumns > 1) || (!$hasResultVector && $lookupRows === 2 && $lookupColumns !== 2)) {
$lookupVector = LookupRef::TRANSPOSE($lookupVector);
$lookupVector = LookupRef\Matrix::transpose($lookupVector);
$lookupRows = self::rowCount($lookupVector);
$lookupColumns = self::columnCount($lookupVector);
}
Expand Down Expand Up @@ -84,7 +84,7 @@ private static function verifyResultVector(array $lookupVector, $resultVector)

// we correctly orient our results
if ($resultRows === 1 && $resultColumns > 1) {
$resultVector = LookupRef::TRANSPOSE($resultVector);
$resultVector = LookupRef\Matrix::transpose($resultVector);
}

return $resultVector;
Expand Down

0 comments on commit e59c751

Please sign in to comment.