Bug #1968

PHP warning after saving Preferences

Added by Nathan Malcolm over 2 years ago. Updated over 1 year ago.

Status:ClosedStart date:03/10/2012
Priority:NormalDue date:
Assignee:Stefan T.% Done:

0%

Category:Admin Control Panel
Target version:1.6.10
Reproducibility:Always Database Type:
Reported In MyBB Version:1.6.6 Database Version:
PHP Version:5.4.0 SQA assignments:Jitendra Maharaj
Browser:

Description

After saving your Preferences in the Admin CP you are greeted by a PHP warning.

Warning [2] Creating default object from empty value - Line: 349 - File: admin/index.php PHP 5.4.0 (Linux)

History

#1 Updated by Nathan Malcolm over 2 years ago

  • Subject changed from PHP warning after saving Personal Notes to PHP warning after saving Preferences
  • Description updated (diff)

Updated the description and title as this is actually caused by the cp style, and not the personal notes.

#2 Updated by Chris Köcher about 2 years ago

Because I've got this warning after PHP update, too, I've looked for a fix. After some thoughts, I've found the cause: In line 349 $page->style will be set to a value, but the $page-object will be created in line 386. Because $page->style will be set in line 387 to the same value, we can delete it from line 349. So here is the ne line 349:

        $cp_style = $admin_options['cpstyle'];

Would be nice, to see this little change in MyBB 1.6.8, too. ;-)

#3 Updated by Tom Moore about 2 years ago

Will probably be 1.6.9.

#4 Updated by Tom Moore about 2 years ago

  • Target version set to 1.6.9

#5 Updated by Stefan T. almost 2 years ago

  • Status changed from New to Assigned
  • Assignee set to Stefan T.

#6 Updated by Stefan T. almost 2 years ago

  • Status changed from Assigned to Resolved

Fixed in 1.6 (4a17101bdb) and 1.8 (e14e14ca91).

#7 Updated by Jitendra Maharaj almost 2 years ago

  • SQA assignments set to Jitendra Maharaj

#8 Updated by Jitendra Maharaj almost 2 years ago

  • Status changed from Resolved to Closed

No side effects noted till in page

#9 Updated by Stefan T. over 1 year ago

  • Target version changed from 1.6.9 to 1.6.10

Also available in: Atom PDF