0

After some update of WP my old theme broken in single-service.php Warning: Illegal string offset 'description', programm', 'duration' on lines 40, 44, 48 .../wp-content/themes/haircut/single-service.php

                       <!-- CONTENT -->
                        <section class="xx_content">

                            <?php if(have_posts()) : while(have_posts()) : the_post(); ?>
                            <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>

                                <div class="service_description desc">
                                    <h3>Курс "<?php the_title(); ?>"</h3>
                                    <?php if ($service_fields['description'] != '') {
                                        echo $service_fields['description'];
                                    } ?>
                                    <?php if ($service_fields['programm'] != '') { ?>
                                        <h5>Програма курсу</h5>
                                        <?php echo $service_fields['programm']; ?>
                                    <?php } ?>
                                    <?php if ($service_fields['duration'] != '') { ?>
                                        <h5>Тривалість</h5>
                                        <?php echo $service_fields['duration']; ?>
                                    <?php } ?>
                                </div>

                            </article>
                            <?php endwhile; endif; wp_reset_query();?>


                        </section>
                        <!-- /CONTENT -->
RiseFox
  • 11
  • 2
  • 2
    Does this answer your question? [Reference - What does this error mean in PHP?](https://stackoverflow.com/questions/12769982/reference-what-does-this-error-mean-in-php) – B001ᛦ Feb 11 '20 at 13:30
  • `$service_fields` is a string, not an array. – aynber Feb 11 '20 at 13:33

0 Answers0