Illegal string offset

I’m having an issue with a wordpress plugin called “Ajax events Calendar”

http://foxinfocus.ca/

On the right side bar I have the short code for the event list which used to lead to an interactive calendar.

Now as you will see this is what I get instead:

Warning: Illegal string offset ‘video_embed’ in /home3/believe/public_html/wp-content/themes/wp-davinci-prem/page.php on line 42

I’ve opened the file but i’m not sure if i can alter it to fix this problem or not. The file looks like this:

<?php $data = get_post_meta( $post->ID, 'Solostream', true );
						if ($data['video_embed']) { ?>
							<div class="single-video">
							<?php $embed = $data['video_embed'];
							if ( $data['layout'] && $data['layout'] !== 'Default' ) { 
								$layout = $data['layout']; 
							} else { 
								$layout = get_option('solostream_layout'); 
							}

I’ve tried opening wp-config.php for debug mode, however it was already on false…

I am no expert and I would really like to keep the events calendar the way it was.

Any help is very appreciated.

THANK YOU!

Basically…

[php]$data[‘video_embed’][/php]

Doesn’t exists - It’s not populated and it tosses that error.

Which means the function get_post_meta is not populating that element of the array.

[php] $data = get_post_meta( $post->ID, ‘Solostream’, true )
[/php]

Since that’s a build in word press function, which means it’s not finding any video meta information on your page.

I think you can delete that entire IF block in the partial code you posted and the error will disappear.

Sponsor our Newsletter | Privacy Policy | Terms of Service