Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

BUGFIX Fixed case where AssetAdmin would throw an error if $links was…

… not an object in AssetAdmin::getCustomFieldsFor()

MINOR Defined $backlinks as an array before adding entries to it


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.4@114036 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information...
commit e907e2e2664e24cb1b1b9e43f2fb4086c12116bc 1 parent 75f12d5
@halkyon halkyon authored sminnee committed
Showing with 2 additions and 1 deletion.
  1. +2 −1  code/AssetTableField.php
View
3  code/AssetTableField.php
@@ -200,7 +200,8 @@ function getCustomFieldsFor($childData) {
$links = $childData->BackLinkTracking();
if(class_exists('Subsite')) Subsite::disable_subsite_filter(false);
- if($links->exists()) {
+ if($links && $links->exists()) {
+ $backlinks = array();
foreach($links as $link) {
$backlinks[] = "<li><a href=\"admin/show/$link->ID\">" . $link->Breadcrumbs(null,true). "</a></li>";
}
Please sign in to comment.
Something went wrong with that request. Please try again.