Skip to content

Commit

Permalink
https://github.com/mage2pro/core/issues/422
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrii-fediuk committed Jun 11, 2024
1 parent 987cf3d commit 04c824f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
16 changes: 5 additions & 11 deletions Core/lib/text/explode.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,11 @@ function df_explode_space(string $s):array {return
# 2024-06-11
# 1) "Improve `df_explode_space()`": https://github.com/mage2pro/core/issues/422
# 2) `print_r(explode('a', 'baaab'));` → ['b', '', '', 'b'] https://3v4l.org/t6IBI
df_clean(
df_trim(explode(' ',
# 2024-06-11
# 1) "Improve `df_explode_space()`": https://github.com/mage2pro/core/issues/422
# 2) `print_r(explode('a', 'a'))` → ['', ''] https://3v4l.org/u8pGS
# «If separator values appear at the start or end of string,
# said values will be added as an empty array value either in the first or last position of the returned array respectively.»
# https://www.php.net/manual/en/function.explode.php#refsect1-function.explode-returnvalues
df_trim($s)
))
)
# 3) `print_r(explode('a', 'a'))` → ['', ''] https://3v4l.org/u8pGS
# «If separator values appear at the start or end of string,
# said values will be added as an empty array value either in the first or last position of the returned array respectively.»
# https://www.php.net/manual/en/function.explode.php#refsect1-function.explode-returnvalues
df_clean(df_trim(explode(' ', $s)))
;}

/**
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mage2pro/core"
,"version": "11.2.4"
,"version": "11.2.5"
,"description": "Mage2.PRO core package."
,"type": "magento2-module"
,"homepage": "https://mage2.pro"
Expand Down

0 comments on commit 04c824f

Please sign in to comment.