Skip to content

Commit

Permalink
Add delimiter to preg_quote in list_to_array()
Browse files Browse the repository at this point in the history
  • Loading branch information
borkweb committed Dec 18, 2024
1 parent 4e6bacc commit 79353e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Arrays/Arr.php
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,7 @@ public static function list_to_array( $value, $sep = ',' ): array {
}

if ( ! is_array( $value ) ) {
$value = preg_split( '/\\s*' . preg_quote( $sep ) . '\\s*/', $value );
$value = preg_split( '/\\s*' . preg_quote( $sep, '/' ) . '\\s*/', $value );
}

$filtered = [];
Expand Down

0 comments on commit 79353e0

Please sign in to comment.