Im testing with Aggregator got this.
Notice: Trying to get property of non-object in _aggregator_category_title() (line 217 of core/modules/aggregator/aggregator.module).
Drupal8.0-alpha4
Senario:
URL:http://example.com/aggregator/categories/1
1. Module aggregator enabled.
2. In aggregator, created catagory CAT1, CAT2, CAT3.
3. Imported some RSS, and assigned to some CAT1, CAT2, CAT3.
4. In the front page, click CAT1, CAT2 or CAT3. I got the following unexpected notes.
Notice: Trying to get property of non-object in _aggregator_category_title() (line 217 of core/modules/aggregator/aggregator.module).
5. the function code is below.
/**
208 * Title callback: Returns a title for aggregator category pages.
209 *
210 * @param $category
211 * An aggregator category.
212 *
213 * @return
214 * A string with the aggregator category title.
215 */
216 function _aggregator_category_title($category) {
217 return $category->title;
218 }
MAY it works OK to update with following?
function _aggregator_category_title($category) {
if( isset($category) ){
return $category->title;
}else{
return "no tittle";
}
}
Comment | File | Size | Author |
---|---|---|---|
11-3-2013 2-41-48 AM.jpg | 43.39 KB | jackethu |
Comments
Comment #1
marcingy CreditAttribution: marcingy commentedCan't recreate on latest dev version
Comment #3
cilefen CreditAttribution: cilefen commented