@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