Skip to content

Commit 22cad2f

Browse files
committed
0.6.0 port complete - all tests pass
python master/ebcbca042e63c470ec7836ac0f3e419293bcf242
1 parent 5f1c200 commit 22cad2f

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/docopt.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,9 @@ class ChildPattern extends Pattern
330330
{
331331
public function flat($types=array())
332332
{
333-
if (!$types || in_array('ChildPattern', $types))
333+
$types = is_array($types) ? $types : array($types);
334+
335+
if (!$types || in_array(get_class_name($this), $types))
334336
return array($this);
335337
else
336338
return array();

0 commit comments

Comments
 (0)