Error When Using do_shortcode
-
Hi Everyone,
Very cool plug-in. It works just fine when pasting the shortcode into post content. But when trying to call do_shortcode() from within PHP code in the theme, I get the following error message:
Notice: Undefined index: dae_settings in /(full path redacted)/wp-content/plugins/download-after-email/includes/shortcodes.php on line 334.Line 334 contains the following code:
$dae_settings = $GLOBALS['dae_settings'][ $download_id ];
So it looks like that global variable does not get initialized prior to usage in this case. In addition to the error message, an incomplete version of the form is displayed, which makes sense, looking at the plugin code surrounding the line where the error was reported. Only the title and primary content text are filled in. Everything else is empty HTML elements.
Please let me know if this is something that I can work around or if it requires an update to the plugin.
Thanks!
- The topic ‘Error When Using do_shortcode’ is closed to new replies.