Avoid alerts in the ConfigAndLog
Each time that a crop is used the log is writing a log in ConfigAndLog.
Option to fix the issue is replace CRM_Contact_BAO_Setting::getItem()
with Civi::settings()->get()
, (the same with CRM_Contact_BAO_Setting::getItem
)
For example:
Replace
CRM_Core_BAO_Setting::getItem(IMAGECROP_SETTINGS_GROUP, 'croparea_x', NULL, 200);
With
Civi::settings()->get(IMAGECROP_SETTINGS_GROUP . 'croparea_x' , $newEditor);
And make a upgrade in the extension to set a value to put a default value always.
If is ok we will work on it @bgm
Refs:
- https://lab.civicrm.org/extensions/imagecrop/-/blob/master/imagecrop.php#L104
- Where the code insert the log message -> https://github.com/civicrm/civicrm-core/blob/master/CRM/Core/BAO/Setting.php#L84
- CiviCRM Docs -> https://docs.civicrm.org/dev/en/latest/framework/setting/
Edited by rubofvil