• Resolved pikamander2

    (@pikamander2)


    After upgrading to version 4.1.9.3, every wp-admin page shows a blank white screen with a completely empty <body> tag.

    Here’s the relevant error log message:

    AH01071: Got error 'PHP message: PHP Fatal error: Uncaught TypeError: ftp_nlist(): Argument #1 ($ftp) must be of type resource, null given in /wp-admin/includes/class-wp-filesystem-ftpext.php:420\nStack trace:\n#0 /wp-admin/includes/class-wp-filesystem-ftpext.php(420): ftp_nlist()\n#1 /wp-content/plugins/all-in-one-seo-pack/app/Common/Utils/Filesystem.php(70): WP_Filesystem_FTPext->exists()\n#2 /wp-content/plugins/all-in-one-seo-pack/app/Common/Utils/Filesystem.php(82): AIOSEO\\Plugin\\Common\\Utils\\Filesystem->exists()\n#3 /wp-content/plugins/all-in-one-seo-pack/app/Common/Traits/Assets.php(346): AIOSEO\\Plugin\\Common\\Utils\\Filesystem->getContents()\n#4 /wp-content/plugins/all-in-one-seo-pack/app/Common/Traits/As...'

    I tried downgrading to 4.1.9.1 but the same error occurred, so I moved back down to 4.1.8 for now and disabled auto-updates.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter pikamander2

    (@pikamander2)

    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?

    Thread Starter pikamander2

    (@pikamander2)

    Although, interestingly, we’re on PHP 8.0.17, not PHP 8.1.

    Regardless, the plugin is currently broken.

    Thread Starter pikamander2

    (@pikamander2)

    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.

    Plugin Author Cristian Rossi

    (@cristianrossi)

    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.

    Plugin Author Cristian Rossi

    (@cristianrossi)

    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!

    Thread Starter pikamander2

    (@pikamander2)

    @cristianrossi – Looks like that fixed it.

    Thanks for the amazing turnaround time.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Version 4.1.9.3 breaks wp-admin’ is closed to new replies.