Skip to content

Commit

Permalink
'Object' keyword reserved
Browse files Browse the repository at this point in the history
site upgraded to PHP 7.3 and 'object' is a reserved keyword, this fix replaced every instance with 'SS_object'
  • Loading branch information
jareddreyerss committed Nov 13, 2019
1 parent 2eb6213 commit 0438665
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion code/GridFieldAddNewInlineButton.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ private function getRowTemplate(GridField $grid, GridFieldEditableColumns $edita
$handled = array_keys($editable->getDisplayFields($grid));

if($grid->getList()) {
$record = Object::create($grid->getModelClass());
$record = SS_Object::create($grid->getModelClass());
} else {
$record = null;
}
Expand Down
2 changes: 1 addition & 1 deletion code/GridFieldAddNewMultiClass.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ public function handleAdd($grid, $request) {
}

$unsanitisedClass = $this->unsanitiseClassName($class);
$handler = Object::create($this->itemRequestClass,
$handler = SS_Object::create($this->itemRequestClass,
$grid, $component, new $unsanitisedClass(), $grid->getForm()->getController(), 'add-multi-class'
);
$handler->setTemplate($component->getTemplate());
Expand Down
2 changes: 1 addition & 1 deletion code/GridFieldEditableColumns.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ public function getFields(GridField $grid, DataObjectInterface $record) {
$extra = $list->getExtraFields();

if($extra && array_key_exists($col, $extra)) {
$field = Object::create_from_string($extra[$col], $col)->scaffoldFormField();
$field = SS_Object::create_from_string($extra[$col], $col)->scaffoldFormField();
}
}

Expand Down

0 comments on commit 0438665

Please sign in to comment.