- Issue created by @chipchenko
Hello everyone, I understand that this module is not really actively maintained but was hoping someone could help me. I have come across this error when switching to php 8.1. The filter works on shorter URLs (www.nypost.com) but fails and gives and error on longer URLs (www.nypost.com/2023/02/12/mount-sinai-merger-bid-to-free-up-prized-east-...)
The page returns an error:
TypeError: Cannot access offset of type string on string in opengraph_filter_find_tags() (line 77 of modules/contrib/opengraph_filter/opengraph_filter.module)
In code the snip from line 77 looks like this:
if (gettype(@$these_tags[$key]) != 'NULL') {
if (gettype(@$these_tags) == 'string') {
$these_tags = [$keys[$j - 1] => $these_tags];
$these_tags[$key] = $found[6][$i];
}
I have applied the patches to the dev version. Any help or point in the right direction would be much appreciated.
Active
1.0
Code
The issue particularly affects sites running on PHP version 8.1.0 or later.