From e9c2d84a068443e4c4cff0ac5ac4ba098eff44f3 Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Tue, 8 May 2007 13:53:10 +0000 Subject: work correctly if result casted to array --- it.class | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/it.class b/it.class index d1e1400..0866102 100644 --- a/it.class +++ b/it.class @@ -222,7 +222,7 @@ function match($pattern, $string, $p = array()) setlocale(LC_CTYPE, $oldlocale); if (!$r) # no match - $result = $p['all'] ? array() : false; + $result = $p['all'] ? array() : null; else if (count($m) == 1) # no capture $result = $m[0]; else if (count($m) == 2) # one capture -- cgit v1.2.3