Support » Plugins and Hacks » [Resolved] [Plugin: Easy FancyBox] WP_DEBUG – Options need defining

[Resolved] [Plugin: Easy FancyBox] WP_DEBUG – Options need defining

  • Dear RavanH,

    I’m currently experiencing the WSoD (White Screen of Death) on one of my WP installs and I’m trying to reduce the number of issues that could cause it. I am running a large number of plugins and yours happens to be one of them.

    I’m running my local WP install in

    define('WP_DEBUG', true);

    mode, this can be added to wp-config.php and I’m turning on 1 plugin at a time. I found the following issue/s;

    * A number of options have not been defined.

    Notice: Undefined index: enable in D:\websites\site.local\wp-content\plugins\easy-fancybox\easy-fancybox.php on line 46

    I have done a small quick messy hack to resolve the issue locally for me, but there may well be a better way as you will know your plugin much better than me.

    I used the follow to remove 1 of a number of “undefined” errors

    // check for any enabled sections
    	$do_fancybox = false;
    	foreach ($easy_fancybox_array as $value) {
    		if (isset($value['options']['enable']['id'],$value['options']['enable']['default']))
    			if ( '1' == get_option($value['options']['enable']['id'],$value['options']['enable']['default']) ) {
    				$do_fancybox = true;

    If you could please check your plugin with WP_DEBUG mode on resolve any messages that come up for the next release, this would be amazing.

    Thank you for your time and creating a great plugin.


Viewing 3 replies - 1 through 3 (of 3 total)
  • Sorry, another issue, in the Dashboard,

    The following took away all the warnings, but same issue of options not being defined.

    foreach ($easy_fancybox_array as $key => $value) {
    		add_settings_field( 'fancybox_'.$key, $value['title'], 'easy_fancybox_settings_fields', 'media', 'fancybox_section', $value);
    		if ($value['input']=='multiple')
    			foreach ($value['options'] as $_value) {
    				if (isset($_value['id']))
    				if ($_value['id']) register_setting( 'media', $_value['id'] );
    			if ($value['id']) register_setting( 'media', 'fancybox_'.$key );

    Thank you,

    Plugin Author RavanH


    Hi Jandal, thanks for the tips… Funny how I had just ran WP with WP_DEBUG to sort out some issues on a server with PHP 5.3.5 and saw the same and some other issues (the others where warnings on functions that are deprecated in 5.3.5) so I took the opportunity to weed them out.

    So it should be solved in the next release but if you do see some more after the upgrade, please let me know. Your input is much appreciated 🙂


    Thank you very much.

    WP_DEBUG is a handy tip for developers that I only learned about yesterday while trouble shooting.

    Last night I also updated one of my own plugins as I realized there were probably some old hooks in there.

    Good Times!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] [Plugin: Easy FancyBox] WP_DEBUG – Options need defining’ is closed to new replies.