“Fatal Error: Uncaught error operator not supported for strings” after upgrading to PHP 7.1

Home / Uncategorized / “Fatal Error: Uncaught error operator not supported for strings” after upgrading to PHP 7.1

Question:
Here is the error when I open a post in WordPress site:

Fatal error: Uncaught Error: [] operator not supported for strings in /home/mysite/public_html/tube/wp-content/themes/detube2/functions.php:790 Stack trace: #0 /home/mysite/public_html/tube/wp-content/themes/detube2/header.php(35): dp_meta_keywords() #1 /home/mysite/public_html/tube/wp-includes/template.php(688): require_once(‘/home/mysite…’) #2 /home/mysite/public_html/tube/wp-includes/template.php(647): load_template(‘/home/mysite…’, true) #3 /home/mysite/public_html/tube/wp-includes/general-template.php(45): locate_template(Array, true) #4 /home/mysite/public_html/tube/wp-content/themes/detube2/single-video.php(10): get_header() #5 /home/mysite/public_html/tube/wp-includes/template.php(690): require(‘/home/mysite…’) #6 /home/mysite/public_html/tube/wp-includes/template.php(647): load_template(‘/home/mysite…’, false) #7 /home/mysite/public_html/tube/wp-includes/general-template.php(167): locate_template(Array, true, false) #8 /ho in /home/mysite/public_html/tube/wp-content/themes/detube2/functions.php on line 790

It gives this error after the upgrading to PHP 7.1. This error only happens when I visit to a post. The homepage is working but posts are not. I think there must be something to change in themes files.


Answer:

Read more

Leave a Reply

Your email address will not be published. Required fields are marked *