Use method_exists() in trait.

Closes #3469843

Merge request reports

Loading