Skip to content

Commit

Permalink
Work-around 5.3 default value bug
Browse files Browse the repository at this point in the history
Apparently in 5.3 you cannot provide "null" as a default value; this appears to have been corrected as of PHP 5.4.8: http://php.net/manual/en/function.mb-substr.php#116272
  • Loading branch information
colinodell committed Mar 1, 2015
1 parent df6a422 commit 5747822
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Util/RegexHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ public function getHRuleRegex()
public static function matchAt($regex, $string, $offset)
{
$matches = array();
$string = mb_substr($string, $offset, null, 'utf-8');
$string = mb_substr($string, $offset, mb_strlen($string), 'utf-8');
if (!preg_match($regex, $string, $matches, PREG_OFFSET_CAPTURE)) {
return null;
}
Expand Down

0 comments on commit 5747822

Please sign in to comment.