0
votes

I've just started using XAMP (PHP v. 7.2.7). When I uploaded a theme and installed the demo, I've got the error message :

Warning: A non-numeric value encountered in C:\xampp\htdocs\wordpress\wp-content\themes\IonMag\includes\wp_booster\td_block.php on line 365**

Here is what's on the line 365:

if ($this->td_query->found_posts - $offset > $limit) {$this->block_uid . '" data-td_block_id="' . $this->block_uid . '"><i class="td-icon-font td-icon-menu-right"></i></a>';

Thank you in advance guys !

1
Line 365 but you show us 356, okaaay. - u_mulder
thank you for your notice, I've updated it now - Aymen B

1 Answers

0
votes

It seems that in PHP 7.1, a Warning will be emitted if a non-numeric value is encountered. See this link

Here is the relevant portion that pertains to the Warning notice you are getting:

New E_WARNING and E_NOTICE errors have been introduced when invalid strings are coerced using operators expecting numbers or their assignment equivalents. An E_NOTICE is emitted when the string begins with a numeric value but contains trailing non-numeric characters, and an E_WARNING is emitted when the string does not contain a numeric value.

<?php    
$block_id = $this->block_uid;

elseif (is_numeric($block_id)) {
  $buffy .= '<a href="#"  class="td-ajax-next-page" id="next-page-' . $block_id . '" data-td_block_id="' . $block_id . '"><i class="td-icon-font td-icon-menu-right"></i></a>';
} else {
  // do some error handling...
}
?>