You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BugFor errors / faults / flaws / inconsistencies etc.MajorIndicates the severity or impact or benefit of an issue is much higher than normal but not critical.
BugFor errors / faults / flaws / inconsistencies etc.MajorIndicates the severity or impact or benefit of an issue is much higher than normal but not critical.
One error in RegExp on 'public function getAge()' return incorrect date creation:
Original function:
public function getAge()
{
$url = preg_replace('/^www./', '', $this->url);
$url = 'http://www.who.is/whois/'.urlencode($url);
$data = $this->getPage($url);
preg_match('#(?:Creation Date|Created On):\s*([ \ta-z0-9/-]+)#si', $data, $p);
if(!isset($p[1]))
{
return null;
}
$value = strtotime($p[1]);
if ($value === false) {
return null;
}
$value = Piwik::getPrettyTimeFromSeconds(time() - $value);
return $value;
}
Modified function:
public function getAge()
{
$url = preg_replace('/^www./', '', $this->url);
$url = 'http://www.who.is/whois/'.urlencode($url);
$data = $this->getPage($url);
---> preg_match('#(?:Creation Date|Created On):\s*([ \ta-z0-9/-:]+)#si', $data, $p);
if(!isset($p[1]))
{
return null;
}
$value = strtotime($p[1]);
if ($value === false) {
return null;
}
$value = Piwik::getPrettyTimeFromSeconds(time() - $value);
return $value;
}
Keywords: date creation
The text was updated successfully, but these errors were encountered: