Skip to content

[11.x] fix 'parsePipeString' in pipeline helper#54643

Merged
taylorotwell merged 2 commits into
laravel:11.xfrom
igzard:11.x
Feb 17, 2025
Merged

[11.x] fix 'parsePipeString' in pipeline helper#54643
taylorotwell merged 2 commits into
laravel:11.xfrom
igzard:11.x

Conversation

@igzard
Copy link
Copy Markdown
Contributor

@igzard igzard commented Feb 16, 2025

Fix: Ensure parsePipeString() Returns an Empty Array Instead of an Empty String

Return Value of parsePipeString():

If the character is not present in the $pipe variable, explode(':', $pipe, 2) returns an array with a single element: [$pipe].
While array_pad() extends the array, the second value will be an empty string ('') instead of an empty array ([]).
This causes an issue when calling explode(',', $parameters), as explode(',', '') returns [''], not [].

@taylorotwell taylorotwell merged commit 1e2232f into laravel:11.x Feb 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants