Answers.Body: <p>That could be related to the version of PHP on your server being too new for the version of Craft you're using.</p>
  <p>I'm sure you're aware, but Craft 2 is no longer supported; I'd recommend updating to 3 (ideally 4) as soon as possible. Craft 3 and 4 also support exporting from the control panel natively without plugins.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-05-02T14:46:11.020Z
Answers.Text: there are php 7.2. Could you please suggest which version should we use for making compatible for the this export plugin. 
  Is it easy to move craft 2 to craft 3?
Answers.UserDisplayName: Nik Dev
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-05-02T15:32:12.557Z
Answers.Text: @NikDev, You might give php v5.6 a try if v7.2 still gives you trouble. As far as upgrading, I would recommend going here: https://craftcms.com/docs/3.x/upgrade.html. The ease of updating will have to do a lot with the complexity of the site.
Answers.UserDisplayName: Jeff Irwin
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-05-02T14:40:56.463Z
Answers.LastActivityDate: 2023-05-02T14:40:56.463Z
Answers.UserDisplayName: darylknight
Body: <p>I installed this <a href="https://github.com/boboldehampsink/export" rel="nofollow noreferrer">https://github.com/boboldehampsink/export</a> plugin but getting error during exporting entities regarding to &quot;count(): Parameter must be an array or an object that implements Countable&quot;, I tried to debug and applied some condition but not working, you can see in the screenshot.</p>
  <p><a href="https://i.sstatic.net/FXyrG.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/FXyrG.png" alt="enter image description here" /></a></p>
  
Tags: <plugin-development><php><craft2>
Title: Craft CMS 2 - Exporting entity issue
ThreadText: # Craft CMS 2 - Exporting entity issue
  
  (Asked by: username_0 on 2023-05-02)
  
  I installed this <https://github.com/boboldehampsink/export> plugin but getting error during exporting entities regarding to "count(): Parameter must be an array or an object that implements Countable", I tried to debug and applied some condition but not working, you can see in the screenshot.
  
  [![enter image description here](https://i.sstatic.net/FXyrG.png)](https://i.sstatic.net/FXyrG.png)
  
  **Tags:** plugin-development, php, craft2
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2023-05-02. Score: 3 | Accepted answer
  
  That could be related to the version of PHP on your server being too new for the version of Craft you're using.
  
  I'm sure you're aware, but Craft 2 is no longer supported; I'd recommend updating to 3 (ideally 4) as soon as possible. Craft 3 and 4 also support exporting from the control panel natively without plugins.
  
  > **Comments:**
  > **username_0**: there are php 7.2. Could you please suggest which version should we use for making compatible for the this export plugin.  Is it easy to move craft 2 to craft 3?  
  > **username_2**: @username_0, You might give php v5.6 a try if v7.2 still gives you trouble. As far as upgrading, I would recommend going here: https://craftcms.com/docs/3.x/upgrade.html. The ease of updating will have to do a lot with the complexity of the site.  
  
  ---
  
  