mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-14 14:28:27 +08:00
Fixes #16266: Fixed yii\helpers\BaseStringHelper
where explode would not allow 0 as trim string
This commit is contained in:

committed by
Alexander Makarov

parent
e4b559d720
commit
a32cfcc8ef
@ -269,7 +269,7 @@ class BaseStringHelper
|
||||
public static function explode($string, $delimiter = ',', $trim = true, $skipEmpty = false)
|
||||
{
|
||||
$result = explode($delimiter, $string);
|
||||
if ($trim) {
|
||||
if ($trim !== false) {
|
||||
if ($trim === true) {
|
||||
$trim = 'trim';
|
||||
} elseif (!is_callable($trim)) {
|
||||
|
Reference in New Issue
Block a user