Sunday, 15 September 2013

How to fix 'Creating default object from empty value' warning in PHP -



How to fix 'Creating default object from empty value' warning in PHP -

this question has reply here:

creating default object empty value in php? 9 answers

i next error joomla install have.

warning: creating default object empty value in /modules/mod_continuous_rss_scrolling/helper.php on line 54

how prepare error?

as turns out, author missed simple prepare , general practice should initialize object before seek set property. simple prepare add together new stdclass; phone call right before error variable trying access.

$items[$i] = new stdclass; $items[$i]->title = $crs_post_title;

that first line prepare warning showing up.

this prepare problem in /components/com_community/models/activities.php on line 387 next fix.

$commentsresult[$comment->type . '-' . $comment->contentid] = new stdclass; $commentsresult[$comment->type . '-' . $comment->contentid]->_comment_count = 0;

php object warnings

No comments:

Post a Comment