This is a patch to fix "Bug #52732 Docs say preg_match() returns FALSE on
error, but it returns int(0)" (http://bugs.php.net/bug.php?id=52732).
The documentation states that preg_match should return FALSE on error,
although it returns 0 if it breaks the recursion or backtrack limit. This
just checks the error code before returning the number of matches. This also
patches a couple of tests that relied on preg_match returning 0 on error.
~Jamie