A fix for PHP 5.4 warnings empty value
-
When saving a Timeline entry I got multiple: Warning: Creating default object from empty value in… etcetera, on a blank page. This was with a new install (v. 1.1.1) on a server new to me. After googling on the issue I managed to fix it in wp-veriteco-timeline.php. Find:
if ($thumbnail_image && isset($thumbnail_image)) { $this->asset->media = $img[0]; $this->asset->caption = $thumbnail_image->post_excerpt; }
Replace this with:
if ($thumbnail_image && isset($thumbnail_image)) { if (!is_object($this->asset)) { $this->asset = new stdClass; } $this->asset->media = $img[0]; $this->asset->caption = $thumbnail_image->post_excerpt; }
I suppose you have to do the same with the next lines for video. And maybe more, but I have to find that out yet.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘A fix for PHP 5.4 warnings empty value’ is closed to new replies.