We're merging with GenerateBlocks! Learn more here.

[Support request] PHP 7.4

Please login to receive premium support.

Support for the free plugin can be found here.

Home Forums Pro Support PHP 7.4

  • This topic has 3 replies, 2 voices, and was last updated 3 years ago by Tom.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #19412

    Is the plugin ready for use with PHP 7.4? On some posts, I get this error where the image should go:

    <img src="<br />
    <b>Notice</b>:  Trying to access array offset on value of type bool in <b>path/wp-content/plugins/wp-show-posts/inc/image-resizer.php</b> on line <b>121</b><br />
    <br />
    <b>Notice</b>:  Trying to access array offset on value of type bool in <b>path/wp-content/plugins/wp-show-posts/inc/image-resizer.php</b> on line <b>122</b><br />
    https://mysite.com/wp-content/uploads/2020/08/yukon-menu.jpg" />

    Its only on some posts and not on others – I haven’t figured out why. But it doesn’t happen on one server and does on another, and I’m pretty sure the difference is that the one with the error is running PHP 7.4 while the other is not.


    Hi there,

    Yes, it should be fully compatible with 7.4.

    That sounds like an issue with the image resizer. What do you have set as the width/height settings in the list on those posts?


    Both the width and height are set to 840.

    This may have helped me track the issue down a bit further. It seems that the issue is only happening for posts whose image is exactly that size. If I change that width and height to almost any other value, the issue goes away. Its only when its set to 840 or 839 px that I’ve found the issue is there.

    I’m not sure if that helps clarify a reason / solution on your end.


    Hmm, I’m not sure what could be causing that.

    We’re deprecating the current image size features in 1.2.0: https://wpshowposts.com/wp-show-posts-1-2-0/

    Instead, you should create an image size using this method: https://docs.generatepress.com/article/adding-image-sizes/

    Then if you use 1.2.0-alpha.1, you can choose the image size (if you remove the fixed values and save).

    This is better for performance and uses core WP functionality 🙂

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.