Skip to content

Commit 590a812

Browse files
committed
Catch another deprecated invocation of preg_split
1 parent b1e8552 commit 590a812

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/docopt.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1207,7 +1207,7 @@ function parse_defaults($doc)
12071207
foreach (parse_section('options:', $doc) as $s) {
12081208
# FIXME corner case "bla: options: --foo"
12091209
list (, $s) = explode(':', $s, 2);
1210-
$splitTmp = array_slice(preg_split("@\n[ \t]*(-\S+?)@", "\n".$s, null, PREG_SPLIT_DELIM_CAPTURE), 1);
1210+
$splitTmp = array_slice(preg_split("@\n[ \t]*(-\S+?)@", "\n".$s, 0, PREG_SPLIT_DELIM_CAPTURE), 1);
12111211
$split = array();
12121212
for ($cnt = count($splitTmp), $i=0; $i < $cnt; $i+=2) {
12131213
$split[] = $splitTmp[$i] . (isset($splitTmp[$i+1]) ? $splitTmp[$i+1] : '');

0 commit comments

Comments
 (0)