WordPress.org

Ready to get started?Download WordPress

Forums

Device Theme Switcher
[resolved] Cannot Modify Header Error (3 posts)

  1. anefarious1
    Member
    Posted 3 months ago #

    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/

  2. James Mehorter
    Member
    Plugin Author

    Posted 2 months ago #

    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.

  3. anefarious1
    Member
    Posted 2 months ago #

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

Reply

You must log in to post.

About this Plugin

About this Topic

Tags