Title: PHP errors when installing plugin
Last modified: February 28, 2020

---

# PHP errors when installing plugin

 *  Resolved [tianpp](https://wordpress.org/support/users/tianpp/)
 * (@tianpp)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/php-errors-when-installing-plugin-2/)
 * Hello,
 * I’m getting php error messages when installing WPeMatico in WP 5.3.2. I’ve tried
   with the last version of the plugin and with older ones with the same results.
   Maybe is about php version?
 * > Deprecated: Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(
   > a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in /opt/lampp/apps/wordpress/htdocs/
   > wp-content/plugins/wpematico/app/plugin_functions.php on line 209
   >  Warning: Cannot modify header information – headers already sent by (output
   > started at /opt/lampp/apps/wordpress/htdocs/wp-content/plugins/wpematico/app/
   > wpematico_functions.php:755) in /opt/lampp/apps/wordpress/htdocs/wp-includes/
   > functions.php on line 6029
   > Warning: Cannot modify header information – headers already sent by (output
   > started at /opt/lampp/apps/wordpress/htdocs/wp-content/plugins/wpematico/app/
   > wpematico_functions.php:755) in /opt/lampp/apps/wordpress/htdocs/wp-admin/includes/
   > misc.php on line 1252
   > Warning: Cannot modify header information – headers already sent by (output
   > started at /opt/lampp/apps/wordpress/htdocs/wp-content/plugins/wpematico/app/
   > wpematico_functions.php:755) in /opt/lampp/apps/wordpress/htdocs/wp-admin/admin-
   > header.php on line 9
   > Warning: Cannot modify header information – headers already sent by (output
   > started at /opt/lampp/apps/wordpress/htdocs/wp-content/plugins/wpematico/app/
   > wpematico_functions.php:755) in /opt/lampp/apps/wordpress/htdocs/wp-includes/
   > option.php on line 961
   > Warning: Cannot modify header information – headers already sent by (output
   > started at /opt/lampp/apps/wordpress/htdocs/wp-content/plugins/wpematico/app/
   > wpematico_functions.php:755) in /opt/lampp/apps/wordpress/htdocs/wp-includes/
   > option.php on line 962
 * Thank you!

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [etruel](https://wordpress.org/support/users/etruel/)
 * (@etruel)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/php-errors-when-installing-plugin-2/#post-12491630)
 * Hi [@tianpp](https://wordpress.org/support/users/tianpp/),
    These are warnings,
   could be php version but anyway should work well. Could you send the system status
   to see the versions of the php and its installed extensions, apache, DB etc? 
   You can find it in WPeMatico Settings, System Status tab.
 * regards
 *  [Limbcode](https://wordpress.org/support/users/limbcode/)
 * (@limbcode)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/php-errors-when-installing-plugin-2/#post-12491953)
 * Hi [@etruel](https://wordpress.org/support/users/etruel/) ,
 * This warning are connected with PHP 7.4 depreciated things. So if one have php
   7.4 with enabled debug this will happen always. It would be great that you update
   the plugin.
 *  Thread Starter [tianpp](https://wordpress.org/support/users/tianpp/)
 * (@tianpp)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/php-errors-when-installing-plugin-2/#post-12500159)
 * Hi [@etruel](https://wordpress.org/support/users/etruel/),
 * here is the system status log:
 * >  Warning: count(): Parameter must be an array or an object that implements 
   > Countable in /opt/lampp/apps/wordpress/htdocs/wp-content/plugins/wpematico/
   > app/debug_page.php on line 1501
   >  ### Begin Debug Info ###
   > — Server Environment
   > Hosting Provider: DBH: localhost:3306, SRV: localhost
   >  WebServer Info: Apache/
   > 2.4.41 (Unix) OpenSSL/1.1.1d PHP/7.4.2 mod_perl/2.0.8-dev Perl/v5.16.3 MySQL
   > Version: 5.5.5 PHP Version: 7.4.2
   > — Required Apache Mods
   >  Mod Rewrite: Enabled Mod Mime: Enabled Mod Deflate:
   > Enabled
   > — PHP Extensions
   > cURL (php.net/curl): 7.53.1
   >  ZipArchive: Enabled DOMDocument: Enabled GD Library:
   > Enabled XML (php.net/xml): Enabled, and sane PCRE (php.net/pcre): Enabled Zlib(
   > php.net/zlib): Enabled php.net/mbstring: Enabled iconv (php.net/iconv): Enabled
   > OpenSSL(php.net/openssl):Enabled MCrypt (php.net/mcrypt): Disabled
 * It’s a local new install, without any other extensions in WP when I’ve received
   this errors and warnings for the first time… In fact, it’s a php 7.4 system with
   debug enabled.
 * I’ll try to run a campaign,
 * thank you.
 *  [dconsorte](https://wordpress.org/support/users/dconsorte/)
 * (@dconsorte)
 * [6 years ago](https://wordpress.org/support/topic/php-errors-when-installing-plugin-2/#post-12737538)
 * [@etruel](https://wordpress.org/support/users/etruel/) can you please fix deprecated
   functions for php 7.4? I did some of the work for you. The main warnings I get
   are:
    Deprecated: Unparenthesized `a ? b : c ? d : e` is deprecated. Use either`(
   a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in followed by many line numbers
   and gave you examples of how to fix them. I traced it to these lines but there
   may be more:
 * **** campaigns_list.php ****
    lines 2125-2133:
 *  $campaign[‘campaign_feed_order_date’] = (!isset($posdata[‘campaign_feed_order_date’])
   || empty($posdata[‘campaign_feed_order_date’])) ? false : ($posdata[‘campaign_feed_order_date’]
   == 1) ? true : false;
 *  $campaign[‘campaign_feeddate’] = (!isset($posdata[‘campaign_feeddate’]) || empty(
   $posdata[‘campaign_feeddate’])) ? false : ($posdata[‘campaign_feeddate’] == 1)?
   true : false;
 *  $campaign[‘campaign_allowpings’] = (!isset($posdata[‘campaign_allowpings’]) 
   || empty($posdata[‘campaign_allowpings’])) ? false : ($posdata[‘campaign_allowpings’]
   == 1) ? true : false;
 *  $campaign[‘campaign_linktosource’] = (!isset($posdata[‘campaign_linktosource’])
   || empty($posdata[‘campaign_linktosource’])) ? false : ($posdata[‘campaign_linktosource’]
   == 1) ? true : false;
 *  $campaign[‘campaign_strip_links’] = (!isset($posdata[‘campaign_strip_links’])
   || empty($posdata[‘campaign_strip_links’])) ? false : ($posdata[‘campaign_strip_links’]
   == 1) ? true : false;
 * ** change to: **
 *  $campaign[‘campaign_feed_order_date’] = (!isset($posdata[‘campaign_feed_order_date’])
   || empty($posdata[‘campaign_feed_order_date’])) ? false : (($posdata[‘campaign_feed_order_date’]
   == 1) ? true : false);
 *  $campaign[‘campaign_feeddate’] = (!isset($posdata[‘campaign_feeddate’]) || empty(
   $posdata[‘campaign_feeddate’])) ? false : (($posdata[‘campaign_feeddate’] == 
   1) ? true : false);
 *  $campaign[‘campaign_allowpings’] = (!isset($posdata[‘campaign_allowpings’]) 
   || empty($posdata[‘campaign_allowpings’])) ? false : (($posdata[‘campaign_allowpings’]
   == 1) ? true : false);
 *  $campaign[‘campaign_linktosource’] = (!isset($posdata[‘campaign_linktosource’])
   || empty($posdata[‘campaign_linktosource’])) ? false : (($posdata[‘campaign_linktosource’]
   == 1) ? true : false);
 *  $campaign[‘campaign_strip_links’] = (!isset($posdata[‘campaign_strip_links’])
   || empty($posdata[‘campaign_strip_links’])) ? false : (($posdata[‘campaign_strip_links’]
   == 1) ? true : false);
 * ** lines 2217-2225 **
 *  $arrayData[‘campaign_feeddate’] = (!isset($_POST[‘campaign_feeddate’]) || empty(
   $_POST[‘campaign_feeddate’])) ? false : ($_POST[‘campaign_feeddate’] == 1) ? 
   true : false;
 *  $arrayData[‘campaign_commentstatus’] = (!isset($_POST[‘campaign_commentstatus’]))?‘
   closed’ : sanitize_text_field($_POST[‘campaign_commentstatus’]);
 *  $arrayData[‘campaign_allowpings’] = (!isset($_POST[‘campaign_allowpings’]) |
   | empty($_POST[‘campaign_allowpings’])) ? false : ($_POST[‘campaign_allowpings’]
   == 1) ? true : false;
 *  $arrayData[‘campaign_linktosource’] = (!isset($_POST[‘campaign_linktosource’])
   || empty($_POST[‘campaign_linktosource’])) ? false : ($_POST[‘campaign_linktosource’]
   == 1) ? true : false;
 *  $arrayData[‘campaign_strip_links’] = (!isset($_POST[‘campaign_strip_links’])
   || empty($_POST[‘campaign_strip_links’])) ? false : ($_POST[‘campaign_strip_links’]
   == 1) ? true : false;
 * ** change to: **
 *  $arrayData[‘campaign_feeddate’] = (!isset($_POST[‘campaign_feeddate’]) || empty(
   $_POST[‘campaign_feeddate’])) ? false : (($_POST[‘campaign_feeddate’] == 1) ?
   true : false);
 *  $arrayData[‘campaign_commentstatus’] = (!isset($_POST[‘campaign_commentstatus’]))?‘
   closed’ : sanitize_text_field($_POST[‘campaign_commentstatus’]);
 *  $arrayData[‘campaign_allowpings’] = (!isset($_POST[‘campaign_allowpings’]) |
   | empty($_POST[‘campaign_allowpings’])) ? false : (($_POST[‘campaign_allowpings’]
   == 1) ? true : false);
 *  $arrayData[‘campaign_linktosource’] = (!isset($_POST[‘campaign_linktosource’])
   || empty($_POST[‘campaign_linktosource’])) ? false : (($_POST[‘campaign_linktosource’]
   == 1) ? true : false);
 *  $arrayData[‘campaign_strip_links’] = (!isset($_POST[‘campaign_strip_links’])
   || empty($_POST[‘campaign_strip_links’])) ? false : (($_POST[‘campaign_strip_links’]
   == 1) ? true : false);
 * **** debug_page.php ****
 * ** line 1519 **
    <td><?php echo ($m_rewrite_ok) ? ‘<mark class=”yes”>✔</mark>’:‘
   <mark class=”‘ . (defined(‘WPEMATICO_CACHE_VERSION’) ? ‘error’ : ‘error-no-install’).‘”
   >’ . sprintf(__(‘%s is not installed on your server, but is recommended by %s.’,‘
   wpematico’), ‘Mod Rewrite’, ‘some addons’) . ‘</mark>’; ?></td>
 * ** change to: **
 *  <td><?php echo ($m_rewrite_ok) ? ‘<mark class=”yes”>✔</mark>’ : (‘<mark class
   =”‘ . (defined(‘WPEMATICO_CACHE_VERSION’) ? ‘error’ : ‘error-no-install’ ) . ‘”
   >’ . sprintf(__(‘%s is not installed on your server, but is recommended by %s.’,‘
   wpematico’), ‘Mod Rewrite’, ‘some addons’) . ‘</mark>’); ?></td>
 * ** line 1539 change: **
 *  <td><?php echo ($m_deflate_ok) ? ‘<mark class=”yes”>✔</mark>’ : ‘<mark class
   =”‘ . (defined(‘WPEMATICO_CACHE_VERSION’) ? ‘error’ : ‘error-no-install’ ) . ‘”
   >’ . sprintf(__(‘%s is not installed on your server, but is recommended by %s.’,‘
   wpematico’), ‘Mod Deflate’, ‘some addons’) . ‘</mark>’; ?></td>
 * ** change to: **
 *  <td><?php echo ($m_deflate_ok) ? ‘<mark class=”yes”>✔</mark>’ : (‘<mark class
   =”‘ . (defined(‘WPEMATICO_CACHE_VERSION’) ? ‘error’ : ‘error-no-install’ ) . ‘”
   >’ . sprintf(__(‘%s is not installed on your server, but is recommended by %s.’,‘
   wpematico’), ‘Mod Deflate’, ‘some addons’) . ‘</mark>’); ?></td>
 * wpematico_functions.php
 * line 1505 – 1649, 1743, 1801-1803, 1849-1877, 2183 same ? ? issue with missing
   parentheses
 * xml-importer.php
 * line 187-193
 * \lang\wpematico-sk_SK.mo
    line 43
 * \lang\wpematico-sk_SK.po
    line 13
 * wpematico_class.php
    line 416-480
 *  Plugin Author [etruel](https://wordpress.org/support/users/etruel/)
 * (@etruel)
 * [6 years ago](https://wordpress.org/support/topic/php-errors-when-installing-plugin-2/#post-12740916)
 * Hi [@dconsorte](https://wordpress.org/support/users/dconsorte/),
    Thankyou for
   your work. This was already fixed in our development version. It isn’t ready 
   to publish it here yet, but you can take a look and test it in the development
   repo at [github](https://github.com/etruel/wpematico).
 * cheers
    etruel

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘PHP errors when installing plugin’ is closed to new replies.

 * ![](https://ps.w.org/wpematico/assets/icon-256x256.jpg?rev=2757072)
 * [WPeMatico RSS Feed Fetcher](https://wordpress.org/plugins/wpematico/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wpematico/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wpematico/)
 * [Active Topics](https://wordpress.org/support/plugin/wpematico/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wpematico/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wpematico/reviews/)

## Tags

 * [PHP errors](https://wordpress.org/support/topic-tag/php-errors/)
 * [wp 5.3.2](https://wordpress.org/support/topic-tag/wp-5-3-2/)

 * 5 replies
 * 4 participants
 * Last reply from: [etruel](https://wordpress.org/support/users/etruel/)
 * Last activity: [6 years ago](https://wordpress.org/support/topic/php-errors-when-installing-plugin-2/#post-12740916)
 * Status: resolved