Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUGFIX: Use Object->hasMethod() instead of method_exists() #4692

Closed
wants to merge 1 commit into from
Closed

BUGFIX: Use Object->hasMethod() instead of method_exists() #4692

wants to merge 1 commit into from

Conversation

madmatt
Copy link
Member

@madmatt madmatt commented Oct 20, 2015

This allows you to for example return a PaginatedList object from ModelAdmin::getList() without GridField failing when trying to render that list in certain circumstances.

I can't see a downside to this, a slight performance hit as it now checks for extension methods as well as the standard method_exists(), but it's only executed once per rendered GridField.

Wasn't sure if I should raise this against 3.1 or 3.2?

@tractorcow
Copy link
Contributor

3.2 please. :D Sorry but 3.1 isn't really accepting minor inconvenience fixes anymore.

@tractorcow tractorcow closed this Oct 21, 2015
@madmatt madmatt deleted the pulls/gridfield-list-fix branch October 31, 2015 20:11
@dhensby
Copy link
Contributor

dhensby commented Jul 19, 2016

This never made it in to core, which is a shame - @tractorcow you strict man!

@madmatt do you want to get it in to 3.2? :)

@tractorcow
Copy link
Contributor

This was merged with #4728

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants