Title: Fatal error when parsing Shortcode
Last modified: March 7, 2023

---

# Fatal error when parsing Shortcode

 *  [Christian Wach](https://wordpress.org/support/users/needle/)
 * (@needle)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/fatal-error-when-parsing-shortcode/)
 * FYI when the Shortcode is parsed directly via `do_shortcode()` your plugin throws
   the following error:
 *     ```wp-block-code
       PHP Fatal error:  Uncaught Error: Call to a member function display() on null in /path/to/httpdocs/wp-content/plugins/yotuwp-easy-youtube-embed/yotuwp.php:500
       ```
   
 * The solution is to add the following lines just before line 500:
 *     ```wp-block-code
       if ( empty( $this->views ) ) {
       	$this->views = new YotuViews();
       }
       ```
   
 * Nice plugin otherwise 🙂

The topic ‘Fatal error when parsing Shortcode’ is closed to new replies.

 * ![](https://ps.w.org/yotuwp-easy-youtube-embed/assets/icon-256x256.png?rev=2869253)
 * [Video Gallery - YouTube Playlist, Channel Gallery by YotuWP](https://wordpress.org/plugins/yotuwp-easy-youtube-embed/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/yotuwp-easy-youtube-embed/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/yotuwp-easy-youtube-embed/)
 * [Active Topics](https://wordpress.org/support/plugin/yotuwp-easy-youtube-embed/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/yotuwp-easy-youtube-embed/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/yotuwp-easy-youtube-embed/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [Christian Wach](https://wordpress.org/support/users/needle/)
 * Last activity: [3 years, 3 months ago](https://wordpress.org/support/topic/fatal-error-when-parsing-shortcode/)
 * Status: not resolved