check is_numeric instead of is_float for $priority
fix https://github.com/silverstripe-labs/silverstripe-googlesitemaps/issues/66#issuecomment-52112157
This commit is contained in:
parent
198a850f8d
commit
bbd5e29630
|
@ -107,7 +107,7 @@ class GoogleSitemapSiteTreeExtension extends GoogleSitemapExtension {
|
|||
} else if ($priority == -1) {
|
||||
return false;
|
||||
} else {
|
||||
return (is_float($priority) && $priority <= 1.0) ? $priority : 0.5;
|
||||
return (is_numeric($priority) && $priority <= 1.0) ? $priority : 0.5;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue