From 6558c11c8b76febea576719196df008fec24ff5e Mon Sep 17 00:00:00 2001 From: Nathan Gass Date: Mon, 22 Jan 2007 15:48:56 +0000 Subject: return empty array for no match with all => 1 --- it.class | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'it.class') diff --git a/it.class b/it.class index f865858..2fe2682 100644 --- a/it.class +++ b/it.class @@ -233,7 +233,7 @@ function match( $pattern, $string, $p = array() ) $r = preg_match( it::convertregex( $pattern, $p ), $string, $m, $flags, $p['offset'] ); # no match if( !$r ) - return false; + return $p['all'] ? array() : false; # no capture else if( count( $m ) == 1 ) return $m[0]; -- cgit v1.2.3