• Resolved Stephan Kockmann

    (@teescout)


    Today I came across a special error message:

    WordPress-Version 6.1.1
    Aktives Theme: Twenty Seventeen (Version 3.1)
    Aktuelles Plugin: Security Header Generator (Version 3.6.02)
    PHP-Version 8.0.28

    Ein Fehler vom Typ E_ERROR wurde in der Zeile 701 der Datei /homepage/wp-content/plugins/security-header-generator/work/inc/kcp-cspgen-headers.php verursacht.

    Fatal error: Uncaught TypeError: KCP_CSPGEN_Headers::kp_get_generated_csp(): Return value must be of type array, string returned in /homepage/wp-content/plugins/security-header-generator/work/inc/kcp-cspgen-headers.php:701 Stack trace: #0 /homepage/wp-content/plugins/security-header-generator/work/inc/kcp-cspgen-headers.php(408): KCP_CSPGEN_Headers->kp_get_generated_csp() #1 /homepage/wp-content/plugins/security-header-generator/work/inc/kcp-cspgen-headers.php(347): KCP_CSPGEN_Headers->kp_csp_builder() #2 /homepage/wp-content/plugins/security-header-generator/work/inc/kcp-cspgen-headers.php(80): KCP_CSPGEN_Headers->kp_populate_header_array() #3 /homepage/wp-includes/class-wp-hook.php(308): KCP_CSPGEN_Headers->{closure}(Object(WP)) #4 /homepage/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(”, Array) #5 /homepage/wp-includes/plugin.php(565): WP_Hook->do_action(Array) #6 /homepage/wp-includes/class-wp.php(561): do_action_ref_array(‘send_headers’, Array) #7 /homepage/wp-includes/class-wp.php(788): WP->send_headers() #8 /homepage/wp-includes/functions.php(1332): WP->main(Array) #9 /homepage/wp-admin/includes/post.php(1245): wp(Array) #10 /homepage/wp-admin/includes/class-wp-posts-list-table.php(165): wp_edit_posts_query() #11 /homepage/wp-admin/edit.php(235): WP_Posts_List_Table->prepare_items() #12 {main} thrown in /homepage/wp-content/plugins/security-header-generator/work/inc/kcp-cspgen-headers.php on line 701

    I get the error, when clicking on an (internal) link like this:

    https://mywebsite.com/wp-admin/edit.php?focus_keyword=key%20word&post_type=post

    which is generated by RankMath to check posts, which have the same keyword like the actual post.

    It seems, that the error only is caused, when the checked keyword-phrase contains two or more parts. If it is online a single keyword, there is no eror, e.g.:

    https://mywebsite.com/wp-admin/edit.php?focus_keyword=keyword&post_type=post

    Can I do anything to avoid this error other than not clicking on the link?

    Thank you in advance for any hints!

    • This topic was modified 1 year, 8 months ago by Stephan Kockmann. Reason: sent too early ... ;-)
    • This topic was modified 1 year, 8 months ago by Stephan Kockmann.
    • This topic was modified 1 year, 8 months ago by Stephan Kockmann. Reason: updated error-description
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Kevin Pirnie

    (@kevp75)

    Hey @teescout I can certainly look into putting in a check. I’m not sure how I would replicate the issue though, so I may need to rely on you to tell me if it worked or not ??

    I should have time today to work on it some, and will keep you posted once I have a potential fix pushed.

    Thread Starter Stephan Kockmann

    (@teescout)

    Thank you for your quick reply. Just let me know, when you have a potential fix, so I can test it.

    Plugin Author Kevin Pirnie

    (@kevp75)

    fixed in v3.6.11

    Committed to WP, just need to wait for it to filter the update out.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Error message in a special case’ is closed to new replies.