MinnPost / object-sync-for-salesforce

WordPress plugin that maps and syncs data between Salesforce objects and WordPress objects.
https://wordpress.org/plugins/object-sync-for-salesforce/
GNU General Public License v2.0
95 stars 51 forks source link

The screen to create a new fieldmap has a PHP notice for an undefined variable #456

Closed jonathanstegall closed 2 years ago

jonathanstegall commented 2 years ago

Describe the bug When creating a new fieldmap, the URL is /wp-admin/options-general.php?page=object-sync-salesforce-admin&tab=fieldmaps&method=add. Because the fieldmap doesn't exist yet, it has no value for $fieldmap_status, which currently is called without checking for its existence first. This results in an error: PHP Notice: Undefined variable: fieldmap_status in /wp-content/plugins/object-sync-for-salesforce/templates/admin/fieldmaps-add-edit-clone.php on line 596.

To Reproduce Steps to reproduce the behavior:

  1. Create a new fieldmap
  2. Look at the server logs

Expected behavior This should not cause any server log entries, just as it does not when editing an existing fieldmap.