mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX Undefined variable when calling DataObject::many_many_extraFields() and relation name couldn't be found for the component (from r108400)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112726 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
2058ee31ee
commit
ca7edd5ca5
@ -1686,6 +1686,7 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity
|
|||||||
|
|
||||||
foreach($classes as $class) {
|
foreach($classes as $class) {
|
||||||
if(in_array($class, array('ViewableData', 'Object', 'DataObject'))) continue;
|
if(in_array($class, array('ViewableData', 'Object', 'DataObject'))) continue;
|
||||||
|
$relationName = null;
|
||||||
|
|
||||||
// Find extra fields for one component
|
// Find extra fields for one component
|
||||||
if($component) {
|
if($component) {
|
||||||
@ -1704,7 +1705,6 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity
|
|||||||
$candidateManyMany = $SNG_candidate->stat('belongs_many_many');
|
$candidateManyMany = $SNG_candidate->stat('belongs_many_many');
|
||||||
|
|
||||||
// Find the relation given the class
|
// Find the relation given the class
|
||||||
$relationName = null;
|
|
||||||
if($candidateManyMany) foreach($candidateManyMany as $relation => $relatedClass) {
|
if($candidateManyMany) foreach($candidateManyMany as $relation => $relatedClass) {
|
||||||
if($relatedClass == $class) {
|
if($relatedClass == $class) {
|
||||||
$relationName = $relation;
|
$relationName = $relation;
|
||||||
|
Loading…
Reference in New Issue
Block a user