Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal Error: Uncaught Error: Call to a member function setting() #15

Open
cogdog opened this issue Jan 17, 2019 · 1 comment
Open

Fatal Error: Uncaught Error: Call to a member function setting() #15

cogdog opened this issue Jan 17, 2019 · 1 comment

Comments

@cogdog
Copy link
Contributor

cogdog commented Jan 17, 2019

My logs are full of these, having to disable plugin as its crushing the server...

[15-Jan-2019 10:58:43 UTC] PHP Fatal error:  Uncaught Error: Call to a member function setting() on null in /home/cogdog/public_html/arganee/wp-content/plugins/FWP---SIC--Em-master/SicEm.php:342
Stack trace:
#0 /home/cogdog/public_html/arganee/wp-includes/class-wp-hook.php(286): SicEm->the_content('<p>***<em><a hr...')
#1 /home/cogdog/public_html/arganee/wp-includes/plugin.php(203): WP_Hook->apply_filters('<p>***<em><a hr...', Array)
#2 /home/cogdog/public_html/arganee/wp-includes/feed.php(190): apply_filters('the_content', '<p>***<em><a hr...')
#3 /home/cogdog/public_html/arganee/wp-includes/feed-rss2.php(101): get_the_content_feed('rss2')
#4 /home/cogdog/public_html/arganee/wp-includes/template.php(688): require_once('/home/cogdog/pu...')
#5 /home/cogdog/public_html/arganee/wp-includes/functions.php(1287): load_template('/home/cogdog/pu...')
#6 /home/cogdog/public_html/arganee/wp-includes/class-wp-hook.php(288): do_feed_rss2(false)
#7 /home/cogdog/public_html/arganee/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters('', Array)
#8 /home/cogdog in /home/cogdog/public_html/arganee/wp-content/plugins/FWP---SIC--Em-master/SicEm.php on line 342


@cogdog
Copy link
Contributor Author

cogdog commented Jan 18, 2019

For what it's worth, I put a conditional around line 342 that seems to have cleared the error.

if (function_exists('is_syndicated')) :
	if (is_syndicated()) :				
		$source = get_syndication_feed_object($post->ID);

		// added check for return object
		if ( is_object($source) ) :

			//do stuff here
			
		endif;
	endif;
endif;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant