Trying to get property ‘ID’ of non-object in …/social_sharing.php on line 52
-
I get the following PHP notice when accessing a non existing page, e.g.
https://…/notexistsPHP Notice: Trying to get property ‘ID’ of non-object in …/wp-content/plugins/super-socializer/inc/social_sharing.php on line 52
Disabled all other plugins, sweeped database, removed functions.php, saved all socializer setting screens.
Modified social_sharing.php with the following
if ( ! function_exists('write_log')) { function write_log ( $log ) { if ( is_array( $log ) || is_object( $log ) ) { error_log( print_r( $log, true ) ); } else { error_log( $log ); } } } function the_champ_prepare_sharing_html( $postUrl, $sharingType = 'horizontal', $displayCount, $totalShares, $shareCountTransientId, $standardWidget = false ) { global $post, $theChampSharingOptions; write_log( $post ); if ( NULL === $post ) { write_log( $shareCountTransientId ); $post = get_post( $shareCountTransientId ); } write_log( $post );
<NULL>
0
<NULL>
PHP Notice: Trying to get property ‘ID’ of non-object in …/wp-content/plugins/super-socializer/inc/social_sharing.php on line 68What could be the issue?
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘Trying to get property ‘ID’ of non-object in …/social_sharing.php on line 52’ is closed to new replies.