Home>

Move to wordpress and go to wp-config.php to investigate the cause define ('WP_DEBUG&apos ;, true);
I put in and examined.

of the following code

<? php if (empty (SCF :: get ('top-mv'))):?>
Was an error.

The error was like this.
Fatal error: Can't use function return value in write context in /home/sites/heteml/users/k/k/a/ssample/web/sample.biz/sample-low/wp-content/themes/sample/index .php on line 232

If i delete it, it worked.
I want to know why the error occurred.

Thank you.

&lt;section&gt;
      &lt;a&gt;&lt;/a&gt;
      &lt;div&gt;
                &lt;div data-wow-duration = "2s" data-wow-offset = "100"&gt;
                    &lt;figure&gt;
                        &lt;img src = "&lt;? php echo get_template_directory_uri ();?&gt;/img/img_bg_h1.png" alt = ""&gt;
                        &lt;figcaption&gt;Job Introduction&lt;/figcaption&gt;
                    &lt;/figure&gt;
                &lt;/div&gt;
          &lt;div data-wow-duration = "2s" data-wow-offset = "100"&gt;
                    &lt;div&gt;
                    &lt;? php query_posts ('posts_per_page = 2');?&gt;
                        &lt;? php
                        if (have_posts ()):
                            while (have_posts ()): the_post ();
                        ?&gt;
                        &lt;div&gt;
                            &lt;a href = "&lt;? php the_permalink ();?&gt;"&gt;
                            &lt;? php if (empty (SCF :: get ('top-mv'))):?&gt;
                                &lt;figure&gt;&lt;img src = "&lt;? php echo get_template_directory_uri ();?&gt;/img/no-image.png" alt = ""&gt;&lt;/figure&gt;
                            &lt;? php else:?&gt;
                                &lt;figure&gt;&lt;? php echo wp_get_attachment_image (SCF :: get ('list-img'), 'full');?&gt;&lt;/figure&gt;
                            &lt;? php endif;?&gt;
                                &lt;dl&gt;
                                    &lt;dt&gt;Recruitment:&lt;/dt&gt;
                                    &lt;dd&gt;&lt;? php echo SCF :: get ('list-ttl');?&gt;&lt;/dd&gt;
                                &lt;/dl&gt;
                                &lt;div&gt;&lt;? php echo preg_replace ("/ (&lt;[a-zA-Z0-9 = \" \/\] +&gt;)&lt;br \ \ /&gt;/"," $1 ", nl2br (SCF :: get ('list-read')));?&gt;&lt;/div&gt;
                            &lt;/a&gt;
                        &lt;/div&gt;
                    &lt;? php
                        endwhile;
                    endif;
                    ?&gt;
                &lt;/div&gt;
                    &lt;div&gt;
                        &lt;a href = "&lt;? php echo home_url ();?&gt;/joblist /"&gt;Job Introduction&lt;/a&gt;
                    &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
    &lt;/section&gt;
  • Answer # 1

    I think the PHP version is old.

    [How to deal with Fatal error: Can't use method return value in write context in ... in PHP | gotohayato]
    https://gotohayato.com/content/88

    [Causes and countermeasures for PHP error "Fatal error: Can't use method return value in write context" | cms helog-Open source such as WordPress, CakePHP and PEAR based on PHP for the purpose of CMS construction Explaining]
    That's a bad setting around the plug-in.