diff options
author | Josh Hoyt <josh@janrain.com> | 2006-02-03 00:49:12 +0000 |
---|---|---|
committer | Josh Hoyt <josh@janrain.com> | 2006-02-03 00:49:12 +0000 |
commit | 07501fc15d8b4e77f3efa20357f2da4e387828b7 (patch) | |
tree | fc77a1cb82119aee620805b7788e76bb7aebe759 | |
parent | cbc52af94273c79d8d6bde58f3acf314447c14b7 (diff) | |
download | php-openid-07501fc15d8b4e77f3efa20357f2da4e387828b7.zip php-openid-07501fc15d8b4e77f3efa20357f2da4e387828b7.tar.gz php-openid-07501fc15d8b4e77f3efa20357f2da4e387828b7.tar.bz2 |
[project @ Make PHP 4.3.0 compatible]
-rw-r--r-- | Tests/Auth/OpenID/TrustRoot.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Tests/Auth/OpenID/TrustRoot.php b/Tests/Auth/OpenID/TrustRoot.php index 80fa93b..09c5578 100644 --- a/Tests/Auth/OpenID/TrustRoot.php +++ b/Tests/Auth/OpenID/TrustRoot.php @@ -63,7 +63,8 @@ function Tests_Auth_OpenID_parseHeadings($data, $c) $offset = 0; $headings = array(); while (true) { - preg_match($heading_pat, $data, $matches, PREG_OFFSET_CAPTURE, $offset); + preg_match($heading_pat, substr($data, $offset), $matches, + PREG_OFFSET_CAPTURE); if (!$matches) { break; } @@ -71,10 +72,10 @@ function Tests_Auth_OpenID_parseHeadings($data, $c) $heading = $matches[2][0]; $end = $matches[3][1]; $headings[] = array('heading' => $heading, - 'start' => $start, - 'end' => $end, + 'start' => $offset + $start, + 'end' => $offset + $end, ); - $offset = $end; + $offset += $end; } return $headings; } |