Answers.Body: <p>It's just a warning, not an error, but looks like a problem that should be fixed, you could <a href="https://lab.civicrm.org/groups/dev/-/issues/" rel="nofollow noreferrer">report it on Gitlab</a> and maybe even fix it yourself.</p>
  <p>I think <code>$store</code> could probably not be passed at all since the default is NULL (the other params after it are also default), but maybe there is some reason to set it NULL first, as it is <a href="https://github.com/search?q=repo%3Acivicrm%2Fcivicrm-core%20CRM_Utils_Request%3A%3Aretrieve%20%24store&amp;type=code" rel="nofollow noreferrer">in other places.</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-07-02T13:32:41.150Z
Answers.Text: It was refactored here causing the bug: https://github.com/civicrm/civicrm-core/commit/906e5a456c763b36052eef0a462eb6b860f1eddd. As noted I would just remove the extra params `$api_key    = CRM_Utils_Request::retrieve('api_key', 'String');` and the $store assignment lower down.
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-07-01T14:04:50.173Z
Answers.LastActivityDate: 2023-07-01T14:04:50.173Z
Answers.UserDisplayName: Lars SG
Body: <p>I am experiencing an issue with Joomla integration while using CiviCRM. I am getting the following error on line 56 of the &quot;Joomla.php&quot; file:</p>
  <p>PHP Warning: Undefined variable $store in /home/userxxx/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Permission/Joomla.php on line 56</p>
  <p><a href="https://i.sstatic.net/RzqPS.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/RzqPS.jpg" alt="enter image description here" /></a></p>
  <p>This error indicates that the variable <code>$store</code> is not defined when trying to set the <code>$api_key</code> variable. However, I have noticed that I haven't previously defined the <code>$store</code> variable.</p>
  <p>Relevant code snippet:</p>
  <pre><code>$api_key = CRM_Utils_Request::retrieve('api_key', 'String', $store, FALSE, NULL, 'REQUEST');
  </code></pre>
  <p><a href="https://i.sstatic.net/9dyhA.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/9dyhA.jpg" alt="enter image description here" /></a></p>
  <p>I am seeking assistance with resolving this issue. How should I properly define the <code>$store</code> variable?</p>
  <p>Any help with this would be greatly appreciated. Thank you in advance.</p>
  <p>Best regards,</p>
  
Tags: <joomla><error><php><logs>
Title: Undefined variable $store in Joomla.php on line 56 - CRM_Core_Permission_Joomla error
ThreadText: # Undefined variable $store in Joomla.php on line 56 - CRM_Core_Permission_Joomla error
  
  (Asked by: username_0 on 2023-07-01)
  
  I am experiencing an issue with Joomla integration while using CiviCRM. I am getting the following error on line 56 of the "Joomla.php" file:
  PHP Warning: Undefined variable $store in /home/userxxx/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Permission/Joomla.php on line 56
  
  This error indicates that the variable $store is not defined when trying to set the $api_key variable. However, I have noticed that I haven't previously defined the $store variable.
  Relevant code snippet:
  $api_key = CRM_Utils_Request::retrieve('api_key', 'String', $store, FALSE, NULL, 'REQUEST');
  
  
  I am seeking assistance with resolving this issue. How should I properly define the $store variable?
  Any help with this would be greatly appreciated. Thank you in advance.
  Best regards,
  
  **Tags:** joomla, error, php, logs
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2023-07-01. Score: 3 | Accepted answer
  
  It's just a warning, not an error, but looks like a problem that should be fixed, you could [report it on Gitlab](https://lab.civicrm.org/groups/dev/-/issues/) and maybe even fix it yourself.
  
  I think `$store` could probably not be passed at all since the default is NULL (the other params after it are also default), but maybe there is some reason to set it NULL first, as it is [in other places.](https://github.com/search?q=repo%3Acivicrm%2Fcivicrm-core%20CRM_Utils_Request%3A%3Aretrieve%20%24store&type=code)
  
  > **Comments:**
  > **username_2**: It was refactored here causing the bug: https://github.com/civicrm/civicrm-core/commit/906e5a456c763b36052eef0a462eb6b860f1eddd. As noted I would just remove the extra params `$api_key    = CRM_Utils_Request::retrieve('api_key', 'String');` and the $store assignment lower down.  
  
  ---
  
  