summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Gass2007-01-22 15:48:56 +0000
committerNathan Gass2007-01-22 15:48:56 +0000
commit6558c11c8b76febea576719196df008fec24ff5e (patch)
treea796d7ef03c77abe61f7cdc122ee32fdc999648a
parent116ef3ed0e7a5f02cbda5578c4edb4630b9a5bea (diff)
downloaditools-6558c11c8b76febea576719196df008fec24ff5e.tar.gz
itools-6558c11c8b76febea576719196df008fec24ff5e.tar.bz2
itools-6558c11c8b76febea576719196df008fec24ff5e.zip
return empty array for no match with all => 1
-rw-r--r--it.class2
1 files changed, 1 insertions, 1 deletions
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];