Fix for Illegal string offset PHP Warning
-
If you’re getting warning errors like this:
Warning: Illegal string offset 'type' in /YOUR-PATH/wp-content/plugins/tc-comment-out/tc-comment-out.php on line 24 Warning: Illegal string offset 'type' in /YOUR-PATH/wp-content/plugins/tc-comment-out/tc-comment-out.php on line 29
You can fix it by editing the tc-comment-out.php file to add this code as the first line in the first function:
$attr = array();
so that it looks like this:
function tc_comment_out_shortcode( $attr, $content ) { /** THEIR COMMENT BLOCK -- DELETED FOR BREVITY */ $attr = array(); if ( ( ( is_array( $attr ) ) && ( ! array_key_exists( 'type', $attr ) ) ) || ( ! is_array( $attr ) ) ) { $attr['type'] = 'html'; } ...etc...
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Fix for Illegal string offset PHP Warning’ is closed to new replies.