function match($regexp, $text, &$match)
{
if (!is_callable('mb_ereg_search_init')) {
- return preg_match($regexp, $text, $match);
+ if (!preg_match($regexp, $text, $match)) {
+ return false;
+ }
+ $match = $match[0];
+ return true;
}
$regexp = substr($regexp, 1, strlen($regexp) - 2 - strlen($this->_re_flags));
if (!mb_ereg_search($regexp)) {
return false;
}
- list($match) = mb_ereg_search_getregs();
+ $match = mb_ereg_search_getregs();
return true;
}
// Try to find the <HEAD> tag.
$head_re = $this->headFind();
- $head_match = '';
+ $head_match = array();
if (!$this->match($head_re, $stripped, $head_match)) {
ini_set( 'pcre.backtrack_limit', $old_btlimit );
return array();
$link_data = array();
$link_matches = array();
- if (!preg_match_all($this->_link_find, $head_match,
+ if (!preg_match_all($this->_link_find, $head_match[0],
$link_matches)) {
ini_set( 'pcre.backtrack_limit', $old_btlimit );
return array();