0

I am getting an warning message in my Wordpress :

"Creating default object from empty value in /home/forthemde/public_html/wp-content/themes/mayadeep/admin/admin.php on line 225"

Here the code on admin.php and:

 function upfw_setup_theme_options(){
     $up_options_db = get_option('up_themes_'.UPTHEMES_SHORT_NAME);
     global $up_options;
     //Check if options are stored properly
     if( isset($up_options_db) && is_array($up_options_db) ):
         //Check array to an object
         foreach ($up_options_db as $k => $v) {
                 $up_options -> {$k} = $v;
         }
     else:
         do_action('upfw_theme_activation');
     endif;
 }
 add_action('upfw_theme_init','upfw_setup_theme_options',10);
 add_action('upfw_admin_init','upfw_setup_theme_options',100);

Line 225 is here:

 $up_options -> {$k} = $v;

I try to fix by myself, but no result. Please help me, really appreciate for any help.

Regards.

Jothi Kannan
  • 3,320
  • 6
  • 40
  • 77

1 Answers1

1

I had this problem too, recently, but this worked for me:

Just added $up_options = new stdClass(); after global $up_options;

Best regards, http://shubhinfotech.com http://c-worx.com

عثمان غني
  • 2,786
  • 4
  • 52
  • 79