Notice: Trying to get property of non-object

(1/1) ErrorException

Notice: Trying to get property of non-object

in SecurityCouchFields.php line 116
at SecurityCouchFields->dataModerate(0)in SecurityCouchFields.php line 171
at SecurityCouchFields->getData(0)in single-forum.php line 34
at include('/var/www/tutmee-pro/data/www/pocket-couch/wp-content/themes/pocket-couch/single-forum.php')in template-loader.php line 74
at require_once('/var/www/tutmee-pro/data/www/pocket-couch/wp-includes/template-loader.php')in wp-blog-header.php line 19
at require('/var/www/tutmee-pro/data/www/pocket-couch/wp-blog-header.php')in index.php line 17
Notice: Trying to get property of non-object (500 Internal Server Error)

Symfony Exception

ErrorException

HTTP 500 Internal Server Error

Notice: Trying to get property of non-object

Exception

ErrorException

  1.     public function dataModerate$id )
  2.     {
  3.         $user get_userdata$id );
  4. //        $registerDate = get_user_meta($id, 'register', true);
  5. //        my_Die_print_r($user);
  6.         $registerDate $user->user_registered;
  7.         if ( !empty( $registerDate ) ) {
  8.             $diff date_diff( new \DateTime$registerDate ), new \DateTime() );
  9.             if ( $diff->) {
  10.                 $year_out self::year$diff->);
  11.             }
SecurityCouchFields->dataModerate(0) in src/Carbon/SecurityCouchFields.php (line 171)
  1.                 'education'    => carbon_get_user_meta$id'education' ),
  2.                 'profiles'     => carbon_get_user_meta$id'profiles' ),
  3.                 'experience'   => carbon_get_user_meta$id'experience' ),
  4.                 'couch_tags'   => carbon_get_user_meta$id'couch_tags' ),
  5.                 'last_login'   => get_user_meta$idUser::OPTION_LAST_LOGINtrue ),
  6.                 'registration' => $this->dataModerate$id ),
  7.                 'comments_id'  => (int)get_user_meta$id'comments_id' )[ ],
  8.             ]
  9.         );
  10.     }
SecurityCouchFields->getData(0) in single-forum.php/ (line 34)
  1.     $user = new WP_Userget_the_author_meta'ID' ) );
  2.     if ( $user->ID != ) {
  3.         $user->data $forum_container->getSecurityCouchFields::class )
  4.             ->getData$user->ID );
  5.     } else {
  6.         $user->data->avatar 0;
  7.         $user->data->first_name 'Admin';
  8.         $user->data->last_name '';
  9.         $user->data->rating 0;
include('/var/www/tutmee-pro/data/www/pocket-couch/wp-content/themes/pocket-couch/single-forum.php') in /var/www/tutmee-pro/data/www/pocket-couch/wp-includes/template-loader.php (line 74)
  1.      * @since 3.0.0
  2.      *
  3.      * @param string $template The path of the template to include.
  4.      */
  5.     if ( $template apply_filters'template_include'$template ) ) {
  6.         include( $template );
  7.     } elseif ( current_user_can'switch_themes' ) ) {
  8.         $theme wp_get_theme();
  9.         if ( $theme->errors() ) {
  10.             wp_die$theme->errors() );
  11.         }
require_once('/var/www/tutmee-pro/data/www/pocket-couch/wp-includes/template-loader.php') in /var/www/tutmee-pro/data/www/pocket-couch/wp-blog-header.php (line 19)
  1.     // Set up the WordPress query.
  2.     wp();
  3.     // Load the theme template.
  4.     require_once( ABSPATH WPINC '/template-loader.php' );
  5. }
require('/var/www/tutmee-pro/data/www/pocket-couch/wp-blog-header.php') in /var/www/tutmee-pro/data/www/pocket-couch/index.php (line 17)
  1.  * @var bool
  2.  */
  3. define('WP_USE_THEMES'true);
  4. /** Loads the WordPress Environment and Template */
  5. require( dirname__FILE__ ) . '/wp-blog-header.php' );

Logs

No log messages

Stack Trace

ErrorException

ErrorException:
Notice: Trying to get property of non-object

  at src/Carbon/SecurityCouchFields.php:116
  at Sau\WP\Theme\PocketCouch\Carbon\SecurityCouchFields->dataModerate(0)
     (src/Carbon/SecurityCouchFields.php:171)
  at Sau\WP\Theme\PocketCouch\Carbon\SecurityCouchFields->getData(0)
     (single-forum.php/:34)
  at include('/var/www/tutmee-pro/data/www/pocket-couch/wp-content/themes/pocket-couch/single-forum.php')
     (/var/www/tutmee-pro/data/www/pocket-couch/wp-includes/template-loader.php:74)
  at require_once('/var/www/tutmee-pro/data/www/pocket-couch/wp-includes/template-loader.php')
     (/var/www/tutmee-pro/data/www/pocket-couch/wp-blog-header.php:19)
  at require('/var/www/tutmee-pro/data/www/pocket-couch/wp-blog-header.php')
     (/var/www/tutmee-pro/data/www/pocket-couch/index.php:17)