0

This is all new for me. My wordpress website is throwing this error...

[25-Jun-2015 11:28:24 UTC] PHP Warning: Creating default object from empty value in /.../public_html/chrismarsh.us/wp-content/themes/StandardTheme_272/admin/functions.php on line 229

And unwanted ads started showing up everywhere. So I tried to log into my admin panel to see if it was a plugin problem and it throws this error...

[25-Jun-2015 13:53:42 UTC] PHP Warning: Creating default object from empty value in /.../public_html/chrismarsh.us/wp-content/themes/StandardTheme_272/admin/functions.php on line 229

[25-Jun-2015 13:53:42 UTC] PHP Warning: Cannot modify header information - headers already sent by (output started at /.../public_html/chrismarsh.us/wp-content/themes/StandardTheme_272/admin/functions.php:229) in /.../public_html/chrismarsh.us/wp-includes/pluggable.php on line 1178

Can anyone help me out? The website is chrismarsh.us

3
  • Go into functions.php and whatever variable is on line 229 add $var = new stdClass(); before it Commented Jun 25, 2015 at 14:58
  • Thanks! Below is the code from line 217-235 with your suggestion. It now throws this error... Parse error: syntax error, unexpected 'define' (T_STRING) in /home4/cmarsh17/public_html/chrismarsh.us/wp-content/themes/StandardTheme_272/admin/functions.php on line 1 Commented Jun 25, 2015 at 15:16
  • Lines 217-235 // --------------- Global Theme Options -------------------- // $standard_options_db = get_option('standard_framework_'.STANDARD_FRAMEWORK_SHORT_NAME); global $standard_options; if(is_array($standard_options_db)): foreach ($standard_options_db as $k => $v): $var = new stdClass(); $standard_options -> {$k} = $v; endforeach; endif; standard_multiple($update_option->theme1); Commented Jun 25, 2015 at 15:18

1 Answer 1

0

Double-check your wp-config.php and your /wp-content/themes/StandardTheme_272/functions.php to make sure there is no whitespace before the <?php part of the file. I don't know why that happens but it does happen sometimes and it will throw "PHP Warning: Cannot modify header information - headers already sent by..." as a result.

Not saying this is the only possible reason but it is one possible reason based on what I've encountered working with WordPress.

Sign up to request clarification or add additional context in comments.

2 Comments

Thank You! I checked both and there is no whitespace. Any other suggestions?
Have you also checked if there is a whitespace in /wp-content/themes/StandardTheme_272/ad‌​min/functions.php as well?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.