CRM-21239 Multiple issues after PR 10435 (Fatal on Drupal /user; fatal on profile view, etc.)

    Details

    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      None
    • Funding Source:
      Contributed Code
    • Verified?:
      Yes
    • Acceptance Criteria:
      1. When visiting /user, the Drupal user account page is displayed without fatal CiviCRM error.
      2. When visiting profile pages such as /civicrm/profile/view?reset=1&id=1&gid=1, the page is displayed without fatal CiviCRM error.

      Description

      To reproduce (on dmaster.drupal.civicrm.org or your local dev master):

      1. Sign into drupal (as user 1 or other user, e.g., "demo" on dmaster)
      2. Observe successful login (probably navigates you to CiviCRM or to site homepage)
      3. View your account by navigating to /user or /user/%uid
      4. Observe CiviCRM fatal error.

      backTrace

      #0 /var/www/d7cividev/sites/all/modules/civicrm/CRM/Core/Error.php(374): CRM_Core_Error::backtrace()
      #1 /var/www/d7cividev/sites/all/modules/civicrm/CRM/Core/DAO.php(1094): CRM_Core_Error::fatal()
      #2 /var/www/d7cividev/sites/all/modules/civicrm/CRM/Activity/BAO/Activity.php(2344): CRM_Core_DAO::getFieldValue("CRM_Activity_DAO_Activity", 0, "original_id")
      #3 /var/www/d7cividev/sites/all/modules/civicrm/CRM/Profile/Page/Dynamic.php(155): CRM_Activity_BAO_Activity::getLatestActivityId(0)
      #4 /var/www/d7cividev/sites/all/modules/civicrm/drupal/civicrm_user.inc(237): CRM_Profile_Page_Dynamic->__construct(202, 1, NULL, TRUE)
      #5 [internal function](): civicrm_user_view(Object(stdClass), "full", "en")
      #6 /var/www/d7cividev/includes/module.inc(957): call_user_func_array("civicrm_user_view", (Array:3))
      #7 /var/www/d7cividev/modules/user/user.module(2705): module_invoke_all("user_view", Object(stdClass), "full", "en")
      #8 /var/www/d7cividev/modules/user/user.module(2657): user_build_content(Object(stdClass), "full", "en")
      #9 /var/www/d7cividev/modules/user/user.module(2618): user_view(Object(stdClass))
      #10 [internal function](): user_view_page(Object(stdClass))
      #11 /var/www/d7cividev/includes/menu.inc(527): call_user_func_array("user_view_page", (Array:1))
      #12 /var/www/d7cividev/index.php(21): menu_execute_active_handler()
      #13 {main}

      Sorry, due to an error, we are unable to fulfill your request at the moment. You may want to contact your administrator or service provider with more details about what action you were performing when this occurred.

       

      A fatal error with similar backtrace is also presented when visiting profile pages, e.g. /civicrm/profile/view?reset=1&id=1&gid=1

      backTrace 

      #0 /var/www/d7cividev/sites/all/modules/civicrm/CRM/Core/Error.php(374): CRM_Core_Error::backtrace() #1 /var/www/d7cividev/sites/all/modules/civicrm/CRM/Core/DAO.php(1094): CRM_Core_Error::fatal() #2 /var/www/d7cividev/sites/all/modules/civicrm/CRM/Activity/BAO/Activity.php(2344): CRM_Core_DAO::getFieldValue("CRM_Activity_DAO_Activity", 0, "original_id") #3 /var/www/d7cividev/sites/all/modules/civicrm/CRM/Profile/Page/Dynamic.php(156): CRM_Activity_BAO_Activity::getLatestActivityId(0) #4 /var/www/d7cividev/sites/all/modules/civicrm/drupal/civicrm_user.inc(237): CRM_Profile_Page_Dynamic->__construct(202, 1, NULL, TRUE) #5 [internal function](): civicrm_user_view(Object(stdClass), "full", "en") #6 /var/www/d7cividev/includes/module.inc(957): call_user_func_array("civicrm_user_view", (Array:3)) #7 /var/www/d7cividev/modules/user/user.module(2705): module_invoke_all("user_view", Object(stdClass), "full", "en") #8 /var/www/d7cividev/modules/user/user.module(2657): user_build_content(Object(stdClass), "full", "en") #9 /var/www/d7cividev/modules/user/user.module(2618): user_view(Object(stdClass)) #10 [internal function](): user_view_page(Object(stdClass)) #11 /var/www/d7cividev/includes/menu.inc(527): call_user_func_array("user_view_page", (Array:1)) #12 /var/www/d7cividev/modules/user/user.pages.inc(596): menu_execute_active_handler(NULL, FALSE) #13 [internal function]() user_page() #14 /var/www/d7cividev/includes/menu.inc(527): call_user_func_array("user_page", (Array:0)) #15 /var/www/d7cividev/index.php(21): menu_execute_active_handler() #16 {main}

      Sorry, due to an error, we are unable to fulfill your request at the moment. You may want to contact your administrator or service provider with more details about what action you were performing when this occurred.

        Attachments

          Activity

          [CRM-21239] Multiple issues after PR 10435 (Fatal on Drupal /user; fatal on profile view, etc.)
          Allen Shaw added a comment -

          Hi Frank Gómez and Eileen McNaughton. This issue appears to be caused by PR 10435, which as far as I can see is done the "right way" but has the effect of breaking code that has depended on getting NULL instead of the $default value.  In this case, it's https://github.com/civicrm/civicrm-core/blob/master/CRM/Profile/Page/Dynamic.php#L154 which is assuming the returned value will be NULL instead of the default 0 value. 

          The right thing here is to fix CRM/Profile/Page/Dynamic.php, but I wonder what other similar surprises we might find later. CRM_Utils_Request::retrieve() is a very heavily used method. What steps can we take to limit more surprises? Any suggestions?  Or, should we consider reverting PR10435 despite the fact that it's "right"?

          Frank J. Gómez added a comment -

          Hmm, I think I agree with everything you said. That the original developer set 0 as a default but expected NULL is the real problem; 0 !== NULL. I don't think it's in our interests to support or grandfather in mistakes like these. I'll do a little research and see if I can identify other usages that might similarly break, and then we can have a conversation about next steps. Sound okay?

          Allen Shaw added a comment - - edited

          Yeah, that would be great. If we had some automated way of detecting such usage we'd be a lot better off, but I don't think it's possible. Grep shows that method is called from multiple places across 322 files in CiviCRM code. Probably lots of extensions too, and we can't babysit them, but it might be worth a PSA.

          Allen Shaw added a comment -

          We can probably grep/regex most of the usages to find calls where the $default argument is falsy (empty string, zero, are there others?).

          Seamus Lee added a comment -

          When the 4.7.26 RC drops we could also put out to people to watch out for these fatal errors and ask them to test the RC Allen Shaw might be worth Asking Tim about the "universe" Build and grepping on that. I think the purpose of that is to get every single freeeking extension out there and different types of code base i think

          Frank J. Gómez added a comment -

          Oh, boy. There are 1,092 usages of this method. However, most of them don't specify the 5th parameter, which is a necessary condition for the problem you've described. Of the ones that do, here is the list of values I found that we can rule out as problematic, because they are either NULL or truthy: NULL, 'search', 'label_format', TRUE, 'update', 'browse', 1, 'reserve', 'campaign', 'petition', 'survey', 'add', 'view', 'basic', 'safe', 'summary', 50, 'dashlet', 'register', 'membership', 'Individual', 'profileDataView', 'report', 'csv', 31, 'live'.

          For the following, we can safely replace the non-truthy parameter with NULL to achieve the same effect. In all these cases, the code currently expects a NULL (or at least doesn't break) if the $default is returned.

          • In CRM_Activity_Page_Tab->preProcess(), around line 132. Passes FALSE.
          • In CRM_Admin_Form_Extensions->preProcess(), around line 46. Passes 0.
          • In CRM_Admin_Page_ContactType->run(), around line 98 and again at 100. Passes 0.
          • In CRM_Admin_Page_Job->run(), around line 124 and 127. Passes 0.
          • In CRM_Campaign_Form_Search_Campaign->preProcess(), around line 51. Passes FALSE.
          • In CRM_Campaign_Form_Search_Petition->preProcess(), around 51. Passes FALSE.
          • In CRM_Campaign_Form_Search_Survey->preProcess(), around 51. Passes FALSE.
          • In CRM_Campaign_Page_Petition->run(), around line 53. Passes FALSE.
          • In CRM_Contact_Form_DedupeFind->preProcess(), around line 43. Passes 0.
          • In CRM_Contact_Form_DedupeRules->preProcess(), around lines 60 and 62. Passes 0.
          • In CRM_Contact_Page_DedupeFind->run(), first six lines starting around 60 and again at 102 and 104. Passes 0.
          • In CRM_Contribute_Form_ContributionPage_AddProduct->preProcess(), around line 51. Passes 0.
          • In CRM_Contribute_Form_ContributionPage_AddProduct->setDefaultValues(), around line 88. Passes 0.
          • In CRM_Contribute_Form_ContributionPage_AddProduct->buildQuickForm(), around line 115. Passes ''.
          • In CRM_Contribute_Page_ContributionPage->run(), around line 289 and 342. Passes 0.
          • In CRM_Contribute_Page_ContributionPage->copy(), around line 381. Passes 0.
          • In CRM_Contribute_Page_ContributionPage->browse(), around line 406. Passes 0.
          • In CRM_Contribute_Page_Premium->run(), around line 108. Passes 0.
          • In CRM_Contribute_Page_Premium->browse(), around line 130. Passes 0.
          • In CRM_Contribute_Selector_Search->getRows(), around line 345 and 352. Passes FALSE.
          • In CRM_Core_BAO_ConfigSetting-::doSiteMove(), around line 264. Passes FALSE.
          • In CRM_Core_Invoke::rebuildMenuAndCaches(), around line 369 and 390. Passes 0.
          • In CRM_Core_Page_Basic->getIdAndAction(), around line 180. Passes 0.
          • In CRM_Custom_Page_Field->run(), around line 229 and 258. Passes 0.
          • In CRM_Custom_Page_Group->run(), around line 123 and 133. Passes 0.
          • In CRM_Custom_Page_Option->run(), around line 184, 187, and 221. Passes 0.
          • In CRM_Event_Form_ManageEvent_ScheduleReminders->preProcess(), around line 50. Passes 0.
          • In CRM_Event_Page_ICalendar->run(), around line 52 through 59. Passes 0.
          • In CRM_Event_Page_ManageEvent->run(), around line 200. Passes 0.
          • In CRM_Event_Page_ManageEvent->browse(), around line 257. Passes 0.
          • In CRM_Event_Page_ManageEvent->copy(), around line 402. Passes 0.
          • In CRM_Financial_Page_FinancialTypeAccount->run(), around line 101 and 102. Passes 0.
          • In CRM_Mailing_Page_Browse->run(), around line 153. Passes 0.
          • In CRM_Mailing_Page_Preview->run(), around line 46 and 47. Passes FALSE.
          • In CRM_Member_Form_MembershipType->preProcess(), around line 48. Passes 0.
          • In CRM_Price_Page_Field->run(), around line 244. Passes 0.
          • In CRM_Price_Page_Option->edit(), around line 223. Passes 0.
          • In CRM_Price_Page_Option->run(), around line 277 and 322. Passes 0.
          • In CRM_Price_Page_Set->run(), around line 131. Passes 0.
          • In CRM_Price_Page_Set->copy(), around line 318. Passes 0.
          • In CRM_Profile_Form->preProcess(). around line 230, 253, and 257. Passes 0.
          • In CRM_Profile_Page_Dynamic->_construct(), around line 153. Passes 0.
          • In CRM_Profile_Page_Listings->preProcess(), around line 99, 107, and 127. Passes 0.
          • In CRM_Profile_Page_MultipleRecordFieldsListing->run(), around line 142 and 153. Passes 0.
          • In CRM_Profile_Page_Router->run(), around line 62. Passes 0.
          • In CRM_Profile_Page_View->preProcess(), around line 73 and 92. Passes 0.
          • In CRM_SMS_Page_Provider->run(), around lines 114 and 117. Passes 0.
          • In CRM_UF_Form_Group->preProcess(), around line 67. Passes 0.
          • In CRM_UF_Form_Preview->preProcess(), around line 56. Passes 0.
          • In CRM_UF_Page_Field->run(), around line 235 and 255. Passes 0.
          • In CRM_UF_Page_Group->run(), around line 164. Passes 0.
          • In CRM_UF_Page_Group->copy(), around line 207. Passes 0.
          • In CRM_UF_Page_Group->profile(), around line 227. Passes 0.
          • In CiviContributeProcessor->process(), around line 266. Passes 0.
          • In CRM_CiviDiscount_Form_Admin->preProcess(), around line 44 and 45. Passes 0.

          Here's a list of usages that could use an eyeball:

          • In CRM_Campaign_Form_Gotv->buildQuickForm(), around line 127. Passes $userId.
          • In CRM_Contact_Form_Search_Custom_FullText->getFieldValue(), around line 129. Passes $default.
          • In CRM_Core_Page_AJAX_Location::getPermissionedLocation(), around line 53. Passes CRM_Core_Session::singleton()->get('userID').
          • In CRM_Event_Page_EventInfo->run(), around line 66. Passes string 'false'.
          • In CRM_Profile_Form_Edit->preProcess(), around line 94. Passes $userId.
          • In CRM_Report_Form->setOutputMode(), around line 4740. Passes CRM_Utils_Array::value('task', $this->_params).
          • In CRM_SMS_Provider->retrieve(), around line 185. Passes $default.
          • In CRM_Utils_Wrapper->run(), around line 96. Passes $default.
          Frank J. Gómez added a comment -

          Looks like I included volunteer and CiviDiscount and whatever else ships in a drupal-demo buildkit install....

          Seamus Lee added a comment -

          So the ones passing $userID will pass in either NULL or an id and same goes for CRM_Core_Sessission one

          The one i'm not sure about is CRM_SMS_Provider->retrieve() as i think that might be called in extensions. CRM_Utils_Array::value returns NULL if no default is passed in to it and the key can't be found. 

          In the case of CRM_Event_Page_EventInfo i feel like it should really be converted to a booleen style. 

          Allen Shaw added a comment -

          ... replace the non-truthy parameter with NULL to achieve the same effect ...

          Yes, that's much better than the current approach in my PR.

          Frank J. Gómez, how did you find the method usages that you list above? My method is unfortunately not fully scripted, but here's a list of usages that I think are not listed above, presumably because the 5th parameter is not on the same line as the method name: 

          Multiline usages that pass a static value as the 5th ($default) parameter:

          • bin/ContributionProcessor.php, starting on line 266. Passes 0.
          • CRM/Campaign/Page/Petition.php, starting on line 52. Passes 0.
          • CRM/SMS/Page/Provider.php, starting on line 114. Passes 0.
          • CRM/SMS/Page/Provider.php, starting on line 117. Passes 0.
          • CRM/UF/Page/Group.php, starting on line 164. Passes 0.
          • CRM/UF/Page/Group.php, starting on line 207. Passes 0.
          • CRM/UF/Page/Group.php, starting on line 227. Passes 0.
          • CRM/UF/Page/Field.php, starting on line 235. Passes 0.
          • CRM/UF/Page/Field.php, starting on line 255. Passes 0.
          • CRM/Core/BAO/ConfigSetting.php, starting on line 264. Passes FALSE.
          • CRM/Contribute/Page/ContributionPage.php, starting on line 289. Passes 0.
          • CRM/Contribute/Page/ContributionPage.php, starting on line 342. Passes 0.
          • CRM/Contribute/Page/ContributionPage.php, starting on line 381. Passes 0.
          • CRM/Contribute/Page/ContributionPage.php, starting on line 406. Passes 0.
          • CRM/Contribute/Page/Premium.php, starting on line 108. Passes 0.
          • CRM/Contribute/Page/Premium.php, starting on line 130. Passes 0.
          • CRM/Contribute/Form/ContributionPage/AddProduct.php, starting on line 50. Passes 0.
          • CRM/Contribute/Form/ContributionPage/AddProduct.php, starting on line 88. Passes 0.
          • CRM/Contribute/Form/ContributionPage/AddProduct.php, starting on line 115. Passes ''.
          • CRM/Admin/Page/Job.php, starting on line 124. Passes 0.
          • CRM/Admin/Page/Job.php, starting on line 127. Passes 0.
          • CRM/Admin/Form/Extensions.php, starting on line 45. Passes 0.
          • CRM/Price/Page/Set.php, starting on line 131. Passes 0.
          • CRM/Price/Page/Set.php, starting on line 318. Passes 0.
          • CRM/Price/Page/Option.php, starting on line 223. Passes 0.
          • CRM/Price/Page/Option.php, starting on line 277. Passes 0.
          • CRM/Price/Page/Option.php, starting on line 322. Passes 0.
          • CRM/Price/Page/Field.php, starting on line 244. Passes 0.
          • CRM/Custom/Page/Group.php, starting on line 123. Passes 0.
          • CRM/Custom/Page/Group.php, starting on line 133. Passes 0.
          • CRM/Custom/Page/Option.php, starting on line 184. Passes 0.
          • CRM/Custom/Page/Option.php, starting on line 187. Passes 0.
          • CRM/Custom/Page/Option.php, starting on line 221. Passes 0.
          • CRM/Custom/Page/Field.php, starting on line 229. Passes 0.
          • CRM/Custom/Page/Field.php, starting on line 258. Passes 0.
          • CRM/Event/Page/ManageEvent.php, starting on line 200. Passes 0.

          Multiline usages that pass a variable as the 5th ($default) parameter:

          • CRM/Campaign/Form/Search.php, starting on line 425. Passes $userId.
          • CRM/Campaign/Form/Gotv.php, starting on line 127. Passes $userId.
          • CRM/Utils/Wrapper.php, starting on line 96. Passes $default.
          • CRM/SMS/Provider.php, starting on line 185. Passes $default.
             

           

          The above are based on a search of the civicrm-core master branch on a Drupal installation, which, it occurs to me now, does not include Joomla, WP, and Backdrop integration code.

          Allen Shaw added a comment -

          Since we're showing results above on fixing all similar issues, (or as many as we can find), I've changed the title to "Multiple issues". I think we can make one PR that fixes the majority of these, with Frank's recommended approach, passing NULL instead of something falsy in the 5th argument.

          Allen Shaw added a comment -

          Okay, I believe the following is a complete list of usages that need or may need attention. My process is mostly scripted now, except for a final manual inspection and some sorting.

          1. This list is based on a search of a site built with `civibuild create universe`, which includes lots of extensions, as well as Drupal (6|7|8), Wordpress, Backdrop, Joomla, and other stuff.
          2. This search includes multi-line usages where the 5th parameter is not on the same line as the method name.
          3. Only usages that have a 5th parameter are listed, and only those where the 5th parameter either is clearly falsy or could be falsy.

           

          Clearly falsy 5th parameter:

          • biz.jmaconsulting.bugp: CRM/UF/Page/Group.php, around line 164, passes 0.
          • biz.jmaconsulting.bugp: CRM/UF/Page/Group.php, around line 207, passes 0.
          • biz.jmaconsulting.bugp: CRM/UF/Page/Group.php, around line 227, passes 0.
          • civicrm-core: bin/ContributionProcessor.php, around line 263, passes 0.
          • civicrm-core: bin/ContributionProcessor.php, around line 266, passes 0.
          • civicrm-core: CRM/Admin/Form/Extensions.php, around line 45, passes 0.
          • civicrm-core: CRM/Admin/Page/ContactType.php, around line 100, passes 0.
          • civicrm-core: CRM/Admin/Page/ContactType.php, around line 98, passes 0.
          • civicrm-core: CRM/Admin/Page/Job.php, around line 124, passes 0.
          • civicrm-core: CRM/Admin/Page/Job.php, around line 127, passes 0.
          • civicrm-core: CRM/Campaign/Form/Search/Campaign.php, around line 51, passes FALSE.
          • civicrm-core: CRM/Campaign/Form/Search/Petition.php, around line 51, passes FALSE.
          • civicrm-core: CRM/Campaign/Form/Search/Survey.php, around line 51, passes FALSE.
          • civicrm-core: CRM/Campaign/Page/Petition.php, around line 52, passes 0.
          • civicrm-core: CRM/Contact/Form/DedupeFind.php, around line 43, passes 0.
          • civicrm-core: CRM/Contact/Form/DedupeRules.php, around line 60, passes 0.
          • civicrm-core: CRM/Contact/Form/DedupeRules.php, around line 62, passes 0.
          • civicrm-core: CRM/Contact/Page/DedupeFind.php, around line 102, passes 0.
          • civicrm-core: CRM/Contact/Page/DedupeFind.php, around line 104, passes 0.
          • civicrm-core: CRM/Contact/Page/DedupeFind.php, around line 60, passes 0.
          • civicrm-core: CRM/Contact/Page/DedupeFind.php, around line 61, passes 0.
          • civicrm-core: CRM/Contact/Page/DedupeFind.php, around line 65, passes 0.
          • civicrm-core: CRM/Contribute/Form/ContributionPage/AddProduct.php, around line 115, passes ''.
          • civicrm-core: CRM/Contribute/Form/ContributionPage/AddProduct.php, around line 50, passes 0.
          • civicrm-core: CRM/Contribute/Form/ContributionPage/AddProduct.php, around line 88, passes 0.
          • civicrm-core: CRM/Contribute/Page/ContributionPage.php, around line 289, passes 0.
          • civicrm-core: CRM/Contribute/Page/ContributionPage.php, around line 342, passes 0.
          • civicrm-core: CRM/Contribute/Page/ContributionPage.php, around line 381, passes 0.
          • civicrm-core: CRM/Contribute/Page/ContributionPage.php, around line 406, passes 0.
          • civicrm-core: CRM/Contribute/Page/Premium.php, around line 108, passes 0.
          • civicrm-core: CRM/Contribute/Page/Premium.php, around line 130, passes 0.
          • civicrm-core: CRM/Contribute/Selector/Search.php, around line 345, passes FALSE.
          • civicrm-core: CRM/Contribute/Selector/Search.php, around line 352, passes FALSE.
          • civicrm-core: CRM/Core/BAO/ConfigSetting.php, around line 264, passes FALSE.
          • civicrm-core: CRM/Core/Invoke.php, around line 369, passes 0.
          • civicrm-core: CRM/Core/Invoke.php, around line 390, passes 0.
          • civicrm-core: CRM/Core/Page/Basic.php, around line 180, passes 0.
          • civicrm-core: CRM/Custom/Page/Field.php, around line 229, passes 0.
          • civicrm-core: CRM/Custom/Page/Field.php, around line 258, passes 0.
          • civicrm-core: CRM/Custom/Page/Group.php, around line 123, passes 0.
          • civicrm-core: CRM/Custom/Page/Group.php, around line 133, passes 0.
          • civicrm-core: CRM/Custom/Page/Option.php, around line 184, passes 0.
          • civicrm-core: CRM/Custom/Page/Option.php, around line 187, passes 0.
          • civicrm-core: CRM/Custom/Page/Option.php, around line 221, passes 0.
          • civicrm-core: CRM/Event/Form/ManageEvent/ScheduleReminders.php, around line 50, passes 0.
          • civicrm-core: CRM/Event/Page/ICalendar.php, around line 53, passes 0.
          • civicrm-core: CRM/Event/Page/ICalendar.php, around line 54, passes 0.
          • civicrm-core: CRM/Event/Page/ICalendar.php, around line 55, passes 0.
          • civicrm-core: CRM/Event/Page/ICalendar.php, around line 56, passes 0.
          • civicrm-core: CRM/Event/Page/ICalendar.php, around line 57, passes 0.
          • civicrm-core: CRM/Event/Page/ICalendar.php, around line 58, passes 0.
          • civicrm-core: CRM/Event/Page/ICalendar.php, around line 59, passes 0.
          • civicrm-core: CRM/Event/Page/ManageEvent.php, around line 200, passes 0.
          • civicrm-core: CRM/Event/Page/ManageEvent.php, around line 253, passes 0.
          • civicrm-core: CRM/Event/Page/ManageEvent.php, around line 257, passes 0.
          • civicrm-core: CRM/Event/Page/ManageEvent.php, around line 402, passes 0.
          • civicrm-core: CRM/Financial/Page/FinancialTypeAccount.php, around line 101, passes 0.
          • civicrm-core: CRM/Financial/Page/FinancialTypeAccount.php, around line 102, passes 0.
          • civicrm-core: CRM/Mailing/Page/Browse.php, around line 153, passes 0.
          • civicrm-core: CRM/Member/Form/MembershipType.php, around line 48, passes 0.
          • civicrm-core: CRM/Price/Page/Field.php, around line 241, passes 0.
          • civicrm-core: CRM/Price/Page/Option.php, around line 224, passes 0.
          • civicrm-core: CRM/Price/Page/Option.php, around line 278, passes 0.
          • civicrm-core: CRM/Price/Page/Option.php, around line 323, passes 0.
          • civicrm-core: CRM/Price/Page/Set.php, around line 131, passes 0.
          • civicrm-core: CRM/Price/Page/Set.php, around line 318, passes 0.
          • civicrm-core: CRM/Profile/Form.php, around line 230, passes 0.
          • civicrm-core: CRM/Profile/Form.php, around line 253, passes 0.
          • civicrm-core: CRM/Profile/Form.php, around line 257, passes 0.
          • civicrm-core: CRM/Profile/Page/Dynamic.php, around line 153, passes 0.
          • civicrm-core: CRM/Profile/Page/Listings.php, around line 107, passes 0.
          • civicrm-core: CRM/Profile/Page/Listings.php, around line 127, passes 0.
          • civicrm-core: CRM/Profile/Page/Listings.php, around line 99, passes 0.
          • civicrm-core: CRM/Profile/Page/MultipleRecordFieldsListing.php, around line 142, passes FALSE.
          • civicrm-core: CRM/Profile/Page/MultipleRecordFieldsListing.php, around line 153, passes 0.
          • civicrm-core: CRM/Profile/Page/Router.php, around line 62, passes 0.
          • civicrm-core: CRM/Profile/Page/View.php, around line 73, passes 0.
          • civicrm-core: CRM/Profile/Page/View.php, around line 92, passes 0.
          • civicrm-core: CRM/SMS/Page/Provider.php, around line 114, passes 0.
          • civicrm-core: CRM/SMS/Page/Provider.php, around line 117, passes 0.
          • civicrm-core: CRM/UF/Form/Group.php, around line 67, passes 0.
          • civicrm-core: CRM/UF/Form/Preview.php, around line 56, passes 0.
          • civicrm-core: CRM/UF/Page/Field.php, around line 235, passes 0.
          • civicrm-core: CRM/UF/Page/Field.php, around line 255, passes 0.
          • civicrm-core: CRM/UF/Page/Group.php, around line 164, passes 0.
          • civicrm-core: CRM/UF/Page/Group.php, around line 207, passes 0.
          • civicrm-core: CRM/UF/Page/Group.php, around line 227, passes 0.
          • civihr: hrabsence/CRM/HRAbsence/Page/AbsencePeriod.php, around line 99, passes 0.
          • civihr: hrabsence/CRM/HRAbsence/Page/AbsenceType.php, around line 109, passes 0.
          • civihr: hrabsence/CRM/HRAbsence/Page/PublicHolidays.php, around line 101, passes 0.
          • civihr: hrjobcontract/CRM/Hrjobcontract/Page/HoursLocation.php, around line 76, passes 0.
          • civihr: hrjobcontract/CRM/Hrjobcontract/Page/PayScale.php, around line 76, passes 0.
          • civihr: hrrecruitment/CRM/HRRecruitment/Form/Search/Delete.php, around line 56, passes 0.
          • civihr: hrrecruitment/CRM/HRRecruitment/Page/SearchVacancy.php, around line 140, passes 0.
          • civihr: hrrecruitment/CRM/HRRecruitment/Page/SearchVacancy.php, around line 141, passes 0.
          • civihr: hrrecruitment/CRM/HRRecruitment/Page/SearchVacancy.php, around line 257, passes 0.
          • civihr: hrrecruitment/CRM/HRRecruitment/Page/SearchVacancy.php, around line 95, passes 0.
          • civihr: uk.co.compucorp.civicrm.appraisals/CRM/Appraisals/Page/AppraisalCriteria.php, around line 76, passes 0.
          • com.zyxware.civiwci: CRM/Wci/Page/ManageEmbedCode.php, around line 32, passes 0.
          • com.zyxware.civiwci: CRM/Wci/Page/ManageEmbedCode.php, around line 38, passes 0.
          • com.zyxware.civiwci: CRM/Wci/Page/ProgressBarList.php, around line 32, passes 0.
          • com.zyxware.civiwci: CRM/Wci/Page/ProgressBarList.php, around line 38, passes 0.
          • com.zyxware.civiwci: CRM/Wci/Page/WidgetList.php, around line 32, passes 0.
          • com.zyxware.civiwci: CRM/Wci/Page/WidgetList.php, around line 38, passes 0.
          • org.civicoop.documents: CRM/Documents/Form/NewVersion.php, around line 28, passes false.
          • org.civicoop.documents: CRM/Documents/Page/Versions.php, around line 32, passes false.
          • org.civicoop.documents: CRM/Documents/Page/Versions.php, around line 33, passes false.
          • org.civicoop.eventprivateical: CRM/Eventprivateical/Page/Ical.php, around line 18, passes 0.
          • org.civicoop.eventprivateical: CRM/Eventprivateical/Page/Ical.php, around line 19, passes 0.
          • org.civicoop.eventprivateical: CRM/Eventprivateical/Page/Ical.php, around line 20, passes 0.
          • org.civicoop.eventprivateical: CRM/Eventprivateical/Page/Ical.php, around line 21, passes 0.
          • org.civicoop.eventprivateical: CRM/Eventprivateical/Page/Ical.php, around line 22, passes 0.
          • org.civicoop.eventprivateical: CRM/Eventprivateical/Page/Ical.php, around line 23, passes 0.
          • org.civicoop.eventprivateical: CRM/Eventprivateical/Page/Ical.php, around line 24, passes 0.
          • org.civicoop.postcodenl: CRM/Postcodenl/Page/AJAX.php, around line 26, passes ''.
          • org.civicrm.module.cividiscount: CRM/CiviDiscount/Form/Admin.php, around line 44, passes 0.
          • org.civicrm.module.cividiscount: CRM/CiviDiscount/Form/Admin.php, around line 45, passes 0.
          • org.takethestreets.fastactionlinks: CRM/Fastactionlinks/Page/FastActionLink.php, around line 66, passes 0.
          • uk.co.compucorp.civicrm.booking: CRM/Admin/Form/ResourceConfigOption.php, around line 46, passes 0.
          • uk.co.compucorp.civicrm.booking: CRM/Admin/Form/Resource.php, around line 45, passes 0.
          • uk.co.compucorp.civicrm.booking: CRM/Admin/Page/ResourceConfigOption.php, around line 108, passes 0.
          • uk.co.compucorp.civicrm.booking: CRM/Booking/Controller/Booking.php, around line 43, passes 0.
          • uk.co.compucorp.civicrm.booking: CRM/Booking/Form/Booking/View.php, around line 93, passes 0.
          • uk.co.compucorp.civicrm.booking: CRM/Booking/Form/SelectResource.php, around line 29, passes 0.
          • uk.co.compucorp.civicrm.booking: CRM/Booking/Page/Print/DayView.php, around line 9, passes 0.

           

          Possibly falsy 5th parameter (needs a look at the code):

          • civicrm-core: CRM/Campaign/Form/Gotv.php, around line 127, passes $userId.
          • civicrm-core: CRM/Campaign/Form/Search.php, around line 425, passes $userId.
          • civicrm-core: CRM/Contact/Form/Search/Custom/FullText.php, around line 129, passes $default.
          • civicrm-core: CRM/Event/Page/EventInfo.php, around line 66, passes 'false'.
          • civicrm-core: CRM/Profile/Form/Edit.php, around line 94, passes $userID.
          • civicrm-core: CRM/Report/Form.php, around line 4740, passes CRM_Utils_Array::value('task', $this->_params).
          • civicrm-core: CRM/SMS/Provider.php, around line 185, passes $default.
          • civicrm-core: CRM/Utils/Wrapper.php, around line 96, passes $default.

           

          Apologies for the multiple attempts at listing these. I believe this is the definitive list.

          Seamus Lee added a comment -

          pinging Joe Murray Jamie Novick as they have extensions that may be affected by this as per Alan's list

          Eileen McNaughton added a comment -

          Let's revert and add  a NEW function on CRM_Core_Form that does retrieve the 'right' way & follow a deprecation path on the retrieve fn - also if we make the FORM function class based we can have 2

           

          $form->retreiveParameter

           

          $form->retreiveAndStoreParameter

           

          (or similar) 

          and get away from the nastiness of passing $store by reference.

           

          We can review how best to do outside form context -

          Eileen McNaughton added a comment -

          I have reverted the change that caused this - let's take our time

          Eileen McNaughton added a comment -

          I think we should close this as it is now fixed & Frank J. Gómez let's re-open the other one & come up with a new fix....

          Allen Shaw added a comment -

          Note: Fixed in https://github.com/civicrm/civicrm-core/pull/11049

          Good call, Eileen McNaughton. I'll close this issue. When you say "re-open the other one," do you mean #20653 or something else?

           

          Eileen McNaughton added a comment -

          yep that's the one - I've reopened it

            People

            • Assignee:
              Allen Shaw
              Reporter:
              Allen Shaw

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 45 minutes
                2h 45m