Error on php 8.0: Cannot access offset of type string

[ad_1]

I have the following error when I use the plugin on php 8.0, on php 7.4 it’s just a warning and everything works fine.

Error log:

PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /Applications/MAMP/htdocs/wordpress-total-estate/wp-content/plugins/kaya-qr-code-generator/lib/class.shortcodes_qrcodeshortcode.php:50
Stack trace:

0 /Applications/MAMP/htdocs/wordpress-total-estate/wp-includes/shortcodes.php(355): WPKQCG_Shortcodes_qrcodeshortcode::wpkqcg_shortcode_qrcodeshortcodedynamic_handler(”, ‘[example_shortc…’, ‘kaya_qrcode_dyn…’)

1 [internal function]: do_shortcode_tag(Array)

2 /Applications/MAMP/htdocs/wordpress-total-estate/wp-includes/shortcodes.php(227): preg_replace_callback(‘/\[(\[?)(kaya_q…’, ‘do_shortcode_ta…’, ‘[kaya_qrcode_dy…’)

3 /Applications/MAMP/htdocs/wordpress-total-estate/wp-content/themes/centurytwentyonetotalestate/single-agents.php(170): do_shortcode(‘[kaya_qrcode_dy…’)

4 /Applications/MAMP/htdocs/wordpress-total-estate/wp-includes/template-loader.php(106): include(‘/Applications/M…’)

5 /Applications/MAMP/htdocs/wordpress-total-estate/wp-blog-header.php(19): require_once(‘/Applications/M…’)

6 /Applications/MAMP/htdocs/wordpress-total-estate/index.php(17): require(‘/Applications/M…’)

7 {main}

thrown in /Applications/MAMP/htdocs/wordpress-total-estate/wp-content/plugins/kaya-qr-code-generator/lib/class.shortcodes_qrcodeshortcode.php on line 50

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer