diff options
author | Nathan Gass | 2007-01-22 15:48:56 +0000 |
---|---|---|
committer | Nathan Gass | 2007-01-22 15:48:56 +0000 |
commit | 6558c11c8b76febea576719196df008fec24ff5e (patch) | |
tree | a796d7ef03c77abe61f7cdc122ee32fdc999648a | |
parent | 116ef3ed0e7a5f02cbda5578c4edb4630b9a5bea (diff) | |
download | itools-6558c11c8b76febea576719196df008fec24ff5e.tar.gz itools-6558c11c8b76febea576719196df008fec24ff5e.tar.bz2 itools-6558c11c8b76febea576719196df008fec24ff5e.zip |
return empty array for no match with all => 1
-rw-r--r-- | it.class | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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]; |