WordPress.org

Support

Support » Plugins and Hacks » Device Theme Switcher » [Resolved] Cannot Modify Header Error

[Resolved] Cannot Modify Header Error

  • Hi it’s me again. It seems I have another modify header error. I strongly suspect this issue is related to the previous modify header problem you fixed for me. I just didn’t find it until now because I hadn’t saved a post until today. This time it occurs only when I edit a post. After saving an edited post I get a white screen which reads:

    Warning: Illegal string offset ‘type’ in /home3/public_html/canigivemydog.com/wp-content/themes/thesis_18/lib/admin/options_post.php on line 168

    Warning: Cannot modify header information – headers already sent by (output started at /home3/public_html/canigivemydog.com/wp-content/themes/thesis_18/lib/admin/options_post.php:168) in /home3/qatarsuc/public_html/canigivemydog.com/wp-admin/post.php on line 235

    Warning: Cannot modify header information – headers already sent by (output started at /home3/qatarsuc/canigivemydog.com/wp-content/themes/thesis_18/lib/admin/options_post.php:168) in /home3/qatarsuc/public_html/canigivemydog.com/wp-includes/pluggable.php on line 1121

    So I went to that particular line within options_post.php – containing ‘type’ and it reads:

    if (($meta_field[‘type’][‘type’] == ‘checkbox’) && is_array($meta_field[‘type’][‘options’])) {
    foreach ($meta_field[‘type’][‘options’] as $option_name => $option) {
    if ((bool) $new_data[$option_name] != (bool) $option[‘default’])
    $new_data[$option_name] = (bool) $new_data[$option_name];
    elseif ((bool) $new_data[$option_name] == (bool) $option[‘default’])
    unset($new_data[$option_name]);

    Possible to help! Thank you kindly.
    James

    https://wordpress.org/plugins/device-theme-switcher/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author James Mehorter

    @jamesmehorter

    1) These are PHP warnings (If you turn WP_DEBUG to false in wp-config.php they’ll be hidden/won’t output and mess up headers) not errors.

    2) These warnings are being generated by your theme thesis_18 and have nothing to do with DTS. Once the theme stops throwing warnings (or if you disable the warning output to screen) any header issues will go away.

    Thank you. It seems the php version I am using now has fixed it or the problem simply went away. Thanks for the advice.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] Cannot Modify Header Error’ is closed to new replies.
Skip to toolbar