4

As administrator I get the following error message:

Strict warning: Non-static method  CRM_Core_BAO_UFGroup::profileDisplay() should not be called statically in CRM_Core_BAO_UFGroup::profileDisplay() (line 2790 of <host>/sites/all/modules/civicrm/CRM/Core/BAO/UFGroup.php).

I know I can suppress such error / warning messages via Drupal and/or amending civicrm setting somewhere. But it is annoying that these messages are there at each transaction. Is there a fix?

Thank you.

David

2

Can you check if you are on the latest version civi?

To fix your notice, you/a developer need to correct civicrm source code, ie. modify CRM/Core/BAO/UFGroup.php so it doesn't call statically the method, or change the method so it's a static one.

the change in itself is a one line of code, but checking what else is calling that profileDisplay method and if it's always static or some are using it "normally" needs a bit of analysis.

Once you have done that analysis and tested it locally (in a civicrm installed from git), you need to fork civicrm-core, commit your change on your repository and do a pull request

It's hopefully pretty clear in the wiki... and not as complicated as it might sound, come on IRC if you get blocked on your way: http://wiki.civicrm.org/confluence/display/CRMDOC/Contributing+to+CiviCRM+using+GitHub

2

If you are hitting this on the latest 4.6 you should log an issue in JIRA. It looks like this

public function profileDisplay($gid, $values, $template) {

needs to be changed to

public static function profileDisplay($gid, $values, $template) {

ie https://github.com/eileenmcnaughton/civicrm-core/commit/768f4db1f6f150e0dde0700561be378587fa8a3d

I don't see any evidence of this being called from more than one place- but try a quick grep to confirm

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.