Closed bobbingwide closed 4 years ago
Well, PHP 7.1's out of support now so let's just make it 7.3 and 7.4
Message issued with PHP 7.4 Notice: Trying to access array offset on value of type null in C:\apache\htdocs\wordpress\wp-content\plugins\oik-bob-bing-wide\shortcodes\oik-csv.php on line 153
V1.34.0 has now been released to oik-plugins.com and tested with PHP 7.3 and PHP 7.4. This can now be closed.
Changes in PHP 7.1 mean that some logic which worked without problems under PHP 7 and earlier now issue Notices, Warnings Errors and even Fatal errors.
In the code for the [bw_post] and [bw_page] shortcodes we get
Warning: Illegal string offset 'post_type'
from the following code construct.The code assumes that $atts is passed as an array or can be handled as an array. When no parameters are set on the shortcode then $atts is passed as null. The warning is issued from the assignment.
Many WordPress shortcodes avoid this issue by using shortcode_atts(), which casts the $atts parameter to an array. We might be able to find a solution by changing
bw_shortcode_event
, in oik.