From 9cf5a6f47a97eaef38c510eea7ee43f93bf81902 Mon Sep 17 00:00:00 2001 From: Robert Curry Date: Tue, 24 Jul 2012 16:02:11 +1200 Subject: [PATCH] BUG: Remove the is_null check on augmentValidURLSegment Object::extend already does a check for NULL before it adds the results to the array of return values. This was required for Translatable as the result from Translatable::augmentValidURLSegment was being ignored. --- code/model/SiteTree.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/code/model/SiteTree.php b/code/model/SiteTree.php index 06f7c961..40b68973 100644 --- a/code/model/SiteTree.php +++ b/code/model/SiteTree.php @@ -1580,8 +1580,7 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid $votes = $this->extend('augmentValidURLSegment'); if($votes) { - $votes = array_filter((array)$votes, 'is_null'); - if($votes) return min($votes); + return min($votes); } return true;