WordPress.org

Forums

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

  1. Brandon Moner
    Member
    Posted 2 years 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 2 years 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. Mei Gwilym
    Member
    Posted 1 year 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

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • NextGEN Gallery
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic