We’re on PHP 8, by the way.
Looking at the documentation for ftp_nlist, it seems that the behavior of the first parameter was changed. Perhaps the first parameter was allowed to be null in PHP <8 but not in PHP >8?
-
This reply was modified 3 years, 8 months ago by
pikamander2.
Although, interestingly, we’re on PHP 8.0.17, not PHP 8.1.
Regardless, the plugin is currently broken.
Interestingly, it breaks some of our PHP 8 sites but not others. Weird.
Here are the two lines in \app\Common\Utils\Filesystem.php that are causing the TypeError:
public function exists( $filename )
{
...
return $this->fs->exists( $filename );
}
public function getContents( $filename )
{
...
return $this->fs->get_contents( $filename );
}
It appears that these two functions are supposed to fall back to using @file_exists and @file_get_contents if $this->isWpfsValid() returns false, but for some reason that’s not happening here.
A workaround that I found is to modify the two functions to always use the fallback code:
public function exists( $filename ) {
return @file_exists( $filename );
}
public function getContents( $filename )
{
if ( ! $this->exists( $filename ) ) {
return false;
}
return @file_get_contents( $filename );
}
But I’m not sure what the underlying issue is.
-
This reply was modified 3 years, 8 months ago by
pikamander2.
-
This reply was modified 3 years, 8 months ago by
pikamander2.
-
This reply was modified 3 years, 8 months ago by
pikamander2.
-
This reply was modified 3 years, 8 months ago by
pikamander2.
-
This reply was modified 3 years, 8 months ago by
pikamander2.
-
This reply was modified 3 years, 8 months ago by
pikamander2.
Hi @pikamander2
Thank you so much for reaching out.
We have identified the error and have a beta build ready to address the issue.
Would you be so kind as reach out to us via our Basic Question form here – https://aioseo.com/contact/.
Just mention that I referred you and that you’d like a beta build that fixes this error. Our support team will be happy to hook you up and get you on your way again.
Hi @pikamander2
I’m happy to inform we have just released version 4.1.9.4 which fixes the error you’re seeing, so you won’t be needing a beta version.
Would be so kind as to update to 4.1.9.4? That’ll fix it!
Thank you!
@cristianrossi – Looks like that fixed it.
Thanks for the amazing turnaround time.