Skip to content

Commit

Permalink
Strlen callback function
Browse files Browse the repository at this point in the history
This PR is similar to #4083. It replaces the callback function '\strlen' with an arrow function (introduced in PHP 7.4) to avoid the error message bellow starting with PHP >8.1

Deprecated functionality: strlen(): Passing null to parameter #1
  • Loading branch information
ADDISON74 authored Jul 6, 2024
1 parent ced031d commit 04e5a42
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1972,7 +1972,7 @@ protected function _saveStockItem()
*/
protected function _filterRowData(&$rowData)
{
$rowData = array_filter($rowData, '\strlen');
$rowData = array_filter($rowData, fn ($tmpString) => strlen($tmpString ?? ''));
// Exceptions - for sku - put them back in
if (!isset($rowData[self::COL_SKU])) {
$rowData[self::COL_SKU] = null;
Expand Down

0 comments on commit 04e5a42

Please sign in to comment.