CRM-12062 : minor bug found by failing test case WebTest_Event_AddEventTest::testAddPaidEventNoTemplate #145
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
encountered a minor bug while running WebTest_Event_AddEventTest::testAddPaidEventNoTemplate :
when a logged in / authenticated user(in my case admin user) visits event registration page with url (civicrm/event/register?id=9&reset=1 - with no 'cid' parameter) a fatal error occurs.
Its backtrace :
#0 /home/pratik/git/civicrm/CRM/Core/Error.php(308): CRM_Core_Error::backtrace()
#1 /home/pratik/git/civicrm/CRM/Core/DAO.php(754): CRM_Core_Error::fatal()
#2 /home/pratik/git/civicrm/CRM/Contact/BAO/Contact/Permission.php(52): CRM_Core_DAO::getFieldValue("CRM_Contact_DAO_Contact", NULL, "is_deleted")
#3 /home/pratik/git/civicrm/CRM/Event/Form/Registration.php(1233): CRM_Contact_BAO_Contact_Permission::allow(NULL)
#4 /home/pratik/git/civicrm/CRM/Event/Form/Registration/Register.php(1394): CRM_Event_Form_Registration->getContactID()
#5 /home/pratik/git/civicrm/CRM/Event/Form/Registration/Register.php(122): CRM_Event_Form_Registration_Register->checkRegistration(NULL, Object(CRM_Event_Form_Registration_Register))
#6 /home/pratik/git/civicrm/CRM/Core/Form.php(336): CRM_Event_Form_Registration_Register->preProcess()
If the url civicrm/event/register?id=9&reset=1 doesn't have 'cid' parameter following happens :
this error only occurs if we don't add a 'cid' parameter in url civicrm/event/register?id=9&reset=1