• Second site in the last two weeks is getting an HTTP Error when trying to upload simple jpg and png images.

    I saw something in the error_log that looks like a possible cause:
    [25-Dec-2016 23:53:04 UTC] PHP Warning: Illegal string offset ‘width’ in /home1/yiccaudi/public_html/yicc/wp-content/themes/yicc/image.php on line 30
    [25-Dec-2016 23:53:04 UTC] PHP Warning: Illegal string offset ‘height’ in /home1/yiccaudi/public_html/yicc/wp-content/themes/yicc/image.php on line 31

    Lines 30 & 31 in the image.php file read:
    $metadata[‘width’],
    $metadata[‘height’],

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    I think I’ve seen this before. If it’s the same thing, it’s because your theme is not robustly coded in a way that accounts for different size parameter types. It is setup to handle height and width pixel dimensions, but not the WP default size labels like “thumbnail”, “medium”, “large”, etc.

    You could either modify the theme code to accommodate the different types or seek resolution from the theme author.

Viewing 1 replies (of 1 total)
  • The topic ‘Image Upload HTTP Error’ is closed to new replies.