• Resolved abuzon

    (@abuzon)


    Just installed the regular BB parent theme on a new site and got the following PHP errors upon Theme install…???

    Warning: Illegal string offset 'sizes' in //public_html/dev/wp-content/plugins/sg-cachepress/core/Images_Optimizer/Images_Optimizer_Webp.php on line 441
    
    Warning: Invalid argument supplied for foreach() in //public_html/dev/wp-content/plugins/sg-cachepress/core/Images_Optimizer/Images_Optimizer_Webp.php on line 441
    
    Warning: implode(): Invalid arguments passed in /public_html/dev/wp-content/plugins/sg-cachepress/core/Images_Optimizer/Images_Optimizer_Webp.php on line 445
    
    Warning: Illegal string offset 'sizes' in /public_html/dev/wp-content/plugins/sg-cachepress/core/Images_Optimizer/Images_Optimizer_Webp.php on line 441
    
    Warning: Invalid argument supplied for foreach() in /public_html/dev/wp-content/plugins/sg-cachepress/core/Images_Optimizer/Images_Optimizer_Webp.php on line 441
    
    Warning: implode(): Invalid arguments passed in /public_html/dev/wp-content/plugins/sg-cachepress/core/Images_Optimizer/Images_Optimizer_Webp.php on line 445
Viewing 9 replies - 1 through 9 (of 9 total)
  • Hi @abuzon

    I’ve got the same messages.

    I thing that SG Optimizer is trying to optimize everything is uploaded to Media, including ZIP, PDF or DOC files.

    Images Optimizer should only optimize IMAGES.

    Simply execute a filter by file extension before optimizing to avoid this errors.

    Thanks.

    Plugin Author Stanimir Stoyanov

    (@sstoqnov)

    SiteGround Representative

    Hi,

    It seems your theme or the image you are trying to delete doesn’t have image sizes.

    We will fix the issue in the next version.

    Regards,
    Stanimir

    Hi @sstoqnov,

    Obviously, we are trying to upload a Theme or a Plugin not an image.
    ZIP files would never have image sizes.

    Simple check filetype before applying optimization.

    Thanks

    Plugin Author Hristo Pandjarov

    (@hristo-sg)

    SiteGround Representative

    @jairoochoa the issue has nothing to do with what you’re suggesting. Themes do not reside in the upload folder, neither do plugins. The issue is as mentioned by Stanimir with missing image sizes and will be patched in the next minor update.

    @hristo-sg I’m not sure why, I just know when the bug occurs. And it happens when uploading a new Theme or Plugin.

    It seems your theme or the image you are trying to delete doesn’t have image sizes.

    I do not try to delete anything, I’m just uploading a new Theme.

    Plugin Author Hristo Pandjarov

    (@hristo-sg)

    SiteGround Representative

    Well, please open a new thread and provide us with an URL to check out and instructions on how to recreate it on our end and we will do our best to assist you further.

    Hi @hristo-sg

    As @abuzon said when she started the topic, she was installing a Theme.
    Same happened to me. I added a new Theme in one site.

    Please notice that it only happens when uploading a Theme or Plugin. If the Theme is got from WordPress repository the are no warning message.
    Also, there is no error if the file is uploaded to Media.
    Just when uploading and installing new Theme or Plugin.

    SG Optimizer 5.4.1 + WP 5.3.2 + PHP 7.1 (Managed PHP service)

    Thanks

    Plugin Author Stanimir Stoyanov

    (@sstoqnov)

    SiteGround Representative

    We’ve fixed the issue in version 5.4.2

    Great @sstoqnov

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘PHP errors upon new theme install’ is closed to new replies.