This question already has an answer here:
- Illegal string offset Warning PHP 11 answers
I upgraded to PHP 5.4 today and I am receiving some strange warnings:
Warning: Illegal string offset 'quote1' in file.php on line 110 Warning: Illegal string offset 'quote1_title' in file.php on line 111 Those lines are this part of the code:
for($i = 0; $i So the $tmp_url and $tmp_title line.
Why am I receiving this odd warning and what is the solution?
Update:
This code is being used as a Wordpress plugin. $meta includes:
$meta = get_post_meta($post->ID,'_quote_source',TRUE); So I am suspecting that whenever the quotes fields are empty, this warning appears. Is there any way that I can fix this for when the fields are empty?