WordPress.org

Ready to get started?Download WordPress

Forums

NextGEN Gallery
ERROR Warning Creating default object when adding gallery??? (3 posts)

  1. ctvonline
    Member
    Posted 11 months ago #

    I'm not sure what happened, but I'm getting ALL KINDS of erros when trying to add a gallery to a page.

    I know that it happened after I used a Revision Cleaner plugin to clean out all of the revisions and versions of pages that were on the site.

    These keep popping up:

    Warning: Creating default object from empty value in /*/rop_live/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/attach_to_post/mixin.attach_to_post_display_tab.php on line 223
    
    Warning: Creating default object from empty value in /*/rop_live/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/attach_to_post/mixin.attach_to_post_display_tab.php on line 223
    
    Warning: Creating default object from empty value in /*/rop_live/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/attach_to_post/mixin.attach_to_post_display_tab.php on line 223
    
    Warning: Creating default object from empty value in /*/rop_live/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/attach_to_post/mixin.attach_to_post_display_tab.php on line 223
    
    Warning: Creating default object from empty value in /*/rop_live/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/attach_to_post/mixin.attach_to_post_display_tab.php on line 223
    
    Warning: Creating default object from empty value in /*/rop_live/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/attach_to_post/mixin.attach_to_post_display_tab.php on line 223
    
    Warning: Creating default object from empty value in /*/rop_live/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/attach_to_post/mixin.attach_to_post_display_tab.php on line 223

    http://wordpress.org/plugins/nextgen-gallery/

  2. Frank Hagan
    Member
    Posted 11 months ago #

    Your web host probably upgraded to PHP 5.4. My understanding is that this error message really doesn't DO anything other than annoy you, so its safe to turn off the display of it.

    In wp-config.php, put this line:

    ini_set( 'display_errors', 0 );

    I put it near the top, under:

    * @package WordPress
    */

  3. meigwil
    Member
    Posted 5 months ago #

    Turning off display errors only hides the problem.

    To fix, add this code on line 235 of file nextgen-gallery/products/photocrati_nextgen/modules/attach_to_post/mixin.attach_to_post_display_tab.php (for version 2.0.40).

    if(is_null($model)) $model = new \stdClass();

    which should be before $model->settings = $settings;.

    Mei

Reply

You must log in to post.

About this Plugin

About this Topic