Title: Throwing php warning
Last modified: December 21, 2020

---

# Throwing php warning

 *  Resolved [Brian Brown, Ph.D.](https://wordpress.org/support/users/brianbrown/)
 * (@brianbrown)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/throwing-error-2/)
 * Hi Paul!
    Its me, Brian the Pest again! I noticed that a php warning is being
   thrown as follows: `Notice: Trying to get property 'post_content' of non-object
   in /path/to/wp-content/plugins/pj-news-ticker/pj-news-ticker.php on line 200`
   On a single category page. Plugin version 1.9 WP 4.7 Php 7.13 Memory 8196 Just
   FYI! Just trying to help! Thanks as always! [@brianbrown](https://wordpress.org/support/users/brianbrown/)
    -  This topic was modified 5 years, 6 months ago by [Brian Brown, Ph.D.](https://wordpress.org/support/users/brianbrown/).

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Plugin Author [Primitiv Media](https://wordpress.org/support/users/nicolasmontigny/)
 * (@nicolasmontigny)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/throwing-error-2/#post-13819928)
 * Hi Brian,
 * I’m not sure how to reproduce this error. Would you be able to provide us with
   more details in order for us to address this issue?
 * Cheers and happy holidays
 *  Plugin Author [Primitiv Media](https://wordpress.org/support/users/nicolasmontigny/)
 * (@nicolasmontigny)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/throwing-error-2/#post-13845775)
 * Hi Brian, I haven’t heard back from you yet. I will wait another week before 
   closing this topic.
 * Cheers and stay safe
 *  Thread Starter [Brian Brown, Ph.D.](https://wordpress.org/support/users/brianbrown/)
 * (@brianbrown)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/throwing-error-2/#post-13849183)
 * Hi Pail!
    This occurs (I replicated it on a fresh install) when there are no 
   posts in the chosen category. Its not a big issue, just a warning that I thought
   I would bring to your attention (and only shows when the debugger is on). Having
   said that, the ‘There are no matching posts to display’ is correctly output, 
   however. So the logic is correctly identifying that there are no posts. Best 
   for the New Year! -Brian
 *  Plugin Author [Primitiv Media](https://wordpress.org/support/users/nicolasmontigny/)
 * (@nicolasmontigny)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/throwing-error-2/#post-13869487)
 * Hi Brian,
 * We have just pushed an update to fix this problem. Thank you for your help!
 * Happy new year 🙂
 * Cheers and stay safe
 *  Thread Starter [Brian Brown, Ph.D.](https://wordpress.org/support/users/brianbrown/)
 * (@brianbrown)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/throwing-error-2/#post-13905204)
 * Hi Paul!
    I’m still seeing this warning on ver. 1.9.2 on an existing install (
   with >78,000 posts). Thanks! -B
    -  This reply was modified 5 years, 5 months ago by [Brian Brown, Ph.D.](https://wordpress.org/support/users/brianbrown/).
 *  Plugin Author [Primitiv Media](https://wordpress.org/support/users/nicolasmontigny/)
 * (@nicolasmontigny)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/throwing-error-2/#post-13916711)
 * Hi Brian,
 * To confirm this happens when you use the shortcode on the page and manually set
   post_cat to an empty category?
 * Regards,
    Primitiv Media
 *  Thread Starter [Brian Brown, Ph.D.](https://wordpress.org/support/users/brianbrown/)
 * (@brianbrown)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/throwing-error-2/#post-13917055)
 * I am calling it like this:
 *     ```
       <div class="headline"><?php
       		if (defined('PJNT_VERSION')) {
       			$pjshortcode = '[pj-news-ticker show_label="false" label_bg_colour="transparent" ticker_bg_colour="transparent" speed="120"  gap="false" custom_separator="&hellip;&nbsp;" target="_self"';
       if(isset($taxonomy->slug)){echo do_shortcode( $pjshortcode.'post_cat="'.$taxonomy->slug.'"]');}
       			else {echo do_shortcode( $pjshortcode.'show_label="false" ]' );}}
       		else {echo 'WELCOME';}
       ?></div>
       ```
   
 * So, perhaps I will test for an empty taxonomy slug, but, by default, WordPress
   ALWAYS has at least one category, so this should not be necessary.
    It seems 
   to be okay now, so maybe I was looking at a cached page (I don’t know how, since
   the cache gets cleared upon any update). I guess we can mark this as resolved
   for now. Thanks! -Brian
    -  This reply was modified 5 years, 5 months ago by [Brian Brown, Ph.D.](https://wordpress.org/support/users/brianbrown/).

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Throwing php warning’ is closed to new replies.

 * ![](https://ps.w.org/pj-news-ticker/assets/icon-128x128.png?rev=1573723)
 * [PJ News Ticker](https://wordpress.org/plugins/pj-news-ticker/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/pj-news-ticker/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/pj-news-ticker/)
 * [Active Topics](https://wordpress.org/support/plugin/pj-news-ticker/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/pj-news-ticker/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/pj-news-ticker/reviews/)

 * 7 replies
 * 2 participants
 * Last reply from: [Brian Brown, Ph.D.](https://wordpress.org/support/users/brianbrown/)
 * Last activity: [5 years, 5 months ago](https://wordpress.org/support/topic/throwing-error-2/#post-13917055)
 * Status: resolved