Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ReverseSort bug, exposed but not caused by PHP8 (PHPOffice#1660)
Some tests of ReferenceHelper functions columnReverseSort and cellReverseSort which passed with PHP7 fail with PHP8. Both functions use the following construction: return 1 - strcasecmp(whatever); The "1" seems very mysterious. I believe that the correct code should be: return -strcasecmp(whatever); It appears in particular that PHP7 strcasecmp was never returning a value of 1 for the tests in question, but PHP8 strcasecmp does so. With the corrected code, the tests pass in both PHP7 and PHP8.
- Loading branch information