What the subject says.
I'm defining this in a controller:
public function create() {
return array(
);
}
And it returns a 500 error. If I rename it to something else, the 500 disappears.
What gives?
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
What the subject says.
I'm defining this in a controller:
public function create() {
return array(
);
}
And it returns a 500 error. If I rename it to something else, the 500 disappears.
What gives?
What is the specific error message? I think create() may conflict with the create function defined for making new objects in SS. You could probably name your function like create_blah() then use Director to map create/ to create_blah to avoid conflicts.
I was thinking that was the problem, that it was defined somewhere else.