Search code examples
phpwordpressinternal-server-error

PHP Warning - Internal Error


I'm working on a website for WordPress and whenever the theme I bought is activated I keep getting an Internal Server Error when i want to add or edit post. Upon activatinh my error log. I get this notification.


PHP Warning:  Illegal string offset 'gallery_src' in G:\PleskVhosts\latinaandthecity.tv\httpdocs\wp-content\themes\breeze\inc\meta-box.php on line 150

PHP Warning:  Illegal string offset 'gallery_id' in *file* on line 151

PHP Warning:  Illegal string offset 'gallery_src' in *file* on line 152

When looking at the file, this is what the script is for those lines.

    <input type="hidden" name="bluth_custom_thumbnail[gallery_src]" class="source" value="<?php echo $custom_thumbnail['gallery_src']; ?>" />
    <input type="hidden" name="bluth_custom_thumbnail[gallery_id]" class="image_id" value="<?php echo $custom_thumbnail['gallery_id']; ?>" />
    <a class="blu_add_image" href="#" style="height:auto; min-height: 100px;"> <img class="blu_gallery" data-placeholder="<?php echo $fallback_image; ?>" src="<?php echo $custom_thumbnail['gallery_src']; ?>"> </a>

I'm not sure what is wrong here. Please advise?


Solution

  • The $custom_thumbnail variable is set to string and not a associative array. Strings allow only numeric offsets.