Saturday, January 7, 2023
HomeWordPress DevelopmentError with PHP 8 - WordPress Growth Stack Change

Error with PHP 8 – WordPress Growth Stack Change


Hello i take advantage of a widget with php code

on php7.4 all the pieces okay

with php 8 i’ve an error….

Warning: Undefined variable $put up in /xxxxxxx/wp-content/plugins/php-code-widget/execphp.php(27) : eval()’d code on line 2

Warning: Try to learn property “ID” on null in /xxxxxxx/wp-content/plugins/php-code-widget/execphp.php(27) : eval()’d code on line 2

Warning: Undefined variable $put up in /xxxxxxx/wp-content/plugins/php-code-widget/execphp.php(27) : eval()’d code on line 3

Warning: Try to learn property “ID” on null in /xxxxxxx/wp-content/plugins/php-code-widget/execphp.php(27) : eval()’d code on line 3

My code:

<?php
if (get_the_terms($post->ID, 'ausstattung')) {
  $taxonomy_ar = get_the_terms($post->ID, 'ausstattung');
echo "";
  $output="<ul>";
  foreach ($taxonomy_ar as $taxonomy_term) {
    $output .= '<li>'. $taxonomy_term->identify .'</li>';
  }
  $output .= '</ul>';

  echo $output;
}
?>

What’s incorrect?

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments