Answers.Body: <p>I created a PR on the CiviMobileAPI that fixes this problem. See <a href="https://github.com/agiliway/com.agiliway.civimobileapi/pull/11" rel="nofollow noreferrer">https://github.com/agiliway/com.agiliway.civimobileapi/pull/11</a> </p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-06-11T16:27:21.967Z
Answers.Text: Hi Thanks for the update, can you please advise how I can install this fix to my CiviCRM? I am not a programmer, just knows to setup wordpress and install the plugins/extensions
Answers.UserDisplayName: R John
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-06-12T12:11:47.000Z
Answers.Text: There are two options. Let me describe the first. The extension shows a warning. That is not an error. A warning is a signal to the programmer that the code must be improved, but the code still works. You can disable the warning. I asked Google  for advice and found the following link https://www.greengeeks.com/tutorials/article/disable-wordpress-php-error-messages/ .
Answers.UserDisplayName: Kainuk - CiviCooP
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-06-12T12:13:37.043Z
Answers.Text: The other option is to overwrite the file with the patch on the filesystem. The file can be downloaded here https://raw.githubusercontent.com/agiliway/com.agiliway.civimobileapi/74922354f3b481b3a8e0ba0fecab57095a38842b/civimobileapi.php .
Answers.UserDisplayName: Kainuk - CiviCooP
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-06-14T01:47:31.193Z
Answers.Text: Thank you, I have copied this file and the warning disappeared!
Answers.UserDisplayName: R John
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-06-11T06:21:53.367Z
Answers.LastActivityDate: 2019-06-11T06:21:53.367Z
Answers.UserDisplayName: Kainuk - CiviCooP
Body: <p>After installing the extension CiviMobileAPI, I am getting the below error when I access the contacts page. Can you please have a look and support.</p>
  
  <p>Warning: Invalid argument supplied for foreach() in /home/hisadvocate/www/www/wp-content/extensions/com.agiliway.civimobileapi-3.1/com.agiliway.civimobileapi-3.1/CRM/CiviMobileAPI/ApiWrapper/Activity/Get.php on line 31</p>
  
  <p>I am using the Civi CRM version 5.2.1. Any help?</p>
  
Tags: <extension>
Title: Error on enabling CiviMobileAPI extension
ThreadText: # Error on enabling CiviMobileAPI extension
  
  (Asked by: username_0 on 2019-06-10)
  
  After installing the extension CiviMobileAPI, I am getting the below error when I access the contacts page. Can you please have a look and support.
  
  Warning: Invalid argument supplied for foreach() in /home/hisadvocate/www/www/wp-content/extensions/com.agiliway.civimobileapi-3.1/com.agiliway.civimobileapi-3.1/CRM/CiviMobileAPI/ApiWrapper/Activity/Get.php on line 31
  
  I am using the Civi CRM version 5.2.1. Any help?
  
  **Tags:** extension
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-06-11. Score: 1 | Accepted answer
  
  I created a PR on the CiviMobileAPI that fixes this problem. See <https://github.com/agiliway/com.agiliway.civimobileapi/pull/11>
  
  > **Comments:**
  > **username_0**: Hi Thanks for the update, can you please advise how I can install this fix to my CiviCRM? I am not a programmer, just knows to setup wordpress and install the plugins/extensions  
  > **username_1**: There are two options. Let me describe the first. The extension shows a warning. That is not an error. A warning is a signal to the programmer that the code must be improved, but the code still works. You can disable the warning. I asked Google  for advice and found the following link https://www.greengeeks.com/tutorials/article/disable-wordpress-php-error-messages/ .  
  > **username_1**: The other option is to overwrite the file with the patch on the filesystem. The file can be downloaded here https://raw.githubusercontent.com/agiliway/com.agiliway.civimobileapi/74922354f3b481b3a8e0ba0fecab57095a38842b/civimobileapi.php .  
  > **username_0**: Thank you, I have copied this file and the warning disappeared!  
  
  ---
  
  