Support » Plugin: Maintenance Redirect » Error after updating to 1.8.2

  • After updating the plugin from v1.8.1 to v1.8.2, I got a fatal error that I couldn’t get around without deleting the plugin through FTP.

    This is the error in the log:

    PHP Warning: Undefined array key 1 in /home/myuser/public_html/wp-content/plugins/jf3-maintenance-mode/wpjf3_maintenance_redirect.php on line 225
    PHP Warning: Undefined array key 2 in /home/myuser/public_html/wp-content/plugins/jf3-maintenance-mode/wpjf3_maintenance_redirect.php on line 225

    What could be the issue?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Peter Hardy-vanDoorn

    (@petervandoorn)

    Hi @pinkish1

    Try as I might, I just can’t replicate that error. It’s in the part of the code that checks the IP address, but that function has not changed in a long time. Maybe it’s got something to do with the version of PHP you are using, so perhaps you could check that and I can have a further look?

    BTW, a PHP Warning is not fatal, so although your logs might get filled up with warnings, they generally don’t stop the site from working.

    Cheers

    Peter

    Thread Starter pinkish1

    (@pinkish1)

    Hi,

    Yes, it was not a fatal error in the sense that the whole website was down, but the Dashboard was down – I could only see the left menu, but none of the links actually worked.

    PHP Version is 8.1.9. Maybe that’s the culprit. If I get a chance to do some testing with older PHP versions, I will.

    Thanks,
    Alex

    Thread Starter pinkish1

    (@pinkish1)

    On another WordPress instance (different server, PHP v7.4), there is this error in the log:

    PHP Warning: sprintf(): Too few arguments in /home/user/public_html/wp-content/plugins/jf3-maintenance-mode/wpjf3_maintenance_redirect.php on line 601

    Thanks.

    • This reply was modified 3 months, 1 week ago by pinkish1.
    Plugin Author Peter Hardy-vanDoorn

    (@petervandoorn)

    Hi @pinkish1

    Yes, I noticed the sprintf() error when I was investigating your issue yesterday. I’ve released a new version to fix that.

    I think it’s probably to do with PHP 8.1.9 – I’ve never tested it on such a “bleeding edge” version of PHP. I’ll have to do some further investigation.

    Cheers

    Peter

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.