The line that triggers the error is this:
$extension = pathinfo($fileinfo->getFilename(), PATHINFO_EXTENSION);
I added a
print_r($fileInfo); at the point where the error happens and got the following:
DirectoryIterator Object ( [pathName:SplFileInfo:private] => /var/www/wp-content/plugins/faf//filters/categories_keyword.php [fileName:SplFileInfo:private] => categories_keyword.php [glob:DirectoryIterator:private] => [subPathName:RecursiveDirectoryIterator:private] => )
So it appears that the object is being handled wrong, not an issue of PHP support.