Permalink
Browse files

MINOR Fixed regression from r100774 (from r100775)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@105650 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information...
1 parent e78dc52 commit 1d80d77270fa831024453c283d8528e1200d3d3d @chillu chillu committed May 25, 2010
Showing with 6 additions and 1 deletion.
  1. +6 −1 forms/ComplexTableField.php
@@ -1082,7 +1082,12 @@ function forTemplate() {
Requirements::javascript(SAPPHIRE_DIR . "/javascript/ComplexTableField_popup.js");
// Append requirements from instance callbacks
- $callback = $this->getParentController()->getParentController()->requirementsForPopupCallback;
+ $parent = $this->getParentController();
+ if($parent instanceof ComplexTableField) {
+ $callback = $parent->requirementsForPopupCallback;
+ } else {
+ $callback = $parent->getParentController()->requirementsForPopupCallback;
+ }
if($callback) call_user_func($callback, $this);
// Append requirements from DataObject

0 comments on commit 1d80d77

Please sign in to comment.